Rewriting Guarded Negation Queries

  • Vince Bárány
  • Michael Benedikt
  • Balder ten Cate
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8087)


The Guarded Negation Fragment (GNFO) is a fragment of first-order logic that contains all unions of conjunctive queries, a restricted form of negation that suffices for expressing some common uses of negation in SQL queries, and a large class of integrity constraints. At the same time, as was recently shown, the syntax of GNFO is restrictive enough so that static analysis problems such as query containment are still decidable. This suggests that, in spite of its expressive power, GNFO queries are amenable to novel optimizations. In this paper we provide further evidence for this, establishing that GNFO queries have distinctive features with respect to rewriting. Our results include effective preservation theorems for GNFO, Craig Interpolation and Beth Definability results, and the ability to express the certain answers of queries with respect to GNFO constraints within very restricted logics.


Modal Logic Free Variable Integrity Constraint Conjunctive Query Constant Symbol 
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. [AHV95]
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Add.-Wesley (1995)Google Scholar
  2. [AvBN98]
    Andréka, H., van Benthem, J., Németi, I.: Modal languages and bounded fragments of predicate logic. J. Phil. Logic 27, 217–274 (1998)CrossRefMATHGoogle Scholar
  3. [BCM+03]
    Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.): The description logic handbook. Cambridge University Press (2003)Google Scholar
  4. [BGO10]
    Bárány, V., Gottlob, G., Otto, M.: Querying the guarded fragment. In: LICS (2010)Google Scholar
  5. [BLM10]
    Baget, J.-F., Leclère, M., Mugnier, M.-L.: Walking the decidability line for rules with existential variables. In: KR (2010)Google Scholar
  6. [BMRT11a]
    Baget, J.-F., Mugnier, M.-L., Rudolph, S., Thomazo, M.: Complexity boundaries for generalized guarded existential rules (2011) Research Report LIRMM 11006Google Scholar
  7. [BMRT11b]
    Baget, J.-F., Mugnier, M.-L., Rudolph, S., Thomazo, M.: Walking the complexity lines for generalized guarded existential rules. In: IJCAI (2011)Google Scholar
  8. [BtCO12]
    Bárány, V., ten Cate, B., Otto, M.: Queries with guarded negation. In: VLDB (2012)Google Scholar
  9. [BtCS11]
    Bárány, V., ten Cate, B., Segoufin, L.: Guarded negation. In: Aceto, L., Henzinger, M., Sgall, J. (eds.) ICALP 2011, Part II. LNCS, vol. 6756, pp. 356–367. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  10. [CGL09]
    Calì, A., Gottlob, G., Lukasiewicz, T.: A general datalog-based framework for tractable query answering over ontologies. In: PODS (2009)Google Scholar
  11. [CK90]
    Chang, C.C., Keisler, J.: Model Theory. North-Holland (1990)Google Scholar
  12. [EF99]
    Ebbinghaus, H.-D., Flum, J.: Finite Model Theory. Springer (1999)Google Scholar
  13. [Fag82]
    Fagin, R.: Horn clauses and database dependencies. J. ACM 29(4), 952–985 (1982)MathSciNetCrossRefMATHGoogle Scholar
  14. [FKMP05]
    Fagin, R., Kolaitis, P.G., Miller, R.J., Popa, L.: Data exchange: Semantics and query answering. TCS 336(1), 89–124 (2005)MathSciNetCrossRefMATHGoogle Scholar
  15. [Fri76]
    Friedman, H.: The complexity of explicit definitions. AIM 20(1), 18–29 (1976)MATHGoogle Scholar
  16. [GLS03]
    Gottlob, G., Leone, N., Scarcello, F.: Robbers, marshals, and guards: game theoretic and logical characterizations of hypertree width. J. Comput. Syst. Sci. 66(4), 775–808 (2003)MathSciNetCrossRefMATHGoogle Scholar
  17. [HMO99]
    Hoogland, E., Marx, M., Otto, M.: Beth definability for the guarded fragment. In: Ganzinger, H., McAllester, D., Voronkov, A. (eds.) LPAR 1999. LNCS, vol. 1705, pp. 273–285. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  18. [Hoo00]
    Hoogland, E.: Definability and interpolation: model-theoretic investigations. PhD thesis, University of Amsterdam (2000)Google Scholar
  19. [Len02]
    Lenzerini, M.: Data integration: A theoretical perspective. In: PODS (2002)Google Scholar
  20. [Mar07]
    Marx, M.: Queries determined by views: pack your views. In: PODS (2007)Google Scholar
  21. [Mar11]
    Marnette, B.: Resolution and datalog rewriting under value invention and equality constraints. Technical report (2011),
  22. [NSV10]
    Nash, A., Segoufin, L., Vianu, V.: Views and queries: Determinacy and rewriting. ACM Trans. Database Syst. 35(3) (2010)Google Scholar
  23. [Ott04]
    Otto, M.: Modal and guarded characterisation theorems over finite transition systems. APAL 130, 173–205 (2004)MathSciNetMATHGoogle Scholar
  24. [Ros97]
    Rosen, E.: Modal logic over finite structures. JLLI 6(4), 427–439 (1997)CrossRefMATHGoogle Scholar
  25. [Ros08]
    Rossman, B.: Homomorphism preservation theorems. J. ACM 55(3) (2008)Google Scholar
  26. [tC05]
    ten Cate, B.: Interpolation for extended modal languages. JSL 70(1), 223–234 (2005)MATHGoogle Scholar
  27. [vB83]
    van Benthem, J.F.A.K.: Modal Logic and Classical Logic. Humanities Pr. (1983)Google Scholar
  28. [Yan81]
    Yannakakis, M.: Algorithms for acyclic database schemes. In: VLDB (1981)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Vince Bárány
    • 1
  • Michael Benedikt
    • 2
  • Balder ten Cate
    • 3
  1. 1.LogicBlox Inc.AtlantaUSA
  2. 2.Department of Computer ScienceUniversity of OxfordUK
  3. 3.Department of Computer ScienceUC-Santa CruzUSA

Personalised recommendations