Abstract
This paper introduces a simple and powerful extension of stratified DATALOG which permits to express various DB-complexity classes. The new language, called DATALOG¬s,c,p, extends DATALOG with stratified negation, a non-deterministic construct, calledchoice, and a weak form of constraints, calledpreference rules, that is, constraints that should be respected but, if they cannot be eventually enforced, they only invalidate the portions of the program which they are concerned with. Although DATALOG with stratified negation is not able to express all polynomial time queries,20) the introduction of the non-deterministic constructchoice permits to express, exactly, the ‘deterministic fragment’ of the class of DB-queriesP, under the non-deterministic semantics,NP, under the possible semantics, and coNP, under the certain semantics. The introduction of preference rules, further increases the expressive power of the language, and permits to express the complexity classes Σ p2 , under the possibility semantics, and Π p2 , under the certainty semantics.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Abiteboul, S., Simon, E., and Vianu, V., “Non-Deterministic Language to Compute Deterministic Transformation,” inProc. of the Ninth ACM Symposium on Principles of Database Systems, pp. 218–229, 1990.
Abiteboul, S. and Vianu, V., “Datalog Extensions for Databases Queries and Updates,”Journal of Computer and System Science, 43, 1, pp. 62–124, 1991.
Abiteboul, S., Hull, R., and Vianu, V.,Foundations of Databases, Addison-Wesley, 1994.
Afrati, F., Cosmadakis, S.S., and Yannakakis, M., “On Datalog vs. Polynomial Time,” inProc. of the Tenth ACM Symposium on Principles of Database Systems, pp. 13–25, 1991.
Apt, C., Blair, H., and Walker, A., “Towards a Theory of Declarative Knowledge,” inProc. Workshop on Found. of Deductive Database and Logic Programming (Minker, ed.), pp. 89–149, 1988.
Baral, V. and Subrahmanian, V.S., “Stable and Extension Class Theory for Logic Programs and Default Logic,”Journal of Automated Reasoning, 8, pp. 345–366, 1992.
Chandra, A. and Harel, D., “Structures and Complexity of Relational Queries,”Journal of Computer and System Science, 25, pp. 99–128, 1982.
Dung, P., “Negation as Hypotheses: An Abductive Foundation for Logic Programming,” inProc. 8th Conf. on Logic Programming, pp. 3–17, 1991.
Eiter, T., Gottlob, G., and Manila, H., “Expressive Power and Complexity of Disjunctive Datalog,”Proc. ACM Symp. on Principles of Database Systems, pp. 267–278, 1994.
Fagin, R., “Generalized First-Order Spectra and Polynomial-Time Recognizable Sets,” inComplexity of Computation (R. Karp, ed.),SIAM-AMS Proc., 7, pp. 43–73, 1974.
Gelfond, M. and Lifschitz, V., “The Stable Model Semantics of Logic Programming,” inProc. of the Fifth Int. Conference on Logic Programming, pp. 1070–1080, 1988.
Giannotti, F., Pedreschi, D., Saccà, D., and Zaniolo, C., “Nondeterminism in Deductive Databases,” inProc. 2nd Int. Conference on Deductive and Object-Oriented Databases, pp. 129–146, 1991.
Greco, S., Zaniolo, C., and Ganguly, S., “Greedy by Choice,” inProc. of the Eleventh ACM Symposium on Principles of Database Systems, pp. 105–163, 1992.
Greco, S., Saccà, D., and Zaniolo, C., “DATALOG Queries with Stratified Negation and Choice: fromP toD P,” inProc. of the Fifth Int. Conference on Database Theory, pp. 82–96, 1995.
Greco S. and Saccà, D., “Possible is Certain: Is Desiderable and Can be Expressive”,Annals of Mathematics and Artificial Intelligence, 19, pp. 147–168, 1997.
Immerman, N., “Languages that Capture Complexity Classes,” inSIAM Journal of Computing, 16, 4, pp. 760–778, 1987.
Johnson, D.S., “A Catalog of Complexity Classes,” inHandbook of Theoretical Computer Science, Vol. A (J. Leewen, ed.), North-Holland, pp. 67–161, 1990.
Kanellakis, P.C., “Elements of Relational Databases Theory,” inHandbook of Theoretical Computer Science, Vol B (J. Leewen, ed.), North-Holland, pp. 1075–1155, 1990.
Kolaitis. P., “The Expressive Power of Stratified Logic Programs,”Information and Computation, 90, pp. 50–66, 1990.
Kolaitis, P. and Papadimitriou, C., “Why Not Negation by Fixpoint,”Journal of Computer and System Science, 43, 1, pp. 125–144, 1991.
Krishnamurthy, R. and Naqvi, S., “Non-Deterministic Choice in Datalog,” inProc. of the Seventh ACM Symposium on Principles of Database Systems, 1988.
Lloyd, J.W.,Foundations of Logic Programming, Springer-Verlag, Berlin, 1987.
Marek, W. and Truszczynski, M., “Autoepistemic Logic,”Journal of ACM, 38, 3, pp. 588–619, 1991.
Naqvi, S. and Tsur, S.,A Logic Language for Data and Knowledge Bases, Computer Science Press, 1989.
Papadimitriou, C., “A Note on the Expressive Power of Prolog,” inBull of the EATCS, 26, pp. 21–23, 1985.
Papadimitriou, C.,Computational Complexity, Addison-Wesley, 1994.
Przymusinski T.C., “Well-Founded Semantics Coincides with Three-Valued Stable Semantics,”Foundamenta Informaticae, 13, pp. 445–463, 1990.
Ramakrisnhan, R., Srivastava, D., and Sudanshan, S., “CORAL — Control, Relations and Logic,” inProc. of 18th Int. Conference on Very Large Data Bases, 1992.
Saccà, D. and Zaniolo, C., “Stable Models and Non-Determinism in Logic Programs with Negation,” inProc. of the Ninth ACM Symposium on principles of Database Systems, pp. 205–217, 1990.
Saccà, D., “The Expressive Powers of Stable Models for Bound and Unbound DATALOG Queries,”Journal of Computer and System Science, 54, 3, pp 441–464, June 1997.
Schlipf, J.S., “The Expressive Powers of the Logic Programming Semantics,”Journal of Computer and System Science, 51, 1, pp. 64–86, 1995.
Ullman, J.D.,Principles of Databases and Knowledge Base Systems, Computer Science Press, 1988..
Van Gelder, A., “Negation as Failure Using Tight Derivations for General Logic Programs,”Journal of Logic Programming, 6, 1, pp. 109–133, 1989.
Van Gelder, A., Ross, K.A. and Schlipf, J.S., “The Well-Founded Semantics for General Logic Programs,”Journal of ACM, 38, 3, pp. 620–650, 1991.
Vardi, M., “The Complexity of Relational Query Languages,” inProc. of the 14th ACM Symposium on. Theory of Computing, pp. 137–146, 1982.
You, J. and Yuan, L.Y., “A Three-Valued Semantics for Deductive Databases and Logic Programming,”Journal of Computer and System Science, 19, pp. 334–361, 1994.
Author information
Authors and Affiliations
Additional information
Sergio Greco: He is associate professor at University of Calabria (Italy); he was visiting researcher at the Microelectronics and Computer Technology (MCC) in Austin, Texas between 1990 and 1991 and at the University of California of Los Angeles in 1991 and 1996. Before to join University of Calabria he was with CRAI (Italy). His research interests are focused on deductive databases, logic programming and non-monotonic reasoning. In particular, his activity research focus on the computational aspects of deductive languages and on their extension to incorporate object orientation and non-monotonic constructs.
About this article
Cite this article
Greco, S. Non-determinism and weak constraints in Datalog. New Gener Comput 16, 373–395 (1998). https://doi.org/10.1007/BF03037430
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF03037430