We plan to write a precompiler to detect base conjunctions (a sequence of database predicates and arithmetic comparison predicates) to build larger more restrictive base conjuncts by classical methods of rule composition, predicate exchange etc. and then employ the view level interface to generate more efficient queries and programs. Also we want to explore the use of tabling for caching of data and queries for optimization.