Spatial Symmetry Driven Pruning Strategies for Efficient Declarative Spatial Reasoning

  • Carl SchultzEmail author
  • Mehul Bhatt
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9368)


Declarative spatial reasoning denotes the ability to (declaratively) specify and solve real-world problems related to geometric and qualitative spatial representation and reasoning within standard knowledge representation and reasoning (KR) based methods (e.g., logic programming and derivatives). One approach for encoding the semantics of spatial relations within a declarative programming framework is by systems of polynomial constraints. However, solving such constraints is computationally intractable in general (i.e. the theory of real-closed fields).

We present a new algorithm, implemented within the declarative spatial reasoning system CLP(QS), that drastically improves the performance of deciding the consistency of spatial constraint graphs over conventional polynomial encodings. We develop pruning strategies founded on spatial symmetries that form equivalence classes (based on affine transformations) at the qualitative spatial level. Moreover, pruning strategies are themselves formalised as knowledge about the properties of space and spatial symmetries. We evaluate our algorithm using a range of benchmarks in the class of contact problems, and proofs in mereology and geometry. The empirical results show that CLP(QS) with knowledge-based spatial pruning outperforms conventional polynomial encodings by orders of magnitude, and can thus be applied to problems that are otherwise unsolvable in practice.


Declarative spatial reasoning Geometric reasoning Logic programming Knowledge representation and reasoning 


  1. 1.
    Aiello, M., Pratt-Hartmann, I.E., van Benthem, J.F.: Handbook of Spatial Logics. Springer-Verlag New York Inc., Secaucus (2007). ISBN 978-1-4020-5586-7CrossRefzbMATHGoogle Scholar
  2. 2.
    Arnon, D.S., Collins, G.E., McCallum, S.: Cylindrical algebraic decomposition I: the basic algorithm. SIAM J. Comput. 13(4), 865–877 (1984)CrossRefMathSciNetzbMATHGoogle Scholar
  3. 3.
    Bhatt, M., Wallgrün, J.O.: Geospatial narratives and their spatio-temporal dynamics: Commonsense reasoning for high-level analyses in geographic information systems. ISPRS Int. J. Geo-Information 3(1), 166–205 (2014). doi: 10.3390/ijgi3010166. CrossRefGoogle Scholar
  4. 4.
    Bhatt, M., Lee, J.H., Schultz, C.: CLP(QS): a declarative spatial reasoning framework. In: Egenhofer, M., Giudice, N., Moratz, R., Worboys, M. (eds.) COSIT 2011. LNCS, vol. 6899, pp. 210–230. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  5. 5.
    Bhatt, M., Schultz, C., Freksa, C.: The ‘Space’ in spatial assistance systems: conception, formalisation and computation. In: Tenbrink, T., Wiener, J., Claramunt, C. (eds.) Representing space in cognition: Interrelations of behavior, language, and formal models. Series: Explorations in Language and Space. Oxford University Press (2013). 978-0-19-967991-1Google Scholar
  6. 6.
    Bhatt, M., Suchan, J., Schultz, C.: Cognitive interpretation of everyday activities - toward perceptual narrative based visuo-spatial scene interpretation. In: Finlayson, M., Fisseni, B., Loewe, B., Meister, J.C. (eds.) Computational Models of Narrative (CMN) 2013, a satellite workshop of CogSci 2013: The 35th meeting of the Cognitive Science Society., Dagstuhl, Germany, OpenAccess Series in Informatics (OASIcs) (2013)Google Scholar
  7. 7.
    Bhatt, M., Schultz, C.P.L., Thosar, M.: Computing narratives of cognitive user experience for building design analysis: KR for industry scale computer-aided architecture design. In: Baral, C., Giacomo, G.D., Eiter, T. (eds.) Principles of Knowledge Representation and Reasoning: Proceedings of the Fourteenth International Conference, KR 2014, Vienna, Austria, 20–24 July, 2014. AAAI Press (2014). ISBN 978-1-57735-657-8Google Scholar
  8. 8.
    Borgo, S.: Spheres, cubes and simplexes in mereogeometry. Logic Logical Philos. 22(3), 255–293 (2013)zbMATHGoogle Scholar
  9. 9.
    Bouhineau, D.: Solving geometrical constraint systems using CLP based on linear constraint solver. In: Pfalzgraf, J., Calmet, J., Campbell, J. (eds.) AISMC 1996. LNCS, vol. 1138, pp. 274–288. Springer, Heidelberg (1996) CrossRefGoogle Scholar
  10. 10.
    Bouhineau, D., Trilling, L., Cohen, J.: An application of CLP: Checking the correctness of theorems in geometry. Constraints 4(4), 383–405 (1999)CrossRefMathSciNetzbMATHGoogle Scholar
  11. 11.
    Buchberger, B.: Bruno Buchberger’s PhD thesis 1965: an algorithm for finding the basis elements of the residue class ring of a zero dimensional polynomial ideal (English translation). J. Symbolic Comput. 41(3), 475–511 (2006)CrossRefMathSciNetzbMATHGoogle Scholar
  12. 12.
    Chou, S.-C.: Mechanical Geometry Theorem Proving, vol. 41. Springer Science and Business Media, Dordrecht (1988) zbMATHGoogle Scholar
  13. 13.
    Collins, G.E.: Quantifier elimination for real closed fields by cylindrical algebraic decompostion. In: Brakhage, H. (ed.) GI-Fachtagung 1975. LNCS, vol. 33, pp. 134–183. Springer, Heidelberg (1975) Google Scholar
  14. 14.
    Collins, G.E., Hong, H.: Partial cylindrical algebraic decomposition for quantifier elimination. J. Symbolic Comput. 12(3), 299–328 (1991). ISSN 0747–7171CrossRefMathSciNetzbMATHGoogle Scholar
  15. 15.
    Dolzmann, A., Seidl, A., Sturm, T.: REDLOG User Manual, Edition 3.0, Apr 2004Google Scholar
  16. 16.
    Gantner, Z., Westphal, M., Wölfl, S.: GQR-A fast reasoner for binary qualitative constraint calculi. In: Proceedings of AAAI, vol. 8 (2008)Google Scholar
  17. 17.
    Hadas, N., Hershkowitz, R., Schwarz, B.B.: The role of contradiction and uncertainty in promoting the need to prove in dynamic geometry environments. Educ. Stud. Mathe. 44(1–2), 127–150 (2000)CrossRefGoogle Scholar
  18. 18.
    Haunold, P., Grumbach, S., Kuper, G., Lacroix, Z.: Linear constraints: Geometric objects represented by inequalitiesl. In: Frank, A.U. (ed.) COSIT 1997. LNCS, vol. 1329, pp. 429–440. Springer, Heidelberg (1997) CrossRefGoogle Scholar
  19. 19.
    Jaffar, J., Maher, M.J.: Constraint logic programming: A survey. J. Logic Prog. 19, 503–581 (1994)CrossRefMathSciNetGoogle Scholar
  20. 20.
    Kanellakis, P.C., Kuper, G.M., Revesz, P.Z.: Constraint query languages. In: Rosenkrantz, D.J., Sagiv, Y. (eds.) Proceedings of the Ninth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, Nashville, Tennessee, USA, 2–4 April, 1990, pp. 299–313. ACM Press (1990). ISBN 0-89791-352-3Google Scholar
  21. 21.
    Kapur, D., Mundy, J.L. (eds.): Geometric Reasoning. MIT Press, Cambridge (1988). ISBN 0-262-61058-2 zbMATHGoogle Scholar
  22. 22.
    Ladkin, P.B., Maddux, R.D.: On binary constraint problems. J. ACM (JACM) 41(3), 435–469 (1994)CrossRefMathSciNetzbMATHGoogle Scholar
  23. 23.
    Lee, J.H.: The complexity of reasoning with relative directions. In: 21st European Conference on Artificial Intelligence (ECAI 2014) (2014)Google Scholar
  24. 24.
    Ligozat, G.: Qualitative Spatial and Temporal Reasoning. Wiley-ISTE, Hoboken (2011)zbMATHGoogle Scholar
  25. 25.
    Ligozat, G.F.: Qualitative triangulation for spatial reasoning. In: Campari, I., Frank, A.U. (eds.) COSIT 1993. LNCS, vol. 716, pp. 54–68. Springer, Heidelberg (1993) Google Scholar
  26. 26.
    Martin, G.E.: Transformation geometry: An introduction to symmetry. Springer, New York (1982)CrossRefzbMATHGoogle Scholar
  27. 27.
    Owen, J.C.: Algebraic solution for geometry from dimensional constraints. In: Proceedings of the First ACM Symposium on Solid Modeling Foundations and CAD/CAM Applications, pp. 397–407. ACM (1991)Google Scholar
  28. 28.
    Pesant, G., Boyer, M.: QUAD-CLP (R): Adding the power of quadratic constraints. In: Borning, A. (ed.) PPCP 1994. LNCS, vol. 874, pp. 95–108. Springer, Heidelberg (1994) CrossRefGoogle Scholar
  29. 29.
    Pesant, G., Boyer, M.: Reasoning about solids using constraint logic programming. J. Automated Reasoning 22(3), 241–262 (1999)CrossRefzbMATHGoogle Scholar
  30. 30.
    Randell, D.A., Cohn, A.G., Cui Z.: Computing transitivity tables: A challenge for automated theorem provers. In 11th International Conference on Automated Deduction (CADE-11), pp. 786–790 (1992)Google Scholar
  31. 31.
    Ratschan, S.: Approximate quantified constraint solving by cylindrical box decomposition. Reliable Comput. 8(1), 21–42 (2002)CrossRefMathSciNetzbMATHGoogle Scholar
  32. 32.
    Ratschan, S.: Efficient solving of quantified inequality constraints over the real numbers. ACM Trans. Comput. Logic (TOCL) 7(4), 723–748 (2006)CrossRefMathSciNetGoogle Scholar
  33. 33.
    Schultz, C., Bhatt, M.: Towards a declarative spatial reasoning system. In: 20th European Conference on Artificial Intelligence (ECAI 2012) (2012)Google Scholar
  34. 34.
    Schultz, C., Bhatt, M.: Declarative spatial reasoning with boolean combinations of axis-aligned rectangular polytopes. In: ECAI 2014–21st European Conference on Artificial Intelligence, pp. 795–800 (2014)Google Scholar
  35. 35.
    Schultz, C., Bhatt, M., Borrmann, A.: Bridging qualitative spatial constraints and parametric design - a use case with visibility constraints. In: EG-ICE: 21st International Workshop - Intelligent Computing in Engineering 2014 (2014)Google Scholar
  36. 36.
    Tarski, A.: A general theorem concerning primitive notions of Euclidean geometry. Indagationes Mathematicae 18(468), 74 (1956)Google Scholar
  37. 37.
    Varzi, A.C.: Parts, wholes, and part-whole relations: The prospects of mereotopology. Data Knowl. Eng. 20(3), 259–286 (1996)CrossRefzbMATHGoogle Scholar
  38. 38.
    Walega, P., Bhatt, M., Schultz, C.: ASPMT(QS): non-monotonic spatial reasoning with answer set programming modulo theories. In: LPNMR: Logic Programming and Nonmonotonic Reasoning - 13th International Conference (2015).
  39. 39.
    Wallgrün, J.O., Frommberger, L., Wolter, D., Dylla, F., Freksa, C.: Qualitative spatial representation and reasoning in the SparQ-Toolbox. In: Barkowsky, T., Knauff, M., Ligozat, G., Montello, D.R. (eds.) Spatial Cognition 2007. LNCS (LNAI), vol. 4387, pp. 39–58. Springer, Heidelberg (2007) CrossRefGoogle Scholar
  40. 40.
    Wenjun, W.: Basic principles of mechanical theorem proving in elementary geometries. J. Syst. Sci. Math. Sci. 4(3), 207–235 (1984)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Institute for GeoinformaticsUniversity of MünsterMünsterGermany
  2. 2.Department of Computer ScienceUniversity of BremenBremenGermany
  3. 3.The DesignSpace GroupBremenGermany

Personalised recommendations