Abstract
Enriching logic formalisms with counting capabilities is an important task in view of the needs of many application areas, ranging from database theory to formal verification. In this paper, we consider a very expressive language obtained by enriching linear integer arithmetic with free function symbols and cardinality constraints for interpreted sets. We obtain positive results for a flat fragment via a reduction to decidability of Presburger arithmetic with unary counting quantifiers (Schweikhart in Arithmetic, first-order logic, and counting quantifiers, ACM TOCL, New York, 2004). We isolate also an easier simple flat subfragment, whose satisfiability is in NP, and we show that this subfragment is adequate to formalize problems arising in the area of the verification of fault-tolerant distributed algorithms. We finally discuss our first implementation, the related experimental results, as well as further algorithmic problems suggested by model-checking applications.
Similar content being viewed by others
Notes
We use obvious abbreviations like ny for \(y+\cdots + y\) (n-times).
Here \(u\le t\) stands for \(u=t\vee u<t\).
In case an inconsistent condition arises according to Lemma 5(i), the constraint atom is replaced by \(y=0\).
The matrix of a prenex formula \(\phi \) is the formula obtained from \(\phi \) by removing quantifiers.
Our arithmetic formulæ are equivalent to quantifier-free ones and the same is true for basic formulæ because they are obtained from arithmetic formulæ by substitutions without capture.
Otherwise said, we have that \(y_j\) and \(y_{j'}\) are in the same class iff for every a the equality \(a(y_j) = a(y_{j'})\) is implied by \(\alpha \).
In addition, we performed linear time replacements of variables by variables or by constants.
When we need to display a column vector, we obviously write it as a transposed row vector.
ArCa stands for Array with Cardinalities.
For this auxiliary role, ArCa-Sat exploits the SMT-solver Yices (developed at SRI-Stanford). Final arithmetic formulæ are written in SMT-LIB2 format.
If we drop the requirement of staying inside a fragment for which we have a full decision procedure, the situation may improve (see Sect. 7.2 for more), but we loose the possibility of making satisfiability tests able both to discover bugs and to give verification certificates.
Here the \(\underline{y}\) are the first order variables occurring free already in \(\phi \).
The procedure of Lemma 10 introduces also fresh existential first order variables u to name the terms \(a_s(y_j)\); however, these variables can be eliminated at the end of the procedure by replacing them back with the corresponding term \(a_s(y_j)\).
The situation does not improve if we handle just flat formulæ because in any case the computation of preimages introduces extra first order existential quantifiers. On the other hand, if we limit to flat formulæ of degree 1, we get all we need, but such formulæ seem not to be expressive enough.
We use notations like \( AC'=AC\) as abbreviations for \(\forall x\, (AC'(x)\leftrightarrow AC(x))\).
\(Pre(T1, \upsilon _0)\) is inconsistent because of the program counter mismatch.
References
Abdulla PA, Cerans K, Jonsson B, Tsay YK (1996) General decidability theorems for infinite-state systems. In: Proc. of LICS, pp 313–321
Abdulla PA, Delzanno G, Henda NB, Rezine A (2007) Regular model checking without transducers. TACAS, LNCS vol 4424, pp 721–736
Abdulla PA, Delzanno G, Rezine A (2007) Parameterized verification of infinite-state processes with global conditions. CAV, LNCS, vol 4590, pp 145–157
Abdulla PA, Jonsson B (1996) Verifying programs with unreliable channels. Inf Comput 127(2):91–101
Abdulla PA, Jonsson B (2003) Model checking of systems with many identical timed processes. Theor Comput Sci 290:241–264
Alberti F, Ghilardi S, Pagani E (2016) Counting constraints in flat array fragments. In: Automated reasoning—8th international joint conference, IJCAR 2016, Coimbra, Portugal, June 27–July 2, 2016, Proceedings, pp 65–81
Alberti F, Ghilardi S, Sharygina N (2015) Decision procedures for flat array properties. J Autom Reason 54(4):327–352. doi:10.1007/s10817-015-9323-7
Bansal K, Reynolds A, Barrett CW, Tinelli C (2016) A new decision procedure for finite sets and cardinality constraints in SMT. In: Automated reasoning—8th international joint conference, IJCAR 2016, Coimbra, Portugal, June 27—July 2, 2016, Proceedings, pp 82–98
Biely M, Charron-Bost B, Gaillard A, Hutle M, Schiper A (2007) Widder, J.: Tolerating corrupted communication. In: Proc. PODC, pp 244–253
Bjørner N, von Gleissenthall K, Rybalchenko A (2016) Cardinalities and universal quantifiers for verifying parameterized systems. In: Proc. of the 37th ACM SIGPLAN conference on programming language design and implementation (PLDI)
Charron-Bost B, Schiper A (2009) The heard-of model: computing in distributed systems with benign faults. Distrib Comput 22:49–71
Delzanno G, Esparza J, Podelski A (1999) Constraint-based analysis of broadcast protocols. In: Proc. of CSL, LNCS, vol 1683, pp 50–66
de Moura L, Bjørner N (2008) Z3: An efficient SMT solver. In: TACAS, pp 337–340
Dragoi C, Henzinger T, Veith H, Widder J, Zufferey D (2014) A logic-based framework for verifying consensus algorithms. In: Proc. of VMCAI
Dragoi C, Henzinger T, Zufferey D (2015) The need for language support for fault-tolerant distributed systems. In: Proc. of SNAPL
Eisenbrand F, Shmonin G (2006) Carathéodory bounds for integer cones. Oper Res Lett 34(5):564–568
Esparza J, Finkel A, Mayr R (1999) On the verification of broadcast protocols. In: Proc. of LICS. IEEE Computer Society, pp 352–359
Ge Y, de Moura LM (2009) Complete instantiation for quantified formulas in satisfiabiliby modulo theories. In: Computer aided verification, 21st international conference, CAV 2009, Grenoble, France, June 26–July 2, 2009. Proceedings, pp 306–320. doi:10.1007/978-3-642-02658-4_25
Ghilardi S, Pagani E (2017) Counter systems simulations: a higher-order logic approach, manuscript
Halpern J (1991) Presburger arithmetic with unary predicates is \(\varPi ^1_1\) complete. J Symbo Log 56(2):637–642
Herlihy M, Shavit N (2008) The art of multiprocessor programming. Morgan Kaufmann, Burlington
John A, Konnov I, Schmid U, Veith H, Widder J (2013) Parameterized model checking of fault-tolerant distributed algorithms by abstraction. In: Proc. of FMCAD, pp 201–209
Konnov I, Veith H, Widder J (2015) SMT and POR beat counter abstraction: parameterized model checking of threshold-based distributed algorithms. In: Computer aided verification, 27th international conference, CAV 2015, San Francisco, CA, USA, July 18-24, 2015, Proceedings, Part I, pp 85–102. doi:10.1007/978-3-319-21690-4_6
Konnov IV, Veith H, Widder J (2017) On the completeness of bounded model checking for threshold-based distributed algorithms: Reachability. Inf Comput 252:95–109. doi:10.1016/j.ic.2016.03.006
Konnov IV, Veith H, Widder J (2015) What you always wanted to know about model checking of fault-tolerant distributed algorithms. In: Perspectives of system informatics—10th international Andrei Ershov informatics conference, PSI 2015, in Memory of Helmut Veith, Kazan and Innopolis, Russia, August 24–27, 2015, Revised Selected Papers, pp 6–21
Kuncak V, Nguyen H, Rinard M (2005) An algorithm for deciding BAPA: Boolean Algebra with Presburger Arithmetic. In: Proc. of CADE-20, LNCS, vol 3632
Kuncak V, Nguyen HH, Rinard M (2006) Deciding Boolean algebra with Presburger arithmetic. J Autom Reason 36(3):213–239
Kunkak V, Rinard M (2007) Towards efficient satisfiability checking for Boolean Algebras with Presburger arithmetic. In: CADE, vol 21, pp 215–230
Nieuwenhuis R, Oliveras A, Tinelli C (2006) Solving SAT and SAT modulo theories: from an abstract davis-putnam-logemann-loveland procedure to DPLL(T). J ACM 53(6):937–977
Papamarcos M, Patel J (1984) A low-overhead coherence solution for multiprocessors with private cache memories. In: Proc. ISCA, p 348
Piskac R, Kuncak V (2008) Decision procedures for multisets with cardinality constraints. In: Proc. of VMCAI, LNCS
Presburger M (1929) Über die Vollständigkeit eines gewissen Systems der Arithmetik ganzer Zahlen, in welchem die Addition als einzige Operation hervortritt. Warszawa
Schweikhart N (2004) Arithmetic, first-order logic, and counting quantifiers. ACM TOCL pp 1–35
Solihin Y (2008) Fundamentals of parallel computer architecture multichip and multicore systems. Solihin Publishing & Consulting LLC, Raleigh
Srikanth T, Toueg S (1987) Optimal clock synchronization. J ACM 34(3):626–645
Srikanth T, Toueg S (1987) Simulating authenticated broadcasts to derive simple fault-tolerant algorithms. Distrib Comput 2(2):80–94. doi:10.1007/BF01667080
Yessenov K, Piskac R, Kuncak V (2010) Collections, cardinalities, and relations. In: Proc. of VMCAI
Zarba C (2002) Combining sets with integers. In: Frontiers of combining systems, 4th international workshop, FroCoS 2002, Santa Margherita Ligure, Italy, April 8–10, Proceedings, pp 103–116
Author information
Authors and Affiliations
Corresponding author
Additional information
This paper extends material previously published in [6].
Rights and permissions
About this article
Cite this article
Alberti, F., Ghilardi, S. & Pagani, E. Cardinality constraints for arrays (decidability results and applications). Form Methods Syst Des 51, 545–574 (2017). https://doi.org/10.1007/s10703-017-0279-6
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-017-0279-6