Advertisement

On the Linear Ranking Problem for Simple Floating-Point Loops

  • Fonenantsoa Maurica
  • Frédéric Mesnard
  • Étienne Payet
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9837)

Abstract

Termination of loops can be inferred from the existence of linear ranking functions. We already know that the existence of these functions is PTIME decidable for simple rational loops. Since very recently, we know that the problem is coNP-complete for simple integer loops. We continue along this path by investigating programs dealing with floating-point computations. First, we show that the problem is at least in coNP for simple floating-point loops. Then, in order to work around that theoretical limitation we present an algorithm which remains polynomial by sacrificing completeness. The algorithm, based on the Podelski-Rybalchenko algorithm, can also synthesize in polynomial time the linear ranking functions it detects. To our knowledge, our work is the first adaptation of this well-known algorithm to floating-points.

Keywords

Termination analysis Linear ranking functions Floating-point numbers 

References

  1. 1.
    Bagnara, R., Mesnard, F., Pescetti, A., Zaffanella, E.: A new look at the automatic synthesis of linear ranking functions. Inf. Comput. 215, 47–67 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Baier, C., Katoen, J.: Principles of Model Checking. MIT Press, Cambridge (2008)zbMATHGoogle Scholar
  3. 3.
    Belaid, M.S., Michel, C., Rueher, M.: Boosting local consistency algorithms over floating-point numbers. In: Milano, M. (ed.) CP 2012. LNCS, vol. 7514, pp. 127–140. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  4. 4.
    Ben-Amram, A.M.: Ranking functions for linear-constraint loops. In: Lisitsa, A., Nemytykh, A.P. (eds.) Proceedings of the 1st International Workshop on Verification and Program Transformation (VPT 2013). EPiC Series, vol. 16, pp. 1–8. EasyChair (2013)Google Scholar
  5. 5.
    Ben-Amram, A.M., Genaim, S.: Ranking functions for linear-constraint loops. J. ACM 61(4), 26:1–26:55 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Ben-Amram, A.M., Genaim, S., Masud, A.N.: On the termination of integer loops. ACM Trans. Program. Lang. Syst. 34(4), 16 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Braverman, M.: Termination of integer linear programs. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 372–385. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  8. 8.
    Chen, H.Y.: Program analysis: termination proofs for linear simple loops. Ph.D. thesis, Louisiana State University (2012)Google Scholar
  9. 9.
    Chen, H.Y., Flur, S., Mukhopadhyay, S.: Termination proofs for linear simple loops. Softw. Tools Technol. Transfer 17(1), 47–57 (2015)CrossRefGoogle Scholar
  10. 10.
    Cook, B., Kroening, D., Rümmer, P., Wintersteiger, C.M.: Ranking function synthesis for bit-vector relations. Formal Methods Syst. Des. 43(1), 93–120 (2013)CrossRefzbMATHGoogle Scholar
  11. 11.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for staticanalysis of programs by construction or approximation of fixpoints. In: Graham, R.M., Harrison, M.A., Sethi, R. (eds.) Proceedings of the 4th ACM Symposium on Principles of Programming Languages (POPL 1977), pp. 238–252. ACM (1977)Google Scholar
  12. 12.
    David, C., Kroening, D., Lewis, M.: Unrestricted termination and non-termination arguments for bit-vector programs. In: Vitek, J. (ed.) ESOP 2015. LNCS, vol. 9032, pp. 183–204. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  13. 13.
    Feautrier, P.: Some efficient solutions to the affine scheduling problem. I. One-dimensional time. Int. J. Parallel Prog. 21(5), 313–347 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Fousse, L., Hanrot, G., Lefèvre, V., Pélissier, P., Zimmermann, P.: MPFR: a multiple-precision binary floating-point library with correct rounding. ACM Trans. Math. Softw. 33(2), 13 (2007)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Goldberg, D.: What every computer scientist should know about floating-point arithmetic. ACM Comput. Surv. 23(1), 5–48 (1991)CrossRefGoogle Scholar
  16. 16.
    Jeannerod, C.-P., Rump, S.M.: On relative errors of floating-point operations: optimal bounds and applications (2014). PreprintGoogle Scholar
  17. 17.
    Khachiyan, L.: Polynomial algorithms in linear programming. USSR Comput. Math. Math. Phys. 20(1), 53–72 (1980)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Maurica, F., Mesnard, F., Payet, E.: Termination analysis of floating-point programs using parameterizable rational approximations. In: Proceedings of the 31st ACM Symposium on Applied Computing (SAC 2016) (2016)Google Scholar
  19. 19.
    Mesnard, F., Serebrenik, A.: Recurrence with affine level mappings is P-time decidable for CLP(R). Theory Pract. Logic Program. 8(1), 111–119 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Miné, A.: Relational abstract domains for the detection of floating-point run-time errors. Computing Research Repository, abs/cs/0703077 (2007)Google Scholar
  21. 21.
    Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 239–251. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  22. 22.
    Serebrenik, A., Schreye, D.D.: Termination of floating-point computations. J. Autom. Reasoning 34(2), 141–177 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Sipser, M.: Introduction to the Theory of Computation. PWS Publishing Company, Boston (1997)zbMATHGoogle Scholar
  24. 24.
    Tiwari, A.: Termination of linear programs. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 70–82. Springer, Heidelberg (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany 2016

Authors and Affiliations

  • Fonenantsoa Maurica
    • 1
  • Frédéric Mesnard
    • 1
  • Étienne Payet
    • 1
  1. 1.Laboratoire d’Informatique et de MathématiquesUniversité de La RéunionSainte-Clotilde, La RéunionFrance

Personalised recommendations