skip to main content
research-article
Open Access

What’s decidable about linear loops?

Published:12 January 2022Publication History
Skip Abstract Section

Abstract

We consider the MSO model-checking problem for simple linear loops, or equivalently discrete-time linear dynamical systems, with semialgebraic predicates (i.e., Boolean combinations of polynomial inequalities on the variables). We place no restrictions on the number of program variables, or equivalently the ambient dimension. We establish decidability of the model-checking problem provided that each semialgebraic predicate either has intrinsic dimension at most 1, or is contained within some three-dimensional subspace. We also note that lifting either of these restrictions and retaining decidability would necessarily require major breakthroughs in number theory.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This is a teaser of the POPL'22 talk about the paper "What's Decidable about Linear Loops?". In the paper, we consider the MSO model-checking problem for simple linear loops, or equivalently discrete-time linear dynamical systems, with semialgebraic predicates (i.e., Boolean combinations of polynomial inequalities on the variables). We place no restrictions on the number of program variables, or equivalently the ambient dimension. We establish decidability of the model-checking problem provided that each semialgebraic predicate either has intrinsic dimension at most one, or is contained within some three-dimensional subspace. We also note that lifting either of these restrictions and retaining decidability would necessarily require major breakthroughs in number theory.

References

  1. Manindra Agrawal, S. Akshay, Blaise Genest, and P. S. Thiagarajan. 2015. Approximate Verification of the Symbolic Dynamics of Markov Chains. J. ACM, 62, 1 (2015), 2:1–2:34. https://doi.org/10.1145/2629417 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Shaull Almagor, Dmitry Chistikov, Joël Ouaknine, and James Worrell. 2018. O-Minimal Invariants for Linear Loops. In 45th International Colloquium on Automata, Languages, and Programming, ICALP 2018 (LIPIcs, Vol. 107). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 114:1–114:14. https://doi.org/10.4230/LIPIcs.ICALP.2018.114 Google ScholarGoogle ScholarCross RefCross Ref
  3. Shaull Almagor, Toghrul Karimov, Edon Kelmendi, Joël Ouaknine, and James Worrell. 2021. Deciding ω -regular properties on linear recurrence sequences. Proc. ACM Program. Lang., 5, POPL (2021), 1–24. https://doi.org/10.1145/3434329 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Shaull Almagor, Joël Ouaknine, and James Worrell. 2017. The Polytope-Collision Problem. In 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017 (LIPIcs, Vol. 80). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 24:1–24:14. https://doi.org/10.4230/LIPIcs.ICALP.2017.24 Google ScholarGoogle ScholarCross RefCross Ref
  5. Shaull Almagor, Joël Ouaknine, and James Worrell. 2019. The Semialgebraic Orbit Problem. In 36th International Symposium on Theoretical Aspects of Computer Science, STACS 2019 (LIPIcs, Vol. 126). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 6:1–6:15. https://doi.org/10.4230/LIPIcs.STACS.2019.6 Google ScholarGoogle ScholarCross RefCross Ref
  6. Shaull Almagor, Joël Ouaknine, and James Worrell. 2021. First-Order Orbit Queries. Theory Comput. Syst., 65, 4 (2021), 638–661. https://doi.org/10.1007/s00224-020-09976-7 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Christel Baier, Florian Funke, Simon Jantsch, Toghrul Karimov, Engel Lefaucheux, Florian Luca, Joël Ouaknine, David Purser, Markus A. Whiteland, and James Worrell. 2021. The Orbit Problem for Parametric Linear Dynamical Systems. 28:1–28:17 pages. https://doi.org/10.4230/LIPIcs.CONCUR.2021.28 Extended version with proofs Google ScholarGoogle ScholarCross RefCross Ref
  8. Amir M. Ben-Amram, Jesús J. Doménech, and Samir Genaim. 2019. Multiphase-Linear Ranking Functions and Their Relation to Recurrent Sets. In Static Analysis - 26th International Symposium, SAS 2019 (Lecture Notes in Computer Science, Vol. 11822). Springer, 459–480. https://doi.org/10.1007/978-3-030-32304-2_22 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Amir M. Ben-Amram and Samir Genaim. 2013. On the linear ranking problem for integer linear-constraint loops. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’13. ACM, 51–62. https://doi.org/10.1145/2429069.2429078 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Amir M. Ben-Amram and Samir Genaim. 2014. Ranking Functions for Linear-Constraint Loops. J. ACM, 61, 4 (2014), 26:1–26:55. https://doi.org/10.1145/2629488 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Amir M. Ben-Amram and Samir Genaim. 2017. On Multiphase-Linear Ranking Functions. In Computer Aided Verification - 29th International Conference, CAV 2017 (Lecture Notes in Computer Science, Vol. 10427). Springer, 601–620. https://doi.org/10.1007/978-3-319-63390-9_32 Google ScholarGoogle ScholarCross RefCross Ref
  12. Jacek Bochnak, Michel Coste, and Marie-Françoise Roy. 1998. Real algebraic geometry. 36, Springer-Verlag Berlin Heidelberg. isbn:978-3-540-64663-1 https://doi.org/10.1007/978-3-662-03718-8 Google ScholarGoogle ScholarCross RefCross Ref
  13. Bernard Boigelot. 2003. On iterating linear transformations over recognizable sets of integers. Theor. Comput. Sci., 309, 1-3 (2003), 413–468. https://doi.org/10.1016/S0304-3975(03)00314-1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Aaron R. Bradley, Zohar Manna, and Henny B. Sipma. 2005. Termination Analysis of Integer Linear Loops. In CONCUR 2005 - Concurrency Theory, 16th International Conference, CONCUR 2005 (Lecture Notes in Computer Science, Vol. 3653). Springer, 488–502. https://doi.org/10.1007/11539452_37 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Mark Braverman. 2006. Termination of Integer Linear Programs. In Computer Aided Verification, 18th International Conference, CAV 2006 (Lecture Notes in Computer Science, Vol. 4144). Springer, 372–385. https://doi.org/10.1007/11817963_34 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Jin-yi Cai, Richard J. Lipton, and Yechezkel Zalcstein. 2000. The Complexity of the A B C Problem. SIAM J. Comput., 29, 6 (2000), 1878–1888. https://doi.org/10.1137/S0097539794276853 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hong Yi Chen, Shaked Flur, and Supratik Mukhopadhyay. 2015. Termination proofs for linear simple loops. Int. J. Softw. Tools Technol. Transf., 17, 1 (2015), 47–57. https://doi.org/10.1007/s10009-013-0288-8 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ventsislav Chonev, Joël Ouaknine, and James Worrell. 2013. The orbit problem in higher dimensions. In Symposium on Theory of Computing Conference, STOC’13. ACM, 941–950. https://doi.org/10.1145/2488608.2488728 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Ventsislav Chonev, Joël Ouaknine, and James Worrell. 2015. The Polyhedron-Hitting Problem. 940–956. https://doi.org/10.1137/1.9781611973730.64 Google ScholarGoogle ScholarCross RefCross Ref
  20. Ventsislav Chonev, Joël Ouaknine, and James Worrell. 2016. On the Complexity of the Orbit Problem. J. ACM, 63, 3 (2016), 23:1–23:18. https://doi.org/10.1145/2857050 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Michael Colón, Sriram Sankaranarayanan, and Henny Sipma. 2003. Linear Invariant Generation Using Non-linear Constraint Solving. In Computer Aided Verification, 15th International Conference, CAV 2003 (Lecture Notes in Computer Science, Vol. 2725). Springer, 420–432. https://doi.org/10.1007/978-3-540-45069-6_39 Google ScholarGoogle ScholarCross RefCross Ref
  22. Michael Colón and Henny Sipma. 2001. Synthesis of Linear Ranking Functions. In Tools and Algorithms for the Construction and Analysis of Systems, 7th International Conference, TACAS 2001 (Lecture Notes in Computer Science, Vol. 2031). Springer, 67–81. https://doi.org/10.1007/3-540-45319-9_6 Google ScholarGoogle ScholarCross RefCross Ref
  23. Byron Cook, Andreas Podelski, and Andrey Rybalchenko. 2006. Termination proofs for systems code. In Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation. ACM, 415–426. https://doi.org/10.1145/1133981.1134029 Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Byron Cook, Andreas Podelski, and Andrey Rybalchenko. 2006. Terminator: Beyond Safety. In Computer Aided Verification, 18th International Conference, CAV 2006 (Lecture Notes in Computer Science, Vol. 4144). Springer, 415–418. https://doi.org/10.1007/11817963_37 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Patrick Cousot. 2005. Proving Program Invariance and Termination by Parametric Abstraction, Lagrangian Relaxation and Semidefinite Programming. In Verification, Model Checking, and Abstract Interpretation, 6th International Conference, VMCAI 2005 (Lecture Notes in Computer Science, Vol. 3385). Springer, 1–24. https://doi.org/10.1007/978-3-540-30579-8_1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Patrick Cousot and Nicolas Halbwachs. 1978. Automatic Discovery of Linear Restraints Among Variables of a Program. In Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages 1978. ACM Press, 84–96. https://doi.org/10.1145/512760.512770 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Graham Everest, Alfred J. van der Poorten, Igor E. Shparlinski, and Thomas Ward. 2003. Recurrence Sequences (Mathematical surveys and monographs, Vol. 104). American Mathematical Society. isbn:978-0-8218-3387-2 http://www.ams.org/bookstore?fn=20&arg1=survseries& item=SURV-104Google ScholarGoogle Scholar
  28. Nathanaël Fijalkow, Pierre Ohlmann, Joël Ouaknine, Amaury Pouly, and James Worrell. 2019. Complete Semialgebraic Invariant Synthesis for the Kannan-Lipton Orbit Problem. Theory Comput. Syst., 63, 5, 1027–1048. https://doi.org/10.1007/s00224-019-09913-3 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Susanne Graf and Hassen Saïdi. 1997. Construction of Abstract State Graphs with PVS. In Computer Aided Verification, 9th International Conference, CAV ’97 (Lecture Notes in Computer Science, Vol. 1254). Springer, 72–83. https://doi.org/10.1007/3-540-63166-6_10 Google ScholarGoogle ScholarCross RefCross Ref
  30. Ashutosh Gupta, Thomas A. Henzinger, Rupak Majumdar, Andrey Rybalchenko, and Ru-Gang Xu. 2008. Proving non-termination. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2008. ACM, 147–158. https://doi.org/10.1145/1328438.1328459 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Vesa Halava, Tero Harju, and Mika Hirvensalo. 2006. Positivity of second order linear recurrent sequences. Discret. Appl. Math., 154, 3 (2006), 447–451. https://doi.org/10.1016/j.dam.2005.10.009 Google ScholarGoogle ScholarCross RefCross Ref
  32. Georges Hansel. 1985. A Simple Proof of the Skolem-Mahler-Lech Theorem. In Automata, Languages and Programming, 12th Colloquium (Lecture Notes in Computer Science, Vol. 194). Springer, 244–249. https://doi.org/10.1007/BFb0015749 Google ScholarGoogle ScholarCross RefCross Ref
  33. Michael A. Harrison. 1969. Lectures on Linear Sequential Machines. Academic Press, New York.Google ScholarGoogle Scholar
  34. Mehran Hosseini, Joël Ouaknine, and James Worrell. 2019. Termination of Linear Loops over the Integers. In 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019 (LIPIcs, Vol. 132). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 118:1–118:13. https://doi.org/10.4230/LIPIcs.ICALP.2019.118 Google ScholarGoogle ScholarCross RefCross Ref
  35. Bertrand Jeannet, Peter Schrammel, and Sriram Sankaranarayanan. 2014. Abstract acceleration of general linear loops. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14. ACM, 529–540. https://doi.org/10.1145/2535838.2535843 Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Ranjit Jhala, Andreas Podelski, and Andrey Rybalchenko. 2018. Predicate Abstraction for Program Verification. In Handbook of Model Checking. Springer, 447–491. https://doi.org/10.1007/978-3-319-10575-8_15 Google ScholarGoogle ScholarCross RefCross Ref
  37. Ravindran Kannan and Richard J. Lipton. 1980. The Orbit Problem is Decidable. In Proceedings of the 12th Annual ACM Symposium on Theory of Computing 1980. ACM, 252–261. https://doi.org/10.1145/800141.804673 Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Ravindran Kannan and Richard J. Lipton. 1986. Polynomial-time algorithm for the orbit problem. J. ACM, 33, 4 (1986), 808–821. https://doi.org/10.1145/6490.6496 Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Toghrul Karimov, Joël Ouaknine, and James Worrell. 2020. On LTL Model Checking for Low-Dimensional Discrete Linear Dynamical Systems. In 45th International Symposium on Mathematical Foundations of Computer Science, MFCS 2020 (LIPIcs, Vol. 170). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 54:1–54:14. https://doi.org/10.4230/LIPIcs.MFCS.2020.54 Google ScholarGoogle ScholarCross RefCross Ref
  40. Manuel Kauers and Peter Paule. 2011. The Concrete Tetrahedron - Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates. Springer. isbn:978-3-7091-0444-6 https://doi.org/10.1007/978-3-7091-0445-3 Google ScholarGoogle ScholarCross RefCross Ref
  41. Zachary Kincaid, Jason Breck, John Cyphert, and Thomas W. Reps. 2019. Closed forms for numerical loops. Proc. ACM Program. Lang., 3, POPL (2019), 55:1–55:29. https://doi.org/10.1145/3290368 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Zachary Kincaid, John Cyphert, Jason Breck, and Thomas W. Reps. 2018. Non-linear reasoning for invariant synthesis. Proc. ACM Program. Lang., 2, POPL (2018), 54:1–54:33. https://doi.org/10.1145/3158142 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Vichian Laohakosol and Pinthira Tangsupphathawat. 2009. Positivity of third order linear recurrence sequences. Discret. Appl. Math., 157, 15 (2009), 3239–3248. https://doi.org/10.1016/j.dam.2009.06.021 Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Engel Lefaucheux, Joël Ouaknine, David Purser, and James Worrell. 2021. Porous Invariants. In Computer Aided Verification - 33rd International Conference, CAV 2021 (Lecture Notes in Computer Science, Vol. 12760). Springer, 172–194. https://doi.org/10.1007/978-3-030-81688-9_8 Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Martin Leucker and Christian Schallhart. 2009. A brief account of runtime verification. J. Log. Algebraic Methods Program., 78, 5 (2009), 293–303. https://doi.org/10.1016/j.jlap.2008.08.004 Google ScholarGoogle ScholarCross RefCross Ref
  46. Nicolas Markey and Philippe Schnoebelen. 2003. Model Checking a Path. In CONCUR 2003 - Concurrency Theory, 14th International Conference (Lecture Notes in Computer Science, Vol. 2761). Springer, 248–262. https://doi.org/10.1007/978-3-540-45187-7_17 Google ScholarGoogle ScholarCross RefCross Ref
  47. David W. Masser. 1988. Linear relations on algebraic groups. Cambridge University Press, 248–262. https://doi.org/10.1017/CBO9780511897184.016 Google ScholarGoogle ScholarCross RefCross Ref
  48. Maurice Mignotte. 1982. Some Useful Bounds. Springer Vienna, Vienna. 259–263. https://doi.org/10.1007/978-3-7091-3406-1_16 Google ScholarGoogle ScholarCross RefCross Ref
  49. Andrei A. Muchnik, Alexei L. Semenov, and Maxim Ushakov. 2003. Almost periodic sequences. Theor. Comput. Sci., 304, 1-3 (2003), 1–33. https://doi.org/10.1016/S0304-3975(02)00847-2 Google ScholarGoogle ScholarCross RefCross Ref
  50. Joël Ouaknine, João Sousa Pinto, and James Worrell. 2017. On the Polytope Escape Problem for Continuous Linear Dynamical Systems. In Proceedings of the 20th International Conference on Hybrid Systems: Computation and Control, HSCC 2017. ACM, 11–17. https://doi.org/10.1145/3049797.3049798 Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Joël Ouaknine and James Worrell. 2014. On the Positivity Problem for Simple Linear Recurrence Sequences,. In Automata, Languages, and Programming. Springer Berlin Heidelberg, Berlin, Heidelberg. 318–329. https://doi.org/10.1007/978-3-662-43951-7_27 Extended version with proofs Google ScholarGoogle ScholarCross RefCross Ref
  52. Joël Ouaknine and James Worrell. 2014. Positivity Problems for Low-Order Linear Recurrence Sequences. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014. SIAM, 366–379. https://doi.org/10.1137/1.9781611973402.27 Google ScholarGoogle ScholarCross RefCross Ref
  53. Joël Ouaknine and James Worrell. 2014. Ultimate Positivity is Decidable for Simple Linear Recurrence Sequences. In Automata, Languages, and Programming - 41st International Colloquium, ICALP 2014 (Lecture Notes in Computer Science, Vol. 8573). Springer, 330–341. https://doi.org/10.1007/978-3-662-43951-7_28 Google ScholarGoogle ScholarCross RefCross Ref
  54. Joël Ouaknine and James Worrell. 2015. On linear recurrence sequences and loop termination. ACM SIGLOG News, 2, 2 (2015), 4–13. https://dl.acm.org/citation.cfm?id=2766191Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Andreas Podelski and Andrey Rybalchenko. 2004. A Complete Method for the Synthesis of Linear Ranking Functions. In Verification, Model Checking, and Abstract Interpretation, 5th International Conference, VMCAI (Lecture Notes in Computer Science, Vol. 2937). Springer, 239–251. https://doi.org/10.1007/978-3-540-24622-0_20 Google ScholarGoogle ScholarCross RefCross Ref
  56. Andreas Podelski and Andrey Rybalchenko. 2004. Transition Invariants. In 19th IEEE Symposium on Logic in Computer Science (LICS 2004). IEEE Computer Society, 32–41. https://doi.org/10.1109/LICS.2004.1319598 Google ScholarGoogle ScholarCross RefCross Ref
  57. Enric Rodríguez-Carbonell and Deepak Kapur. 2004. An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants. In Static Analysis, 11th International Symposium, SAS 2004 (Lecture Notes in Computer Science, Vol. 3148). Springer, 280–295. https://doi.org/10.1007/978-3-540-27864-1_21 Google ScholarGoogle ScholarCross RefCross Ref
  58. Enric Rodríguez-Carbonell and Deepak Kapur. 2007. Generating all polynomial invariants in simple loops. J. Symb. Comput., 42, 4 (2007), 443–476. https://doi.org/10.1016/j.jsc.2007.01.002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Aleksei Lvovich Semenov. 1984. Logical theories of one-place functions on the set of natural numbers. Mathematics of the USSR-Izvestiya, 22, 3 (1984), 587.Google ScholarGoogle ScholarCross RefCross Ref
  60. Sergey P. Tarasov and Mikhail N. Vyalyi. 2011. Orbits of Linear Maps and Regular Languages. In Computer Science - Theory and Applications - 6th International Computer Science Symposium in Russia, CSR 2011 (Lecture Notes in Computer Science, Vol. 6651). Springer, 305–316. https://doi.org/10.1007/978-3-642-20712-9_24 Google ScholarGoogle ScholarCross RefCross Ref
  61. Robert Tijdeman, Maurice Mignotte, and Tarlok Nath Shorey. 1984. The distance between terms of an algebraic recurrence sequence.. Journal für die reine und angewandte Mathematik, 349 (1984), 63–76. http://eudml.org/doc/152622Google ScholarGoogle Scholar
  62. Ashish Tiwari. 2004. Termination of Linear Programs. In Computer Aided Verification, 16th International Conference, CAV 2004 (Lecture Notes in Computer Science, Vol. 3114). Springer, 70–82. https://doi.org/10.1007/978-3-540-27813-9_6 Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. What’s decidable about linear loops?

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Proceedings of the ACM on Programming Languages
      Proceedings of the ACM on Programming Languages  Volume 6, Issue POPL
      January 2022
      1886 pages
      EISSN:2475-1421
      DOI:10.1145/3511309
      Issue’s Table of Contents

      Copyright © 2022 Owner/Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 January 2022
      Published in pacmpl Volume 6, Issue POPL

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!