A Decision Procedure for Sets, Binary Relations and Partial Functions

  • Maximiliano CristiáEmail author
  • Gianfranco Rossi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9779)


In this paper we present a decision procedure for sets, binary relations and partial functions. The language accepted by the decision procedure includes untyped, hereditarily finite sets, where some of their elements can be variables, and basically all the classic set and relational operators used in formal languages such as B and Z. Partial functions are encoded as binary relations which in turn are just sets of ordered pairs. Sets are first-class entities in the language, thus they are not encoded in lower level theories. The decision procedure exploits set unification and set constraint solving as primitive features. The procedure is proved to be sound, complete and terminating. A Prolog implementation is presented.



We would like to thank the reviewers, and specially the reviewer acting as our shepherd, for helping us to improve this paper. The work of M. Cristiá was partially supported by ANPCyT PICT 2014–2200.


  1. 1.
    Dovier, A., Piazza, C., Pontelli, E., Rossi, G.: Sets and constraint logic programming. ACM Trans. Program. Lang. Syst. 22(5), 861–931 (2000)CrossRefGoogle Scholar
  2. 2.
    Cristiá, M., Rossi, G., Frydman, C.: \(\{log\}\) as a test case generator for the test template framework. In: Hierons, R.M., Merayo, M.G., Bravetti, M. (eds.) SEFM 2013. LNCS, vol. 8137, pp. 229–243. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  3. 3.
    Cristiá, M., Rossi, G., Frydman, C.S.: Adding partial functions to constraint logic programming with sets. TPLP 15(4–5), 651–665 (2015)MathSciNetGoogle Scholar
  4. 4.
    Rossi, G., Cristiá, M.: \(\{log\}\). Accessed 2016
  5. 5.
    Dovier, A., Policriti, A., Rossi, G.: A uniform axiomatic view of lists, multisets, and sets, and the relevant unification algorithms. Fundam. Inform. 36(2–3), 201–234 (1998)MathSciNetzbMATHGoogle Scholar
  6. 6.
    Abrial, J.R.: The B-Book: Assigning Programs to Meanings. Cambridge University Press, New York (1996)CrossRefzbMATHGoogle Scholar
  7. 7.
    Spivey, J.M.: The Z Notation: A Reference Manual. Prentice Hall International (UK) Ltd., Hertfordshire (1992)zbMATHGoogle Scholar
  8. 8.
    Cristiá, M., Rossi, G.: Proofs for a decision procedure for binary relations. Accessed 2016
  9. 9.
    Dovier, A., Pontelli, E., Rossi, G.: Set unification. TPLP 6(6), 645–701 (2006)MathSciNetzbMATHGoogle Scholar
  10. 10.
    Stocks, P., Carrington, D.: A framework for specification-based testing. IEEE Trans. Softw. Eng. 22(11), 777–793 (1996)CrossRefGoogle Scholar
  11. 11.
    Cantone, D., Omodeo, E.G., Policriti, A.: Set Theory for Computing - From Decision Procedures to Declarative Programming with Sets. Monographs in Computer Science. Springer, New York (2001)zbMATHGoogle Scholar
  12. 12.
    Calvanese, D., De Giacomo, G.: Expressive description logics. In: Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.) The Description Logic Handbook: Theory, Implementation, and Applications, pp. 178–218. Cambridge University Press, Cambridge (2003)Google Scholar
  13. 13.
    Cantone, D., Schwartz, J.T.: Decision procedures for elementary sublanguages of set theory: XI. Multilevel syllogistic extended by some elementary map constructs. J. Autom. Reason. 7(2), 231–256 (1991)MathSciNetzbMATHGoogle Scholar
  14. 14.
    Zarba, C.G., Cantone, D., Schwartz, J.T.: A decision procedure for a sublanguage of set theory involving monotone, additive, and multiplicative functions, I: the two-level case. J. Autom. Reason. 33(3–4), 251–269 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Cantone, D., Zarba, C.G., Cannata, R.R.: A tableau-based decision procedure for a fragment of set theory with iterated membership. J. Autom. Reason. 34(1), 49–72 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Marnette, B., Kuncak, V., Rinard, M.: Polynomial constraints for sets with cardinality bounds. In: Seidl, H. (ed.) FOSSACS 2007. LNCS, vol. 4423, pp. 258–273. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  17. 17.
    Azevedo, F.: Cardinal: a finite sets constraint solver. Constraints 12(1), 93–129 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Gervet, C.: Interval propagation to reason about sets: definition and implementation of a practical language. Constraints 1(3), 191–244 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Hawkins, P., Lagoon, V., Stuckey, P.J.: Solving set constraint satisfaction problems using ROBDDs. J. Artif. Intell. Res. (JAIR) 24, 109–156 (2005)CrossRefzbMATHGoogle Scholar
  20. 20.
    Deville, Y., Dooms, G., Zampelli, S., Dupont, P.: CP (graph+map) for approximate graph matching. In: 1st International Workshop on Constraint Programming Beyond Finite Integer Domains, pp. 31–47 (2005)Google Scholar
  21. 21.
    Coq Development Team: The Coq Proof Assistant Reference Manual, Version 8.4pl6. LogiCal Project, Palaiseau, France (2014)Google Scholar
  22. 22.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL - A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  23. 23.
    Saaltink, M.: The Z/EVES system. In: Till, D., Bowen, J.P., Hinchey, M.G. (eds.) ZUM 1997. LNCS, vol. 1212, pp. 72–85. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  24. 24.
    Kröning, D., Rümmer, P., Weissenbacher, G.: A proposal for a theory of finite sets, lists, and maps for the SMT-Lib standard. In: Informal Proceedings of the 7th International Workshop on Satisfiability Modulo Theories at CADE 22 (2009)Google Scholar
  25. 25.
    de Moura, L.M., Bjørner, N.: Generalized, efficient array decision procedures. In: Proceedings of 9th International Conference on Formal Methods in Computer-Aided Design, FMCAD 2009, Austin, Texas, USA, 15–18 November 2009, pp. 45–52. IEEE (2009)Google Scholar
  26. 26.
    Déharbe, D., Fontaine, P., Guyot, Y., Voisin, L.: Integrating SMT solvers in Rodin. Sci. Comput. Program. 94, 130–143 (2014)CrossRefGoogle Scholar
  27. 27.
    Mentré, D., Marché, C., Filliâtre, J.-C., Asuka, M.: Discharging proof obligations from atelier B using multiple automated provers. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 238–251. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  28. 28.
    Jackson, D.: Software Abstractions: Logic, Language, and Analysis. The MIT Press, Cambridge (2006)Google Scholar
  29. 29.
    Dal Palú, A., Dovier, A., Pontelli, E., Rossi, G.: Integrating finite domain constraints and CLP with sets. In: Proceedings of the 5th ACM SIGPLAN International Conference on Principles and Practice of Declaritive Programming, PPDP 2003, pp. 219–229. ACM, New York (2003)Google Scholar
  30. 30.
    Zarba, C.G.: Combining sets with cardinals. J. Autom. Reason. 34(1), 1–29 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  31. 31.
    Yessenov, K., Piskac, R., Kuncak, V.: Collections, cardinalities, and relations. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 380–395. Springer, Heidelberg (2010)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.CIFASIS-UNRRosarioArgentina
  2. 2.LSIS-AMUMarseilleFrance
  3. 3.Università degli Studi di ParmaParmaItaly

Personalised recommendations