FMSD manuscript No. (will be inserted by the editor) A Layered Algorithm for Quantifier Elimination from Linear Modular Constraints Ajith K John · Supratik Chakraborty Received: date / Accepted: date Abstract Linear equalities, disequalities and inequalities on fixed-width bit-vectors, collec- tively 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 arith- metic. Keywords Quantifier Elimination · Linear Modular Arithmetic · Bit-precise Verification · Decision Diagrams · Layered Algorithm 1 Introduction Quantifier elimination (QE) is the process of converting a logic formula containing quanti- fiers into a semantically equivalent quantifier-free formula. Formally, let F be a quantifier- free formula over a set V of free variables in a first-order theory T. Consider the quantified formula Q 1 x 1 Q 2 x 2 ... Q n x n . F , where X = {x 1 ,... x n } is a subset of V , and Q i ∈{∃, ∀} for i ∈{1,... n}. QE involves computing a quantifier-free formula F ′ over variables in V \ X This is an extended version of our earlier works in CAV 2011 [34] and TACAS 2013 [35]. Ajith K John Homi Bhabha National Institute, BARC, Mumbai, India Tel.: +91-22-25591836 Fax: +91-22-25505151 E-mail: ajithkj.barc@gmail.com Supratik Chakraborty Dept. of Computer Sc. & Engg., IIT Bombay, India Tel.: +91-22-25764787 Fax: +91-22-25720290 E-mail: supratik@cse.iitb.ac.in