# Non-determinism and weak constraints in Datalog

- 31 Downloads
- 2 Citations

## 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, called*choice*, and a weak form of constraints, called*preference 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 construct*choice* permits to express, exactly, the ‘deterministic fragment’ of the class of DB-queries*P*, under the non-deterministic semantics,*NP*, under the possible semantics, and co*NP*, under the certain semantics. The introduction of preference rules, further increases the expressive power of the language, and permits to express the complexity classes Σ _{2} ^{ p } , under the possibility semantics, and Π _{2} ^{ p } , under the certainty semantics.

## Keywords

Logic Programming Datalog Expressive Power Data Complexity Nondeterminism## Preview

Unable to display preview. Download preview PDF.

## References

- 1).Abiteboul, S., Simon, E., and Vianu, V., “Non-Deterministic Language to Compute Deterministic Transformation,” in
*Proc. of the Ninth ACM Symposium on Principles of Database Systems*, pp. 218–229, 1990.Google Scholar - 2).Abiteboul, S. and Vianu, V., “Datalog Extensions for Databases Queries and Updates,”
*Journal of Computer and System Science, 43, 1*, pp. 62–124, 1991.MATHCrossRefMathSciNetGoogle Scholar - 3).Abiteboul, S., Hull, R., and Vianu, V.,
*Foundations of Databases*, Addison-Wesley, 1994.Google Scholar - 4).Afrati, F., Cosmadakis, S.S., and Yannakakis, M., “On Datalog vs. Polynomial Time,” in
*Proc. of the Tenth ACM Symposium on Principles of Database Systems*, pp. 13–25, 1991.Google Scholar - 5).Apt, C., Blair, H., and Walker, A., “Towards a Theory of Declarative Knowledge,” in
*Proc. Workshop on Found. of Deductive Database and Logic Programming*(Minker, ed.), pp. 89–149, 1988.Google Scholar - 6).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.MATHCrossRefMathSciNetGoogle Scholar - 7).Chandra, A. and Harel, D., “Structures and Complexity of Relational Queries,”
*Journal of Computer and System Science, 25*, pp. 99–128, 1982.MATHCrossRefGoogle Scholar - 8).Dung, P., “Negation as Hypotheses: An Abductive Foundation for Logic Programming,” in
*Proc. 8th Conf. on Logic Programming*, pp. 3–17, 1991.Google Scholar - 9).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.Google Scholar - 10).Fagin, R., “Generalized First-Order Spectra and Polynomial-Time Recognizable Sets,” in
*Complexity of Computation*(R. Karp, ed.),*SIAM-AMS Proc., 7*, pp. 43–73, 1974.Google Scholar - 11).Gelfond, M. and Lifschitz, V., “The Stable Model Semantics of Logic Programming,” in
*Proc. of the Fifth Int. Conference on Logic Programming*, pp. 1070–1080, 1988.Google Scholar - 12).Giannotti, F., Pedreschi, D., Saccà, D., and Zaniolo, C., “Nondeterminism in Deductive Databases,” in
*Proc. 2nd Int. Conference on Deductive and Object-Oriented Databases*, pp. 129–146, 1991.Google Scholar - 13).Greco, S., Zaniolo, C., and Ganguly, S., “Greedy by Choice,” in
*Proc. of the Eleventh ACM Symposium on Principles of Database Systems*, pp. 105–163, 1992.Google Scholar - 14).Greco, S., Saccà, D., and Zaniolo, C., “DATALOG Queries with Stratified Negation and Choice: from
*P*to*D*^{P},” in*Proc. of the Fifth Int. Conference on Database Theory*, pp. 82–96, 1995.Google Scholar - 15).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.MATHCrossRefMathSciNetGoogle Scholar - 16).Immerman, N., “Languages that Capture Complexity Classes,” in
*SIAM Journal of Computing, 16, 4*, pp. 760–778, 1987.Google Scholar - 17).Johnson, D.S., “A Catalog of Complexity Classes,” in
*Handbook of Theoretical Computer Science, Vol. A*(J. Leewen, ed.), North-Holland, pp. 67–161, 1990.Google Scholar - 18).Kanellakis, P.C., “Elements of Relational Databases Theory,” in
*Handbook of Theoretical Computer Science, Vol B*(J. Leewen, ed.), North-Holland, pp. 1075–1155, 1990.Google Scholar - 19).Kolaitis. P., “The Expressive Power of Stratified Logic Programs,”
*Information and Computation, 90*, pp. 50–66, 1990.Google Scholar - 20).Kolaitis, P. and Papadimitriou, C., “Why Not Negation by Fixpoint,”
*Journal of Computer and System Science, 43, 1*, pp. 125–144, 1991.MATHCrossRefMathSciNetGoogle Scholar - 21).Krishnamurthy, R. and Naqvi, S., “Non-Deterministic Choice in Datalog,” in
*Proc. of the Seventh ACM Symposium on Principles of Database Systems*, 1988.Google Scholar - 22).Lloyd, J.W.,
*Foundations of Logic Programming*, Springer-Verlag, Berlin, 1987.MATHGoogle Scholar - 23).Marek, W. and Truszczynski, M., “Autoepistemic Logic,”
*Journal of ACM, 38, 3*, pp. 588–619, 1991.MATHCrossRefMathSciNetGoogle Scholar - 24).Naqvi, S. and Tsur, S.,
*A Logic Language for Data and Knowledge Bases*, Computer Science Press, 1989.Google Scholar - 25).Papadimitriou, C., “A Note on the Expressive Power of Prolog,” in
*Bull of the EATCS, 26*, pp. 21–23, 1985.Google Scholar - 26).Papadimitriou, C.,
*Computational Complexity*, Addison-Wesley, 1994.Google Scholar - 27).Przymusinski T.C., “Well-Founded Semantics Coincides with Three-Valued Stable Semantics,”
*Foundamenta Informaticae, 13*, pp. 445–463, 1990.MATHMathSciNetGoogle Scholar - 28).Ramakrisnhan, R., Srivastava, D., and Sudanshan, S., “CORAL — Control, Relations and Logic,” in
*Proc. of 18th Int. Conference on Very Large Data Bases*, 1992.Google Scholar - 29).Saccà, D. and Zaniolo, C., “Stable Models and Non-Determinism in Logic Programs with Negation,” in
*Proc. of the Ninth ACM Symposium on principles of Database Systems*, pp. 205–217, 1990.Google Scholar - 30).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.MATHCrossRefGoogle Scholar - 31).Schlipf, J.S., “The Expressive Powers of the Logic Programming Semantics,”
*Journal of Computer and System Science, 51, 1*, pp. 64–86, 1995.MATHCrossRefMathSciNetGoogle Scholar - 32).Ullman, J.D.,
*Principles of Databases and Knowledge Base Systems*, Computer Science Press, 1988..Google Scholar - 33).Van Gelder, A., “Negation as Failure Using Tight Derivations for General Logic Programs,”
*Journal of Logic Programming, 6, 1*, pp. 109–133, 1989.MATHCrossRefMathSciNetGoogle Scholar - 34).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.MATHGoogle Scholar - 35).Vardi, M., “The Complexity of Relational Query Languages,” in
*Proc. of the 14th ACM Symposium on. Theory of Computing*, pp. 137–146, 1982.Google Scholar - 36).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.CrossRefMathSciNetGoogle Scholar