DATALOG queries with stratified negation and choice: from P to DP

  • Sergio Greco
  • Domenico Saccá
  • Carlo Zaniolo
Contributed Papers Nonmonotonic Semantics I
Part of the Lecture Notes in Computer Science book series (LNCS, volume 893)


This paper introduces a unified solution to the problem of extending stratified DATALOG to express DB-complexity classes ranging from P to DP. 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.


Logic Program Stable Model Expressive Power Hamiltonian Path Choice Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    S. Abiteboul, E. Simon, V. Vianu. Non-Deterministic Language to Express Deterministic Transformation. In Proc. of the Ninth ACM PODS Conference, 1990.Google Scholar
  2. 2.
    S. Abiteboul and V. Vianu. Datalog Extensions for Databases Queries and Updates. In Journal of Computer and System Science, 43, pages 62–124, 1991.CrossRefGoogle Scholar
  3. 3.
    F. Afrati, S. S. Cosmadakis, M. Yannakakis. On Datalog vs. Polynomial Time. In Proc. of the Tenth ACM PODS Conference, pages 13–25, 1991.Google Scholar
  4. 4.
    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.Google Scholar
  5. 5.
    A. Chandra and D. Harel. Structures and Complexity of Relational Queries. In Journal of Computer and System Science, 25, pages 99–128, 1982.CrossRefGoogle Scholar
  6. 6.
    A. Chandra and D. Harel. Horn clause and generalizations. In Journal of Logic Programming, vol. 2, No. 1, pages 1–15, 1985.Google Scholar
  7. 7.
    R. Fagin. Generalized First-Order Spectra and Polynomial-Time Recognizable Sets, in Complexity of Computation (R. Karp, Ed.), SIAM-AMS Proc., 1974.Google Scholar
  8. 8.
    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.Google Scholar
  9. 9.
    F. Giannotti, D. Pedreschi, D. Saccá, and C. Zaniolo. Nondeterminism in deductive databases. In Proc. 2nd DOOD Conference, pages 129–146, 1991.Google Scholar
  10. 10.
    S. Greco, C. Zaniolo, and S. Ganguly. Greedy by Choice. In Proc. of the Eleventh ACM PODS Conference, pages 105–163, 1992.Google Scholar
  11. 11.
    N. Immerman. Languages that Capture Complexity Classes. In SIAM Journal of Computing, 16(4), pages 760–778, 1987.CrossRefGoogle Scholar
  12. 12.
    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.Google Scholar
  13. 13.
    P. C. Kanellakis Elements of Relational Databases Theory. In Handbook of Theoretical Computer Science, (Ed. J. Leewen) North-Holland, pages 1075–1155, 1990.Google Scholar
  14. 14.
    P. Kolaitis. The Expressive Power of Stratified Logic Programs. Information an Computation, 90, pages 50–66, 1990.Google Scholar
  15. 15.
    P. Kolaitis and C. Papadimitriou. Why not negation by fixpoint. In Journal of Computer and System Science, 43, pages 125–144, 1991.Google Scholar
  16. 16.
    J. W. Lloyd. Foundations of Logic Programming, Springer Verlag, Berlin, 1987.Google Scholar
  17. 17.
    W. Marek, M. Truszczynski. Autoepistemic Logic. Journal of ACM, 38(3):588–619, 1991.Google Scholar
  18. 18.
    S. Naqvi and S. Tsur. A logic language for data and knowledge bases. Computer Science Press, 1989.Google Scholar
  19. 19.
    C. Papadimitriou. A Note on the Expressive Power of Prolog. In Bull of the EATCS, 26, pages 21–23, 1985.Google Scholar
  20. 20.
    C. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.Google Scholar
  21. 21.
    R. Ramakrisnhan, D. Srivastava, and S. Sudanshan. CORAL — Control, Relations and Logic. In Proc. of 18th VLDB Conference, 1992.Google Scholar
  22. 22.
    D. Saccá. The Expressive Powers of Stable Models for Bound and Unbound Queries, this volume, 1994.Google Scholar
  23. 23.
    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.Google Scholar
  24. 24.
    J. S. Schlipf. The expressive power of the logic programming semantics. In Proc. of the Ninth ACM PODS Conference, pages 196–204, 1990.Google Scholar
  25. 25.
    J. S. Schlipf. A Survey of Complexity and Undecidability Results in Logic Programming. Work. Structural Compl. and Recursion-Theoretic Met. in L. P., 1993.Google Scholar
  26. 26.
    J. D. Ullman. Principles of Databases and Knowledge Base Systems, Vol. I and II. Computer Science Press, 1988.Google Scholar
  27. 27.
    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.CrossRefGoogle Scholar
  28. 28.
    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.Google Scholar
  29. 29.
    M. Vardi. The Complexity of Relational Query Languages. In Proceedings of the 14th ACM Symposium on Theory of Computing, pages 137–146, 1982.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Sergio Greco
    • 1
  • Domenico Saccá
    • 1
  • Carlo Zaniolo
    • 2
  1. 1.DEIS, Univ. della CalabriaRendeItaly
  2. 2.Computer Science Dept.Univ. of CaliforniaLos Angeles

Personalised recommendations