Inferring Function Semantics to Optimize Queries
Mitch Cherniack, Stanley B. Zdonik · 1998
The goal of the COKO-KOLA project [10, 9] is to express rules of rule-based optimizers in a manner permitting verification with a theorem prover. In [10], we considered query transformations that were too general to be expressed with rewrite rules. In this paper, we consider the complementary issue of expressing query transformations that are too specifc for rewrite rules. Such transformations require rewrite rules to be supplemented with semantic conditions to guard rule firing. This work considers the expression of such transformations using conditional rewrite rules, and the expression of inference rules to guide the optimizer in deciding if semantic conditions hold. This work differs from existing work in semantic query optimization in that semantic transformations in our framework are verifiable with a theorem prover. Further, our use of inference rules to guide semantic reasoning makes our optimizer extensible in a manner that is complementary to the extensibility benefits of existing rule-based technology. 1