Reasoning with Finite Sets and Cardinality Constraints in SMT

We consider the problem of deciding the satisfiability of quantifier-free formulas in the theory of finite sets with cardinality constraints. Sets are a common high-level data structure used in programming; thus, such a theory is useful for modeling program constructs directly. More importantly, sets are a basic construct of mathematics and thus natural to use when formalizing the properties of computational systems. We develop a calculus describing a modular combination of a procedure for reasoning about membership constraints with a procedure for reasoning about cardinality constraints. Cardinality reasoning involves tracking how different sets overlap. For efficiency, we avoid considering Venn regions directly, as done in previous work. Instead, we develop a novel technique wherein potentially overlapping regions are considered incrementally as needed, using a graph to track the interaction among the different regions. The calculus has been designed to facilitate its implementation within SMT solvers based on the DPLL(T) architecture. Our experimental results demonstrate that the new techniques are competitive with previous techniques and can scale much better on certain classes of problems.

[1]  Chang Liu,et al.  Term rewriting and all that , 2000, SOEN.

[2]  Viktor Kuncak,et al.  Deciding Boolean Algebra with Presburger Arithmetic , 2006, Journal of Automated Reasoning.

[3]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[4]  Daniel Jackson,et al.  Software Abstractions - Logic, Language, and Analysis , 2006 .

[5]  Viktor Kuncak,et al.  Towards Efficient Satisfiability Checking for Boolean Algebra with Presburger Arithmetic , 2007, CADE.

[6]  Viktor Kuncak,et al.  An overview of the Leon verification system: verification by translation to recursive functions , 2013, SCALA@ECOOP.

[7]  Daniel Kroening,et al.  A Theory of Finite Sets, Lists, and Maps for the SMT-LIB Standard , 2009 .

[8]  Kshitij Bansal,et al.  Decision Procedures for Finite Sets with Cardinality, and Local Theories Extensions , 2016 .

[9]  Viorica Sofronie-Stokkermans,et al.  Decision Procedures for Theories of Sets with Measures , 2017, CADE.

[10]  Ruzica Piskac,et al.  Decision Procedures for Multisets with Cardinality Constraints , 2008, VMCAI.

[11]  Edmond Schonberg,et al.  Programming with Sets: An Introduction to SETL , 1986 .

[12]  Cesare Tinelli,et al.  A New Decision Procedure for Finite Sets and Cardinality Constraints in SMT , 2016, IJCAR.

[13]  Calogero G. Zarba,et al.  Combining Sets with Cardinals , 2005, Journal of Automated Reasoning.

[14]  Nikolaj Bjørner,et al.  Generalized, efficient array decision procedures , 2009, 2009 Formal Methods in Computer-Aided Design.

[15]  Viorica Sofronie-Stokkermans,et al.  Locality Results for Certain Extensions of Theories with Bridging Functions , 2009, CADE.

[16]  Elena Pagani,et al.  Counting Constraints in Flat Array Fragments , 2016, IJCAR.

[17]  Cesare Tinelli,et al.  Satisfiability Modulo Theories , 2021, Handbook of Satisfiability.

[18]  Christophe Ringeissen,et al.  A Polite Non-Disjoint Combination Method: Theories with Bridging Functions Revisited , 2015, CADE.

[19]  Nikolaj Bjørner,et al.  Cardinalities and universal quantifiers for verifying parameterized systems , 2016, PLDI.

[20]  Calogero G. Zarba,et al.  A New Fast Tableau-Based Decision Procedure for an Unquantified Fragment of Set Theory , 1998, FTP.

[21]  Clark W. Barrett,et al.  Polite Theories Revisited , 2010, LPAR.

[22]  Cesare Tinelli,et al.  Solving SAT and SAT Modulo Theories: From an abstract Davis--Putnam--Logemann--Loveland procedure to DPLL(T) , 2006, JACM.

[23]  Calogero G. Zarba,et al.  Combining Sets with Integers , 2002, FroCoS.

[24]  Viktor Kuncak,et al.  Sets with Cardinality Constraints in Satisfiability Modulo Theories , 2011, VMCAI.

[25]  Gianfranco Rossi,et al.  A Decision Procedure for Sets, Binary Relations and Partial Functions , 2016, CAV.