Decision Procedures for Multisets with Cardinality Constraints

  • Ruzica Piskac
  • Viktor Kuncak
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4905)


Applications in software verification and interactive theorem proving often involve reasoning about sets of objects. Cardinality constraints on such collections also arise in these scenarios. Multisets arise for analogous reasons as sets: abstracting the content of linked data structure with duplicate elements leads to multisets. Interactive theorem provers such as Isabelle specify theories of multisets and prove a number of theorems about them to enable their use in interactive verification. However, the decidability and complexity of constraints on multisets is much less understood than for constraints on sets.

The first contribution of this paper is a polynomial-space algorithm for deciding expressive quantifier-free constraints on multisets with cardinality operators. Our decision procedure reduces in polynomial time constraints on multisets to constraints in an extension of quantifierfree Presburger arithmetic with certain “unbounded sum” expressions. We prove bounds on solutions of resulting constraints and describe a polynomial-space decision procedure for these constraints.

The second contribution of this paper is a proof that adding quantifiers to a constraint language containing subset and cardinality operators yields undecidable constraints. The result follows by reduction from Hilbert’s 10th problem.


Decision Procedure Cardinality Constraint Satisfying Assignment Linear Arithmetic Presburger Arithmetic 
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. 1.
    Aiken, A.: Introduction to set constraint-based program analysis. Science of Computer Programming 35, 79–111 (1999)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Banâtre, J.-P., Le Métayer, D.: Programming by multiset transformation. Commun. ACM 36(1), 98–111 (1993)CrossRefGoogle Scholar
  3. 3.
    Bès, A.: Definability and decidability results related to the elementary theory of ordinal multiplication. Fund. Math. 171, 197–211 (2002)zbMATHMathSciNetCrossRefGoogle Scholar
  4. 4.
    Domenjoud, E.: Solving systems of linear diophantine equations: An algebraic approach. In: MFCS, pp. 141–150 (1991)Google Scholar
  5. 5.
    Durand, A., Hermann, M., Kolaitis, P.G.: Subtractive reductions and complete problems for counting complexity classes. Theor. Comput. Sci. 340(3), 496–513 (2005)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Eisenbrand, F., Shmonin, G.: Carathéodory bounds for integer cones. Operations Research Letters 34(5), 564–568 (2006)CrossRefMathSciNetzbMATHGoogle Scholar
  7. 7.
    Feferman, S., Vaught, R.L.: The first order properties of products of algebraic systems. Fundamenta Mathematicae 47, 57–103 (1959)zbMATHMathSciNetGoogle Scholar
  8. 8.
    Ginsburg, S., Spanier, E.: Semigroups, Pressburger formulas and languages. Pacific Journal of Mathematics 16(2), 285–296 (1966)zbMATHMathSciNetGoogle Scholar
  9. 9.
    Kuncak, V.: Modular Data Structure Verification. PhD thesis, EECS Department, Massachusetts Institute of Technology (February 2007)Google Scholar
  10. 10.
    Kuncak, V., Nguyen, H.H., Rinard, M.: Deciding Boolean Algebra with Presburger Arithmetic. J. of Automated Reasoning (2006)Google Scholar
  11. 11.
    Kuncak, V., Rinard, M.: On the theory of structural subtyping. Technical Report 879, LCS, Massachusetts Institute of Technology (2003)Google Scholar
  12. 12.
    Kuncak, V., Rinard, M.: Towards efficient satisfiability checking for Boolean Algebra with Presburger Arithmetic. In: CADE-21 (2007)Google Scholar
  13. 13.
    Lugiez, D.: Multitree automata that count. Theor. Comput. Sci. 333(1-2), 225–263 (2005)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Lugiez, D., Zilio, S.D.: Multitrees Automata, Presburger’s Constraints and Tree Logics. Research report 08-2002, LIF, Marseille, France (June 2002),
  15. 15.
    Marnette, B., Kuncak, V., Rinard, M.: On algorithms and complexity for sets with cardinality constraints. Technical report, MIT CSAIL (August 2005)Google Scholar
  16. 16.
    Matiyasevich, Y.V.: Enumerable sets are Diophantine. Soviet Math. Doklady 11(2), 354–357 (1970)zbMATHGoogle Scholar
  17. 17.
    Misra, J.: A logic for concurrent programming (in two parts): Safety and progress. Journal of Computer and Software Engineering 3(2), 239–300 (1995)Google Scholar
  18. 18.
    Nguyen, H.H., et al.: Automated verification of shape, size and bag properties via separation logic. In: VMCAI (2007)Google Scholar
  19. 19.
    Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  20. 20.
    Nipkow, T., et al.: Multiset theory version 1.30 (Isabelle distribution) (2005),
  21. 21.
    Christos, H., Papadimitriou, C.H.: On the complexity of integer programming. J. ACM 28(4), 765–768 (1981)zbMATHCrossRefGoogle Scholar
  22. 22.
    Paulson, L.C.: Mechanizing a theory of program composition for UNITY. ACM Trans. Program. Lang. Syst. 23(5), 626–656 (2001)CrossRefGoogle Scholar
  23. 23.
    Pottier, L.: Minimal solutions of linear diophantine systems: Bounds and algorithms. In: Book, R.V. (ed.) RTA 1991. LNCS, vol. 488, Springer, Heidelberg (1991)Google Scholar
  24. 24.
    Schwartz, J.T.: On programming: An interim report on the SETL project. Technical report, Courant Institute, New York (1973)Google Scholar
  25. 25.
    Zarba, C.G.: Combining multisets with integers. In: Voronkov, A. (ed.) CADE 2002. LNCS (LNAI), vol. 2392, Springer, Heidelberg (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Ruzica Piskac
    • 1
  • Viktor Kuncak
    • 1
  1. 1.School of Computer and Communication ScienceÉcole Polytechnique Fédérale de Lausanne (EPFL)Switzerland

Personalised recommendations