Termination of programs in constraint query languages

Several attempts have been made to increase the expressive power of database query languages by integrating constraint paradigms with logic-based database query languages. These logic-based query languages which support constraints processing are called c o n s t r a i n t q u e r y l anguages (CQLs) [8]. Because of the presence of constraints, the evaluation of programs in these languages can be very expensive. A bottom-up approach is considered very useful in optimizin.g the evaluation. Bottom-up evaluation of a program m CQLs starts with the facts in the database and repeatedly applies all the rules of the program, in iterations, to compute new facts. The evaluation terminates once a fixpoint is reached. This amounts to checking if the new generated fact is subsumed by the previously computed facts. In other words, the problem is to determine whether a fact is implied by a disjunction of other already known facts. We refer to this as the s u b s l , m p t l o n p rob l em. Given two predicates, ¢ , a l with a set of variables X={zl,z2, • . . , zn } we say that o'I s u b s r u e s ¢, or equivalently o" implies ¢1, denoted by o" --+ a l if and only if any tuple (sl, s2 , . . . , so) that satisfies ¢, also satisfies e l .