Abstract
Datalog (i.e., function-free logic) programs with monotonicity constraints on extensional predicates are considered. A monotonicity constraint states that one argument of a predicate or a constant is always less than another argument or a constant, according to some strict partial order. Relations of an extensional database are required to satisfy the monotonicity constraints imposed on their predicates. More specifically, a strict partial order is defined on the domain (i.e., set of constants) of the database, and every tuple of each relation satisfies the monotonicity constraints imposed on its predicate. This paper focuses on the problem of entailment of monotonicity constraints in the intensional database from monotonicity constraints in the extensional database. The entailment problem is proven to be decidable, based on a suggested algorithm for computing sound and complete disjunctions of monotonicity and equality constraints that hold in the intentional database. It is also shown that the entailment of monotonicity constraints in programs is a complete problem for exponential time. For linear programs, this problem is complete for polynomial space.
Similar content being viewed by others
References
F. Afrati, C.H. Papadimitriou, G. Papageorgiou, A. Roussou, Y. Sagiv and J.D. Ullman, On the convergence of query evaluation, to appear in J. Comput. System Sci.
A. Brodsky and Y. Sagiv, Inference of monotonicity constraints in Datalog programs, in: Proc. 10th ACM SIGACT-SIGART-SIGMOD Symposium on Principles of Database Systems, Philadelphia, PA (1989).
A. Brodsky and Y. Sagiv, On termination of Datalog programs, in: Proc. 19th Internation Conference on Deductive and Object-Oriented Databases, Japan (1989).
M. Kifer, R. Ramakrishnan and A. Silberschatz, An axiomatic approach to deciding query safety in deductive databases, in: Proc. 7th ACM Symp. on Principles of Database Systems, Austin (1988) pp. 52-60.
R. Krishnamurthy, R. Ramakrishnan and O. Shmueli, A framework for testing safety and effective computability of extended datalog, in: Proc. ACM Symp. on Management of Data, Chicago (1988) pp. 154-163.
R. Ramakrishnan, F. Bancilhon and A. Silberschatz, Safety of recursive Horn clauses with infinite relations, in: Proc. 6th ACM Symp. on Principles of Database Systems, San Diego (1987) pp. 328-339.
J.D. Ullman and A. Van Gelder, Efficient tests for top-down termination of logical rules, Journal of the ACM 35 (1988) 345-373.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Brodsky, A., Sagiv, Y. Inference of monotonicity constraints in Datalog programs. Annals of Mathematics and Artificial Intelligence 26, 29–57 (1999). https://doi.org/10.1023/A:1018994409271
Issue Date:
DOI: https://doi.org/10.1023/A:1018994409271