Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
125 tokens/sec
GPT-4o
53 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Algebraic Tools for Computing Polynomial Loop Invariants (2405.09232v1)

Published 15 May 2024 in cs.SC, cs.PL, and math.AG

Abstract: Loop invariants are properties of a program loop that hold before and after each iteration of the loop. They are often employed to verify programs and ensure that algorithms consistently produce correct results during execution. Consequently, the generation of invariants becomes a crucial task for loops. We specifically focus on polynomial loops, where both the loop conditions and assignments within the loop are expressed as polynomials. Although computing polynomial invariants for general loops is undecidable, efficient algorithms have been developed for certain classes of loops. For instance, when all assignments within a while loop involve linear polynomials, the loop becomes solvable. In this work, we study the more general case where the polynomials exhibit arbitrary degrees. Applying tools from algebraic geometry, we present two algorithms designed to generate all polynomial invariants for a while loop, up to a specified degree. These algorithms differ based on whether the initial values of the loop variables are given or treated as parameters. Furthermore, we introduce various methods to address cases where the algebraic problem exceeds the computational capabilities of our methods. In such instances, we identify alternative approaches to generate specific polynomial invariants.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (36)
  1. Solving invariant generation for unsolvable loops. In International Static Analysis Symposium. Springer, 19–43.
  2. (Un) Solvable Loop Analysis. arXiv preprint arXiv:2306.01597 (2023).
  3. Trace maps, invariants, and some of their applications. International Journal of Modern Physics B 7, 06n07 (1993), 1527–1550.
  4. Algorithms in Real Algebraic Geometry (2nd revised and extended 2016 ed.). Springer International Publishing. https://doi.org/10.1007/3-540-33099-2
  5. Msolve: A library for solving polynomial systems. In Proceedings of the 2021 on International Symposium on Symbolic and Algebraic Computation. 51–58.
  6. Real Algebraic Geometry (1st ed.). Ergebnisse der Mathematik und ihrer Grenzgebiete, Vol. 3. Springer-Verlag, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-85463-2
  7. Polynomial invariant generation for non-deterministic recursive programs. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. 672–687.
  8. Ideals, varieties, and algorithms: an introduction to computational algebraic geometry and commutative algebra. Springer Science & Business Media.
  9. John Cyphert and Zachary Kincaid. 2024. Solvable Polynomial Ideals: The Ideal Reflection for Program Analysis. Proceedings of the ACM on Programming Languages 8, POPL (2024), 724–752.
  10. Polynomial invariants by linear algebra. In Automated Technology for Verification and Analysis: 14th International Symposium, ATVA 2016, Chiba, Japan, October 17-20, 2016, Proceedings 14. Springer, 479–494.
  11. Synthesizing invariants by solving solvable loops. In International Symposium on Automated Technology for Verification and Analysis. Springer, 327–343.
  12. Christian Eder and Jean-Charles Faugère. 2017. A survey on signature-based algorithms for computing Gröbner bases. Journal of Symbolic Computation 80 (2017), 719–784.
  13. Robert W Floyd. 1993. Assigning meanings to programs. In Program Verification: Fundamental Issues in Computer Science. Springer, 65–81.
  14. Algebro-geometric Algorithms for Template-based Synthesis of Polynomial Programs. Proceedings of the ACM on Programming Languages 7, OOPSLA1 (2023), 727–756.
  15. Daniel R. Grayson and Michael E. Stillman. [n. d.]. Macaulay2, a software system for research in algebraic geometry. Available at http://www2.macaulay2.com.
  16. Polynomial invariants for affine programs. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science. 530–539.
  17. On strongest algebraic program invariants. J. ACM 70, 5 (2023), 1–22.
  18. Michael Karr. 1976. Affine relationships among variables of a program. Acta Informatica 6 (1976), 133–151.
  19. Manuel Kauers and Burkhard Zimmermann. 2008. Computing the algebraic relations of C-finite sequences and multisequences. Journal of Symbolic Computation 43, 11 (2008), 787–803.
  20. G. Kempf. 1993. Algebraic Varieties. Cambridge University Press. https://doi.org/10.1017/CBO9781107359956
  21. Laura Kovács. 2008. Reasoning algebraically about p-solvable loops. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 249–264.
  22. Laura Kovács. 2023. Algebra-Based Loop Analysis. In Proceedings of the 2023 International Symposium on Symbolic and Algebraic Computation. 41–42.
  23. Zohar Manna and Amir Pnueli. 2012. Temporal verification of reactive systems: safety. Springer Science & Business Media.
  24. E. Mayr and A. Meyer. 1982. The complexity of the word problem for commutative semi-groups and polynomial ideals. Advances in Mathematics 46 (1982), 305–329. https://doi.org/10.1016/0001-8708(82)90035-9
  25. This is the moment for probabilistic loops. Proc. ACM Program. Lang. 6, OOPSLA2 (2022), 1497–1525. https://doi.org/10.1145/3563341
  26. Guillermo Moreno Socias. 1992. Length of Polynomial Ascending Chains and Primitive Recursiveness. MATHEMATICA SCANDINAVICA 71 (Jun. 1992), 181–205. https://doi.org/10.7146/math.scand.a-12421
  27. Markus Müller-Olm and Helmut Seidl. 2004a. Computing polynomial program invariants. Inform. Process. Lett. 91, 5 (2004), 233–244.
  28. Markus Müller-Olm and Helmut Seidl. 2004b. A note on Karr’s algorithm. In International Colloquium on Automata, Languages, and Programming. Springer, 1016–1028.
  29. Grzegorz Pastuszak. 2020. Ascending chains of ideals in the polynomial ring. Turkish Journal of Mathematics 44, 6 (2020), 2652–2658. https://doi.org/10.3906/mat-1904-61
  30. Mihai Putinar. 1993. Positive Polynomials on Compact Semi-algebraic Sets. Indiana University Mathematics Journal 42, 3 (1993), 969–984. https://doi.org/stable/24897130
  31. John AG Roberts and Michael Baake. 1994. Trace maps as 3D reversible dynamical systems with an invariant. Journal of statistical physics 74, 3-4 (1994), 829–888.
  32. Enric Rodríguez-Carbonell and Deepak Kapur. 2004. Automatic generation of polynomial loop invariants: Algebraic foundations. In Proceedings of the 2004 international symposium on Symbolic and algebraic computation. 266–273.
  33. Enric Rodríguez-Carbonell and Deepak Kapur. 2007a. Automatic generation of polynomial invariants of bounded degree using abstract interpretation. Science of Computer Programming 64, 1 (2007), 54–75.
  34. Enric Rodríguez-Carbonell and Deepak Kapur. 2007b. Generating all polynomial invariants in simple loops. Journal of Symbolic Computation 42, 4 (2007), 443–476.
  35. Igor Rostislavovich Shafarevich and Miles Reid. 1994. Basic algebraic geometry. Vol. 1. Springer.
  36. Joachim Von Zur Gathen and Jürgen Gerhard. 2013. Modern computer algebra. Cambridge university press.
Citations (2)

Summary

We haven't generated a summary for this paper yet.

X Twitter Logo Streamline Icon: https://streamlinehq.com