Advertisement

Generalized Homogeneous Polynomials for Efficient Template-Based Nonlinear Invariant Synthesis

  • Kensuke Kojima
  • Minoru Kinoshita
  • Kohei Suenaga
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9837)

Abstract

The template-based method is one of the most successful approaches to algebraic invariant synthesis. In this method, an algorithm designates a template polynomial \(p\) over program variables, generates constraints for \(p=0\) to be an invariant, and solves the generated constraints. However, this approach often suffers from an increasing template size if the degree of a template polynomial is too high.

We propose a technique to make template-based methods more efficient. Our technique is based on the following finding: If an algebraic invariant exists, then there is a specific algebraic invariant that we call a generalized homogeneous algebraic invariant that is often smaller. This finding justifies using only a smaller template that corresponds to a generalized homogeneous algebraic invariant.

Concretely, we state our finding above formally based on the abstract semantics of an imperative program proposed by Cachera et al. Then, we modify their template-based invariant synthesis so that it generates only generalized homogeneous algebraic invariants. This modification is proved to be sound. Furthermore, we also empirically demonstrate the merit of the restriction to generalized homogeneous algebraic invariants. Our implementation outperforms that of Cachera et al. for programs that require a higher-degree template.

Notes

Acknowledgment

We appreciate annonymous reviewers, Toshimitsu Ushio, Naoki Kobayashi and Atsushi Igarashi for their comments. This work is partially supported by JST PRESTO, JST CREST, KAKENHI 70633692, and in collaboration with the Toyota Motor Corporation.

References

  1. 1.
    Adjé, A., Garoche, P.-L., Magron, V.: Property-based polynomial invariant generation using sums-of-squares optimization. In: Blazy, S., Jensen, T. (eds.) SAS 2015. LNCS, vol. 9291, pp. 235–251. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  2. 2.
    Barenblatt, G.I.: Scaling, Self-Similarity, and Intermediate Asymptotics: Dimensional Analysis and Intermediate Asymptotics, vol. 14. Cambridge University Press, Cambridge (1996)CrossRefMATHGoogle Scholar
  3. 3.
    Buckingham, E.: On physically similar systems; illustrations of the use of dimensional equations. Phys. Rev. 4, 345–376 (1914)CrossRefGoogle Scholar
  4. 4.
    Cachera, D., Jensen, T.P., Jobin, A., Kirchner, F.: Inference of polynomial invariants for imperative programs: a farewell to Gröbner bases. Sci. Comput. Program. 93, 89–109 (2014)CrossRefGoogle Scholar
  5. 5.
    Cox, D.A., Little, J., O’Shea, D.: Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Undergraduate Texts in Mathematics, 3rd edn. Springer, New York (2007)CrossRefMATHGoogle Scholar
  6. 6.
    Dai, L., Xia, B., Zhan, N.: Generating non-linear interpolants by semidefinite programming. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 364–380. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  7. 7.
    Garg, P., Löding, C., Madhusudan, P., Neider, D.: ICE: a robust framework for learning invariants. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 69–87. Springer, Heidelberg (2014)Google Scholar
  8. 8.
    Gonzalez-Vega, L., Lombardi, H.: Smooth parametrizations for several cases of the Positivstellensatz. Mathematische Zeitschrift 225(3), 427–451 (1997). http://dx.doi.org/10.1007/PL00004620 MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Gulwani, S., Tiwari, A.: Constraint-based approach for analysis of hybrid systems. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 190–203. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  10. 10.
    Hankey, A., Stanley, H.E.: Systematic application of generalized homogeneous functions to static scaling, dynamic scaling, and universality. Phys. Rev. B 6(9), 3515 (1972)CrossRefGoogle Scholar
  11. 11.
    Hasuo, I., Suenaga, K.: Exercises in nonstandard static analysis of hybrid systems. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 462–478. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  12. 12.
    Kennedy, A.: Dimension types. In: ESOP 1994, pp. 348–362 (1994)Google Scholar
  13. 13.
    Kennedy, A.: Programming languages and dimensions. Ph.D. thesis, St. Catharine’s College, March 1996Google Scholar
  14. 14.
    Lankford, D., Butler, G., Brady, B.: Abelian group unification algorithms for elementary terms. Contemp. Math. 29, 193–199 (1984)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    de Moura, L., Bjørner, N.S.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  16. 16.
    Müller-Olm, M., Seidl, H.: Computing polynomial program invariants. Inf. Process. Lett. 91(5), 233–244 (2004)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Neusel, M.D.: Invariant theory. The American Mathematical Society (2000)Google Scholar
  18. 18.
    Rodríguez-Carbonell, E.: Some programs that need polynomial invariants in order to be verified. http://www.cs.upc.edu/erodri/webpage/polynomial_invariants/list.html. Accessed 25 January 2016
  19. 19.
    Rodríguez-Carbonell, E., Kapur, D.: Generating all polynomial invariants in simple loops. J. Symb. Comput. 42(4), 443–476 (2007)MathSciNetCrossRefMATHGoogle Scholar
  20. 20.
    Sankaranarayanan, S., Sipma, H., Manna, Z.: Non-linear loop invariant generation using Gröbner bases. In: POPL 2004, pp. 318–329 (2004)Google Scholar
  21. 21.
    Somenzi, F., Bradley, A.R.: IC3: where monolithic and incremental meet. In: FMCAD 2011, pp. 3–8 (2011)Google Scholar
  22. 22.
    Stengle, G.: A nullstellensatz and a positivstellensatz in semialgebraic geometry. Mathematische Annalen 207(2), 87–97 (1974)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    Suenaga, K., Hasuo, I.: Programming with infinitesimals: a while-language for hybrid system modeling. In: Aceto, L., Henzinger, M., Sgall, J. (eds.) ICALP 2011, Part II. LNCS, vol. 6756, pp. 392–403. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  24. 24.
    Suenaga, K., Sekine, H., Hasuo, I.: Hyperstream processing systems: nonstandard modeling of continuous-time signals. In: Giacobazzi, R., Cousot, R. (eds.) POPL 2013, pp. 417–430. ACM (2013)Google Scholar

Copyright information

© Springer-Verlag GmbH Germany 2016

Authors and Affiliations

  • Kensuke Kojima
    • 1
    • 2
  • Minoru Kinoshita
    • 1
    • 4
  • Kohei Suenaga
    • 1
    • 3
  1. 1.Kyoto UniversityKyotoJapan
  2. 2.JST CRESTKyotoJapan
  3. 3.JST PRESTOKyotoJapan
  4. 4.KLab Inc.TokyoJapan

Personalised recommendations