Abstract
This paper introduces a unified solution to the problem of extending stratified DATALOG to express DB-complexity classes ranging from P to D P. The solution is based on (i) stratified negation as the core of a simple, declarative semantics for negation, (ii) the use of a “choice” construct to capture non-determinism of stable models (iii) the ability to bind a query execution to the complexity class that includes the problem at hand, and (iv) a general algorithm that ensures efficient execution for the different complexity classes. We thus obtain a class of DATALOG programs that preserves computational tractability, while achieving completeness for a wide range of complexity classes.
The work of the first two authors has been supported by the CNR project “Sistemi Informatici e Calcolo Parallelo” and by the MURST project “Metodi Formali per Basi di Dati”.
Preview
Unable to display preview. Download preview PDF.
References
S. Abiteboul, E. Simon, V. Vianu. Non-Deterministic Language to Express Deterministic Transformation. In Proc. of the Ninth ACM PODS Conference, 1990.
S. Abiteboul and V. Vianu. Datalog Extensions for Databases Queries and Updates. In Journal of Computer and System Science, 43, pages 62–124, 1991.
F. Afrati, S. S. Cosmadakis, M. Yannakakis. On Datalog vs. Polynomial Time. In Proc. of the Tenth ACM PODS Conference, pages 13–25, 1991.
C. Apt, H. Blair, A Walker. Towards a Theory of Declarative Knowledge. In Proc. Work. on Found, of Deductive Database and Logic Prog., (IMinker Ed.), 1988.
A. Chandra and D. Harel. Structures and Complexity of Relational Queries. In Journal of Computer and System Science, 25, pages 99–128, 1982.
A. Chandra and D. Harel. Horn clause and generalizations. In Journal of Logic Programming, vol. 2, No. 1, pages 1–15, 1985.
R. Fagin. Generalized First-Order Spectra and Polynomial-Time Recognizable Sets, in Complexity of Computation (R. Karp, Ed.), SIAM-AMS Proc., 1974.
M. Gelfond and V. Lifschitz. The stable model semantics of logic programming. In Proc. of the Fifth Intern. Conf. on Logic Programming, pages 1070–1080, 1988.
F. Giannotti, D. Pedreschi, D. Saccá, and C. Zaniolo. Nondeterminism in deductive databases. In Proc. 2nd DOOD Conference, pages 129–146, 1991.
S. Greco, C. Zaniolo, and S. Ganguly. Greedy by Choice. In Proc. of the Eleventh ACM PODS Conference, pages 105–163, 1992.
N. Immerman. Languages that Capture Complexity Classes. In SIAM Journal of Computing, 16(4), pages 760–778, 1987.
D. S. Johnson. A Catalog of Complexity Classes, In Handbook of Theoretical Computer Science, Vol. 1, (Ed. J. Leewen) North-Holland, pages 67–161, 1990.
P. C. Kanellakis Elements of Relational Databases Theory. In Handbook of Theoretical Computer Science, (Ed. J. Leewen) North-Holland, pages 1075–1155, 1990.
P. Kolaitis. The Expressive Power of Stratified Logic Programs. Information an Computation, 90, pages 50–66, 1990.
P. Kolaitis and C. Papadimitriou. Why not negation by fixpoint. In Journal of Computer and System Science, 43, pages 125–144, 1991.
J. W. Lloyd. Foundations of Logic Programming, Springer Verlag, Berlin, 1987.
W. Marek, M. Truszczynski. Autoepistemic Logic. Journal of ACM, 38(3):588–619, 1991.
S. Naqvi and S. Tsur. A logic language for data and knowledge bases. Computer Science Press, 1989.
C. Papadimitriou. A Note on the Expressive Power of Prolog. In Bull of the EATCS, 26, pages 21–23, 1985.
C. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.
R. Ramakrisnhan, D. Srivastava, and S. Sudanshan. CORAL — Control, Relations and Logic. In Proc. of 18th VLDB Conference, 1992.
D. Saccá. The Expressive Powers of Stable Models for Bound and Unbound Queries, this volume, 1994.
D. Saccá and C. Zaniolo. Stable models and non-determinism in logic programs with negation. In Proc. of the Ninth ACM PODS Conference, pages 205–217, 1990.
J. S. Schlipf. The expressive power of the logic programming semantics. In Proc. of the Ninth ACM PODS Conference, pages 196–204, 1990.
J. S. Schlipf. A Survey of Complexity and Undecidability Results in Logic Programming. Work. Structural Compl. and Recursion-Theoretic Met. in L. P., 1993.
J. D. Ullman. Principles of Databases and Knowledge Base Systems, Vol. I and II. Computer Science Press, 1988.
A. Van Gelder. Negation as failure using tight derivations for general logic programs. Journal of Logic Programming, vol. 6, No. 1, pages 109–133, 1989.
A. Van Gelder, K.A. Ross, and J.S. Schlipf. The well-founded semantics for general logic programs. Journal of ACM, 38(3):620–650, 1991.
M. Vardi. The Complexity of Relational Query Languages. In Proceedings of the 14th ACM Symposium on Theory of Computing, pages 137–146, 1982.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Greco, S., Saccá, D., Zaniolo, C. (1995). DATALOG queries with stratified negation and choice: from P to D P . In: Gottlob, G., Vardi, M.Y. (eds) Database Theory — ICDT '95. ICDT 1995. Lecture Notes in Computer Science, vol 893. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58907-4_8
Download citation
DOI: https://doi.org/10.1007/3-540-58907-4_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58907-5
Online ISBN: 978-3-540-49136-1
eBook Packages: Springer Book Archive