Abstract
Linear equalities, disequalities and inequalities on fixed-width bit-vectors, collectively called linear modular constraints, form an important fragment of the theory of fixed-width bit-vectors. We present a practically efficient and bit-precise algorithm for quantifier elimination from conjunctions of linear modular constraints. Our algorithm uses a layered approach, whereby sound but incomplete and cheaper layers are invoked first, and expensive but complete layers are called only when required. We then extend this algorithm to work with arbitrary Boolean combinations of linear modular constraints as well. Experiments on an extensive set of benchmarks demonstrate that our techniques significantly outperform alternative quantifier elimination techniques based on bit-blasting and linear integer arithmetic.
Similar content being viewed by others
References
Ax J, Kochen S (1965) Diophantine problems over local fields II. A complete set of axioms for p-adic number theory. Am J Math 87(3):631–648
Babic D, Musuvathi M (2005) Modular arithmetic decision procedure. Technical report TR-2005-114, Microsoft Research
Bierre A, Cimatti A, Clarke EM, Zhu Y (1999) Symbolic model checking without BDDs. In: Proceedings of international conference on tools and algorithms for the construction and analysis of systems (TACAS), pp 193–207
Bjørner N (2010) Linear quantifier elimination as an abstract decision procedure. In: Proceedings of international joint conference on automated reasoning (IJCAR), pp 316–330
Bjørner N, Pichora M (1998) Deciding fixed and non-fixed size bit-vectors. In: Proceedings of international conference on tools and algorithms for the construction and analysis of systems (TACAS), pp 376–392
Bjørner N, Janota M (2015) Playing with quantified satisfaction. In: Proceedings of international conferences on logic for programming, artificial intelligence and reasoning (LPAR)—short presentations, pp 15–27
Bjørner N, Blass A, Gurevich Y, Musuvathi M (2008) Modular difference logic is hard. CoRR abs/0811.0987
Brinkmann R, Drechsler R (2002) RTL-datapath verification using integer linear programming. In: Proceedings of IEEE VLSI design conference, pp 741–746
Bruttomesso R, Sharygina N (2009) A scalable decision procedure for fixed-width bit-vectors. In: Proceedings of international conference on computer-aided design (ICCAD), pp 13–20
Bryant R (1986) Graph-based algorithms for boolean function manipulation. IEEE Trans Comput 35(8):677–691
Cavada R, Cimatti A, Franzen A, Kalyanasundaram K, Roveri M, Shyamasundar RK (2007) Computing predicate abstractions by integrating BDDs and SMT solvers. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 69–76
Chaki S, Gurfinkel A, Strichman O (2009) Decision diagrams for linear arithmetic. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 53–60
Clarke EM, Grumberg O, Peled D (1999) Model checking. MIT Press, Cambridge
Clarke EM, Grumberg O, Jha S, Lu Y, Veith H (2000) Counterexample-guided abstraction refinement. In: Proceedings of international conference on computer aided verification (CAV), pp 154–169
Cohen P (1969) Decision procedures for real and p-adic fields. Commun Pure Appl Logic 25:213–231
Cooper D (1972) Theorem proving in arithmetic without multiplication. Mach Intell 7:91–99
Craig W (1957) Linear reasoning: a new form of the Herbrand–Gentzen theorem. J Symb Logic 22(3):250–268
Cyrluk D, Möller M, Rueß H (1997) An efficient decision procedure for the theory of fixed-sized bit-vectors. In: Proceedings of international conference on computer aided verification (CAV), pp 60–71
Damm W, Dierks H, Disch S, Hagemann W, Pigorsch F, Scholl C, Waldmann U, Wirtz B (2012) Exact and fully symbolic verification of linear hybrid automata with large discrete state spaces. Sci Comput Program 77(10–11):1122–1150
Dantzig GB, Eaves BC (1973) Fourier–Motzkin elimination and its dual. J Comb Theory Ser A 14(3):288–297
Das S (2003) Predicate abstraction. PhD thesis, Stanford University
Davidson S (1999) Characteristics of the ITC’99 benchmark circuits. http://cerc.utexas.edu/itc99-benchmarks/bench.html
de Moura L, Bjørner N (2007) Relevancy propagation. Technical report TR-2007-140, Microsoft Research
de Moura L, Bjørner N (2008) Z3: an efficient SMT solver. In: Proceedings of international conference on tools and algorithms for the construction and analysis of systems (TACAS), pp 337–340
Déharbe D, Fontaine P, Berre DL, Mazure B (2013) Computing prime implicants. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 46–52
Ferrante J, Rackoff C (1975) A decision procedure for the first order theory of real addition with order. Soc Ind Appl Math (SIAM) J Comput 4(1):69–76
Ganesh V, Dill D (2007) A decision procedure for bit-vectors and arrays. In: Proceedings of international conference on computer aided verification (CAV), pp 519–531
Ganesh V, Berezin S, Dill D (2002) Deciding Presburger arithmetic by model checking and comparisons with other methods. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 171–186
Gange G, Søndergaard H, Stuckey P, Schachte P (2013) Solving difference constraints over modular arithmetic. In: Proceedings of international conference on automated deduction (CADE), pp 215–230
Gotlieb A, Leconte M, Marre B (2010) Constraint solving on modular integers. In: Proceedings of ninth international workshop on constraint modelling and reformulation (ModRef) co-located with international conference on principles and practice of constraint programming (CP)
Griggio A (2011) Effective word-level interpolation for software verification. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 28–36
Hadarean L, Bansal K, Jovanovic D, Barret C, Tinelli C (2014) A tale of two solvers: eager and lazy approaches to bit-vectors. In: Proceedings of international conference on computer aided verification (CAV), pp 680–695
Howell JA, Gregory RT (1969) An algorithm for solving linear algebraic equations using residue arithmetic I. BIT Numer Math 9(3):200–224
Huang C, Cheng K (2000) Assertion checking by combined word-level ATPG and modular arithmetic constraint-solving techniques. In: Proceedings of ACM/IEEE design automation conference (DAC), pp 118–123
Jain H, Clarke EM, Grumberg O (2008) Efficient Craig interpolation for linear diophantine (dis)equations and linear modular equations. In: Proceedings of international conference on computer aided verification (CAV), pp 254–267
John A, Chakraborty S (2011) A quantifier elimination algorithm for linear modular equations and disequations. In: Proceedings of international conference on computer aided verification (CAV), pp 486–503
John A, Chakraborty S (2013) Extending quantifier elimination to linear inequalities on bit-vectors. In: Proceedings of international conference on tools and algorithms for the construction and analysis of systems (TACAS), pp 78–92
Kapur D (2006) A quantifier-elimination based heuristic for automatically generating inductive assertions for programs. J Syst Sci Complex 19(3):307–330
Komuravelli A, Gurfinkel A, Chaki S (2014) SMT-based model checking for recursive programs. In: Proceedings of international conference on computer aided verification (CAV), pp 17–34
Kroening D, Strichman O (2008) Decision procedures: an algorithmic point of view. Springer, Berlin
Lahiri S, Nieuwenhuis R, Oliveras A (2006) SMT techniques for fast predicate abstraction. In: Proceedings of international conference on computer aided verification (CAV), pp 424–437
Loos R, Weispfenning V (1993) Applying linear quantifier elimination. Comput J 36(5):450–462
Mishchenko A, Chatterjee S, Jiang R, Brayton R (2005) FRAIGs: a unifying representation for logic synthesis and verification. Technical report, EECS Department, UC Berkeley
Monniaux D (2008) A quantifier elimination algorithm for linear real arithmetic. In: Proceedings of international conference on logic for programming artificial intelligence and reasoning (LPAR), pp 243–257
Monniaux D (2010) Quantifier elimination by lazy model enumeration. In: Proceedings of international conference on computer aided verification (CAV), pp 585–599
Müller-Olm M, Seidl H (2007) Analysis of modular arithmetic. ACM Trans Program Lang Syst (TOPLAS) 29(5):29
Niemetz A, Preiner M, Biere A (2014) Turbo-charging lemmas on demand with don’t care reasoning. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 179–186
Nipkow T (2008) Linear quantifier elimination. In: Proceedings of international joint conference on automated reasoning (IJCAR), pp 18–33
Owre S, Rushby J, Shankar N (1992) PVS: A prototype verification system. In: Proceedings of international conference on automated deduction (CADE), pp 748–752
Phan A, Bjørner N, Monniaux D (2012) Anatomy of alternating quantifier satisfiability (work in progress). In: Proceedings of SMT workshop at international joint conference on automated reasoning (SMT@IJCAR), pp 120–130
Pugh W (1992) The Omega test: a fast and practical integer programming algorithm for dependence analysis. Commun ACM 35(8):102–114
Pugh W (2013) The Omega project: frameworks and algorithms for the analysis and transformation of scientific programs. www.cs.umd.edu/projects/omega
Somenzi F (2015) CUDD: Colorado university decision diagram package release 3.0.0. http://vlsi.colorado.edu/~fabio/CUDD
Szabo N, Tanaka R (1967) Residue arithmetic and its applications to computer technology. McGraw-Hill, New York
Tew N, Kalla P, Shekhar N, Gopalakrishnan S (2008) Verification of arithmetic datapaths using polynomial function models and congruence solving. In: Proceedings of international conference on computer-aided design (ICCAD), pp 122–128
Veanes M, Bjørner N, Nachmanson L, Bereg S (2014) Monadic decomposition. In: Proceedings of international conference on computer aided verification (CAV), pp 628–645
Wintersteiger C, Hamadi Y, de Moura L (2010) Efficiently solving quantified bit-vector formulas. In: Proceedings of international conference on formal methods in computer-aided design (FMCAD), pp 239–246
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
John, A.K., Chakraborty, S. A layered algorithm for quantifier elimination from linear modular constraints. Form Methods Syst Des 49, 272–323 (2016). https://doi.org/10.1007/s10703-016-0260-9
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-016-0260-9