Abstract
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.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
References
Clauss, P.: Counting solutions to linear and nonlinear constraints through Ehrhart polynomials: Applications to analyze and transform scientific programs. In: Proceedings of the 1996 ACM International Conference on Supercomputing, pp. 278–285 (1996)
Ferrante, J., Sarkar, V., Thrash, W.: On estimating and enhancing cache effectiveness. In: Banerjee, U., Nicolau, A., Gelernter, D., Padua, D.A. (eds.) LCPC 1991. LNCS, vol. 589, pp. 328–343. Springer, Heidelberg (1992)
Chatterjee, S., Parker, E., Hanlon, P.J., Lebeck, A.R.: Exact analysis of the cache behavior of nested loops. In: Proceedings of 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 286–297 (2001)
Ghosh, S., Martonosi, M., Malik, S.: Cache miss equations: A compiler framework for analyzing and tuning memory behavior. ACM Transactions on Programming Languages and Systems 21, 703–746 (1999)
Haghighat, M., Polychronopoulos, C.: A basis for parallelization, optimization and scheduling of programs. Technical Report 1317, CSRD, University of Illinois (1993)
Haghighat, M., Polychronopoulos, C.: Symbolic analysis: A basis for parallelization, optimization and scheduling of programs. In: Banerjee, U., Gelernter, D., Nicolau, A., Padua, D.A. (eds.) LCPC 1993. LNCS, vol. 768, pp. 567–585. Springer, Heidelberg (1994)
Tawbi, N.: Estimation of nested loop exection time by integer arithmetics in convex polyhedra. In: Proceedings of the Eighth International Parallel Processing Symposium, pp. 217–221 (1994)
Tawbi, N., Feautrier, P.: Processor allocation and loop scheduling on multiprocessor computers. In: Proceedings of the 1992 ACM International Conference on Supercomputing, pp. 63–71 (1992)
Pugh, W.: Counting solutions to Presburger formulas: How and why. In: Proceedings of 1994 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 121–134 (1994)
Ehrhart, E.: Polynômes arithmétiques et Méthode des Polyédres en Combinatoire. International Series of Numerical Mathematics, vol. 35. Birkhäuser, Basel (1977)
Loechner, V.: PolyLib: A Library for Manipulating Parameterized Polyhedra (1999)
Fricker, C., Temam, O., Jalby, W.: Influence of cross-interference on blocked loops: A case study with matrix-vector multiply. ACM Transactions on Programming Languages and Systems 17, 561–575 (1995)
Barvinok, A.I.: A polynomial time algorithm for counting integral points in polyhedra when the dimension is fixed. Mathematics of Operations Research 19, 769–779 (1994)
Dyer, M., Kannan, R.: On Barvinok’s algorithm for counting lattic points in fixed dimension. Mathematics of Operations Research 22, 545–549 (1997)
Loera, J.A.D., Hemmecke, R., Tauzer, J., Yoshida, R.: Effective lattice point counting in rational convex polytopes (2003), http://www.math.ucdavis.edu/~latte/pdf/lattE.pdf
Presburger, M.: Über die Vollständigkeit eines gewissen Systems der Arithmetik ganzer Zahlen, in welchem die Addition als einzige Operation hervortritt. In: Comptes Rendus du Premier Congrès des Mathématiciens des Pays Slaves, pp. 92–101 (1929)
Oppen, D.C.: A 22 2 pn upper bound on the complexity of Presburger arithmetic. Journal of Computer and System Sciences 16, 323–332 (1978)
Weispfenning, V.: Complexity and uniformity of elimination in Presburger arithmetic. In: Proceedings of the 1997 ACM SIGSAM International Symposium on Symbolic and Algebraic Computation, pp. 48–53 (1997)
Büchi, J.R.: Weak second-order arithmetic and finite automata. Zeitschrift fur Mathematische Logik und Grundlagen der Mathematik 6, 66–92 (1960)
Büchi, J.R.: On a decision method in restricted second-order arithmetic. In: Nagel, E., et al. (eds.) Proceedings of the International Congress on Logic, Methodology and Philosophy of Science 1960, pp. 1–11. Stanford University Press (1962)
Boudet, A., Comon, H.: Diophantine equations, Presburger arithmetic and finite automata. In: Kirchner, H. (ed.) CAAP 1996. LNCS, vol. 1059, pp. 30–43. Springer, Heidelberg (1996)
Bartzis, C., Bultan, T.: Efficient symbolic representations for arithmetic constraints in verification. Technical Report 2002-16, Computer Science Department, University of California, Santa Barbara (2002)
Bartzis, C., Bultan, T.: Automata-based representations for arithmetic constraints in automated verification. In: Champarnaud, J.-M., Maurel, D. (eds.) CIAA 2002. LNCS, vol. 2608, pp. 282–288. Springer, Heidelberg (2003)
Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley Publishing Company, Reading (1979)
Boigelot, B., Wolper, P.: Representing arithmetic constraints with finite automata: An overview. In: Stuckey, P.J. (ed.) ICLP 2002. LNCS, vol. 2401, pp. 1–19. Springer, Heidelberg (2002)
Wolper, P., Boigelot, B.: An automata-theoretic approach to Presburger arithmetic constraints (extended abstract). In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 21–32. Springer, Heidelberg (1995)
Wolper, P., Boigelot, B.: On the construction of automata from linear arithmetic constraints. In: Schwartzbach, M.I., Graf, S. (eds.) TACAS 2000. LNCS, vol. 1785, pp. 1–19. Springer, Heidelberg (2000)
Klarlund, N., Møller, A.: MONA Version 1.4 User Manual (2001), http://www.brics.dk/mona
Parker, E., Chatterjee, S.: An automata-theoretic algorithm for counting solutions to Presburger formulas. Technical Report TR04-001, Department of Computer Science, University of North Carolina at Chapel Hill (2004)
Kelly, W., Maslov, V., Pugh, W., Rosser, E., Shpeisman, T., Wonnacott, D.: The Omega Calculator and Library, Version 1.1.0 (1996), http://www.cs.umd.edu/projects/omega
Kelly, W., Maslov, V., Pugh, W., Rosser, E., Shpeisman, T., Wonnacott, D.: The Omega Library Version 1.1.0 Interface Guide (1996), http://www.cs.umd.edu/projects/omega
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Parker, E., Chatterjee, S. (2004). An Automata-Theoretic Algorithm for Counting Solutions to Presburger Formulas. In: Duesterwald, E. (eds) Compiler Construction. CC 2004. Lecture Notes in Computer Science, vol 2985. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24723-4_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-24723-4_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21297-3
Online ISBN: 978-3-540-24723-4
eBook Packages: Springer Book Archive