An Automata-Theoretic Algorithm for Counting Solutions to Presburger Formulas

We present an algorithm for counting the number of integer solutions to selected free variables of a Presburger formula. We represent the Presburger formula as a deterministic finite automaton (DFA) whose accepting paths encode the standard binary representations of satisfying free variable values. We count the number of accepting paths in such a DFA to obtain the number of solutions without enumerating the actual solutions. We demonstrate our algorithm on a suite of eight problems to show that it is universal, robust, fast, and scalable.

[1]  Derek C. Oppen,et al.  A 2^2^2^pn Upper Bound on the Complexity of Presburger Arithmetic , 1978, J. Comput. Syst. Sci..

[2]  Helene Kirchner Trees in Algebra and Programming — CAAP '96 , 1996, Lecture Notes in Computer Science.

[3]  Volker Weispfenning,et al.  Complexity and uniformity of elimination in Presburger arithmetic , 1997, ISSAC.

[4]  Siddhartha Chatterjee,et al.  Exact analysis of the cache behavior of nested loops , 2001, PLDI '01.

[5]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[6]  Pierre Wolper,et al.  Representing Arithmetic Constraints with Finite Automata: An Overview , 2002, ICLP.

[7]  Hubert Comon-Lundh,et al.  Diophantine Equations, Presburger Arithmetic and Finite Automata , 1996, CAAP.

[8]  William Pugh,et al.  Counting solutions to Presburger formulas: how and why , 1994, PLDI '94.

[9]  Sharad Malik,et al.  Cache miss equations: a compiler framework for analyzing and tuning memory behavior , 1999, TOPL.

[10]  Constantine D. Polychronopoulos,et al.  Symbolic Analysis: A Basis for Parallelization, Optimization, and Scheduling of Programs , 1993, LCPC.

[11]  守屋 悦朗,et al.  J.E.Hopcroft, J.D. Ullman 著, "Introduction to Automata Theory, Languages, and Computation", Addison-Wesley, A5変形版, X+418, \6,670, 1979 , 1980 .

[12]  Jesús A. De Loera,et al.  Effective lattice point counting in rational convex polytopes , 2004, J. Symb. Comput..

[13]  Martin E. Dyer,et al.  On Barvinok's Algorithm for Counting Lattice Points in Fixed Dimension , 1997, Math. Oper. Res..

[14]  E. Ehrhart,et al.  Polynômes arithmétiques et méthode des polyèdres en combinatoire , 1974 .

[15]  Philippe Clauss,et al.  Counting solutions to linear and nonlinear constraints through Ehrhart polynomials: applications to analyze and transform scientific programs , 1996 .

[16]  Paul Feautrier,et al.  Processor allocation and loop scheduling on multiprocessor computers , 1992, ICS '92.

[17]  J. Büchi Weak Second‐Order Arithmetic and Finite Automata , 1960 .

[18]  Nils Klarlund,et al.  MONA Version 1.4 - User Manual , 2001 .

[19]  J. R. Büchi On a Decision Method in Restricted Second Order Arithmetic , 1990 .

[20]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[21]  Vivek Sarkar,et al.  On Estimating and Enhancing Cache Effectiveness , 1991, LCPC.

[22]  Olivier Temam,et al.  Influence of cross-interferences on blocked loops: a case study with matrix-vector multiply , 1995, TOPL.

[23]  E. Wagner International Series of Numerical Mathematics , 1963 .

[24]  Pierre Wolper,et al.  On the Construction of Automata from Linear Arithmetic Constraints , 2000, TACAS.

[25]  Tevfik Bultan,et al.  Automata-based representations for arithmetic constraints in automated verification , 2002, CIAA'02.

[26]  Nadia Tawbi Estimation of nested loops execution time by integer arithmetic in convex polyhedra , 1994, Proceedings of 8th International Parallel Processing Symposium.

[27]  Pierre Wolper,et al.  An Automata-Theoretic Approach to Presburger Arithmetic Constraints (Extended Abstract) , 1995, SAS.

[28]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[29]  Alexander I. Barvinok,et al.  A polynomial time algorithm for counting integral points in polyhedra when the dimension is fixed , 1993, Proceedings of 1993 IEEE 34th Annual Foundations of Computer Science.

[30]  Tevfik Bultan,et al.  Efficient Symbolic Representations for Arithmetic Constraints in Verification , 2003, Int. J. Found. Comput. Sci..

[31]  Vincent Loechner PolyLib: A Library for Manipulating Parameterized Polyhedra , 1999 .