Datalog Programs with Arithmetical Constraints: Hierarchic, Periodic and Spiralling Least Fixpoints
- Publication date
- Publisher
Abstract
We consider in this report Datalog programs with arithmetical constraints of the following form: p(x0 ; y0 ; z0 ): p(x + e; y + ; z + fl) / x 0; p(x; y; z): p(x + ¯; y + f; z + ffi) / y 0; p(x; y; z): p(x + ff; y + fi; z + g) / z 0; p(x; y; z): where x0 ; y0 ; z0 ; e; ; fl; ¯; f; ffi; ff; fi; g denote integer constants. The problem is to find an arithmetic formula f(x; y; z) equivalent to the relation p(x; y; z) defined by the above program. This characterization problem has useful applications in several fields, like the generation of lemmas for proving the termination of Prolog programs, the compilation of queries in Temporal Deductive Databases, or the verification of safety properties in parametric concurrent systems. We show here that programs of the above form are divided into three classes: the hierarchic, periodic and spiralling classes. More than 99% of the programs fall into the hierarchic and periodic classes and can be characterized by a linear arithmetic formula, un..