Abstract
We give a simple transformation from normal programs with no stratification (local, weak, modular, etc.) into a subclass of the locally stratified programs, called Explicitly Locally Stratified (ELS) programs, for which there are efficient evaluation techniques. One set of predicates are generated for the true tuples and a different set of predicate are generated for the true and undefined tuples. A similar transformation is given that incorporates a magic sets like transformation. Previous approaches to magic sets transformations of unstratified programs either restricted the class of sips used or generated a program that required special treatment of the magic sets predicates. Our transformation does not suffer from these flaws.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
I. Balbin and K. Ramamohanarao. A generalization of the differential approach to recursive query evaluation. Journal of Logic Programming, 4(3):259–262, September 1987.
F. Bancilhon. Naive evaluation of recursively defined relations. In M. Brodie and J. Mylopoulos, editors, On knowledge-base management systems — integrating database and AI systems, pages 165 178. Springer-Verlag, New York, 1986.
C. Beeri and R. Ramakrishnan. On the power of magic. In Proceedings of the Sixth ACM PODS Symposium on Principles of Database Systems, pages 269–283, 1987.
David Kemp, Kotagiri Ramamohanarao, and Peter J. Stuckey. ELS-programs and the efficient evaluation of non-stratified programs by transformation to ELS. Technical report 95/19, Department of Computer Science, University of Melbourne, 1995.
David B. Kemp and Kotagiri Ramamohanarao. A deductive database solution to the preferential vote counting problem. In Proceedings of the Second ICLP-Workshop on deductive databases, pages 143–158, June 1994.
David B. Kemp and Kotagiri Ramamohanarao. Syntactically recognizable modularly stratified programs. In Proceedings of the 5th Australasian Database Conference, pages 147–161, January 1994. An extended version of this paper has been written as University of Melbourne, Computer Science Department Technical Report 93/15.
David B. Kemp, Divesh Srivastava, and Peter J. Stuckey. Bottom-up evaluation and query optimization of well-founded models. Theoretical Computer Science, 146(1–2):145–184, July 1995.
Phokion G. Kolaitis and Christos H. Papadimitriou. Why not negation by fixpoint? In Proceedings of the Seventh ACM Symposium on Principles of Database Systems, pages 231–239, March 1988.
J.W. Lloyd. Foundations of logic programming. Springer Series in Symbolic Computation. Springer Verlag, New York, second edition, 1987.
J.W. Lloyd and R.W. Topor. Making prolog more expressive. Journal of Logic Programming, 1(3):225–240, 1984.
Shinichi Morishita. An alternating fixpoint tailored to magic programs. In PODS'93, pages 123–134, 1993.
Teodor C. Przymusinski. On the declarative semantics of deductive databases and logic programs. In Jack Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 193–216. Morgan Kaufmann Publishers, 1988.
Ken A. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proceedings of the Ninth ACM PODS Symposium on Principles of Database Systems, pages 161–171, 1990. An extended version of this paper, containing new results, was obtained from the author.
J.D. Ullman. Principles of database and knowledge-base systems, vol. I. Computer Science Press, New York, 1988.
J.D. Ullman. Principles of database and knowledge-base systems, vol. II: The new technologies. Computer Science Press, New York, 1989.
A. van Gelder, K. A. Ross, and J. S. Schlipf. The well-founded semantics for general logic programs. Journal of the ACM, 38(3):620–650, 1991.
Allen van Gelder. The alternating fixpoint of logic programs with negation. In Proceedings of the Eighth ACM PODS Symposium on Principles of Database Systems, pages 1–10, 1989.
Carlo Zaniolo, Natraj Arni, and Kayliang Ong. Negation and aggregates in recursive rules: the LDL++ approach. In Proceedings of the Third International Conference on Deductive and Object-Oriented Databases, pages 204–221, December 1993.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kemp, D.B., Ramamohanarao, K., Stuckey, P.J. (1995). ELS-programs and the efficient evaluation of non-stratified programs by transformation to ELS. In: Ling, T.W., Mendelzon, A.O., Vieille, L. (eds) Deductive and Object-Oriented Databases. DOOD 1995. Lecture Notes in Computer Science, vol 1013. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60608-4_36
Download citation
DOI: https://doi.org/10.1007/3-540-60608-4_36
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60608-6
Online ISBN: 978-3-540-48460-8
eBook Packages: Springer Book Archive