Automated Software Engineering

, Volume 23, Issue 2, pp 191–217 | Cite as

Verifying floating-point programs with constraint programming and abstract interpretation techniques

  • Olivier Ponsini
  • Claude Michel
  • Michel Rueher


Static value analysis is a classical approach for verifying programs with floating-point computations. Value analysis mainly relies on abstract interpretation and over-approximates the possible values of program variables. State-of-the-art tools may however compute over-approximations that can be rather coarse for some very usual program expressions. In this paper, we show that constraint solvers can significantly refine approximations computed with abstract interpretation tools. More precisely, we introduce a hybrid approach combining abstract interpretation and constraint programming techniques in a single static and automatic analysis. This hybrid approach benefits from the strong points of abstract interpretation and constraint programming techniques, and thus, it is more effective than static analysers and constraint solvers, when used separately. We compared the efficiency of the system we developed—named rAiCp—with state-of-the-art static analyzers: rAiCp produces substantially more precise approximations and is able to check program properties on both academic and industrial benchmarks.


Program verification Floating-point computation Constraint solving over floating-point numbers Constraint solving over real number intervals Abstract interpretation-based approximation 



The authors gratefully acknowledge Sylvie Putot, Éric Goubault and Franck Védrine for their advice and help on using Fluctuat. We also gratefully acknowledge Laurent Arditi and Hélène Collavizza who carefully read this paper and provided critical comments. This work was partially supported by ANR VACSIM (ANR-11-INSE-0004), ANR AEOLUS (ANR-10-SEGI-0013), and OSEO ISI PAJERO projects. Part of this work was done while Michel Rueher was visiting Professor at NII (National Institute of Informatics) 2-1-2 Hitotsubashi, Chiyoda-ku, Tokyo 101-8430.


  1. Ayad, A., Marché, C.: Multi-prover verification of floating-point programs. In: Proceedings of the IJCAR, LNCS, vol. 6173, pp. 127–141. Springer, Berlin (2010)Google Scholar
  2. Barnett, M., Leino, K.R.M.: Weakest-precondition of unstructured programs. Inf. Process. Lett. 93(6), 281–288 (2005)CrossRefGoogle Scholar
  3. Boldo, S., Filliâtre, JC.: Formal verification of floating-point programs. In: Proceedings of the 18th IEEE Symposium on Computer Arithmetic, IEEE, pp. 187–194. IEEE (2007)Google Scholar
  4. Botella, B., Gotlieb, A., Michel, C.: Symbolic execution of floating-point computations. Softw. Testing Verif. Reliab. 16(2), 97–121 (2006)CrossRefGoogle Scholar
  5. Brillout, A., Kroening, D., Wahl, T.: Mixed abstractions for floating-point arithmetic. In: Proceedings of the 9th International Conference on Formal Methods in Computer-Aided Design, IEEE, pp. 69–76. IEEE (2009)Google Scholar
  6. Codognet, P., Filé, G.: Computations, abstractions and constraints in logic programs. In: Proceedings of the International Conference on Computer Languages (ICCL’92), IEEE, pp. 155–164. IEEE (1992)Google Scholar
  7. Collavizza, H., Rueher, M., Hentenryck, P.V.: A constraint-programming framework for bounded program verification. Constr. J. 15(2), 238–264 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  8. Cousot, P., Cousot, R., Feret, J., Miné, A., Mauborgne, L., Monniaux, D., Rival, X.: Varieties of static analyzers: a comparison with ASTRÉE. In: Proceedings of the 1st Joint IEEE/IFIP Symposium on Theoretical Aspects of Software Engineering, IEEE, pp. 3–20. IEEE (2007)Google Scholar
  9. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the POPL, pp. 238–252. ACM, (1977)Google Scholar
  10. Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Proceedings of the POPL, pp. 269–282. ACM Press, (1979)Google Scholar
  11. Cousot, P.: Abstract interpretation based formal methods and future challenges. In: Wilhelm, R. (ed) Informatics-10 Years Back. 10 Years Ahead, Lecture Notes in Computer Science, vol. 2000, pp. 138–156. Springer, Berlin (2001)Google Scholar
  12. Delmas, D., Goubault, E., Putot, S., Souyris, J., Tekkal, K., Védrine, F.: Towards an industrial use of FLUCTUAT on safety-critical avionics software. In: Proceedings of the FMICS, LNCS, vol. 5825, pp. 53–69. Springer, Berlin (2009)Google Scholar
  13. Denmat, T., Gotlieb, A., Ducassé, M.: An abstract interpretation based combinator for modeling while loops in constraint programming. In: Proceedings of the Principles and Practices of Constraint Programming (CP’07), LNCS, vol. 4741, pp. 241–255. Springer Verlag, Berlin (2007)Google Scholar
  14. de Dinechin, F., Lauter, C.Q., Melquiond, G.: Certifying the floating-point implementation of an elementary function using Gappa. IEEE Trans. Comput. 60(2), 242–253 (2011)MathSciNetCrossRefGoogle Scholar
  15. D’Silva, V., Haller, L., Kroening, D., Tautschnig, M.: Numeric bounds analysis with conflict-driven learning. In: Proceedings of the TACAS, Lecture Notes in Computer Science, vol. 7214, pp. 48–63. Springer, Berlin (2012)Google Scholar
  16. Ghorbal, K., Goubault, E., Putot, S.: A logical product approach to zonotope intersection. In: Proceedings of the CAV, LNCS, vol. 6174, pp. 212–226. Springer, Berlin (2010)Google Scholar
  17. Girard, A.: Reachability of uncertain linear systems using zonotopes. In: Proceedings of the HSCC, Lecture Notes in Computer Science, vol. 3414, pp. 291–305. Springer, Berlin, (2005)Google Scholar
  18. Goldberg, D.: What every computer scientist should know about floating point arithmetic. ACM Comput. Surv. 23(1), 5–48 (1991)CrossRefGoogle Scholar
  19. Goubault, E., Putot, S.: Static analysis of numerical algorithms. In: Proceedings of the SAS, LNCS, vol. 4134, pp. 18–34. Springer, Berlin (2006)Google Scholar
  20. Granvilliers, L., Benhamou, F.: Algorithm 852: RealPaver: an interval solver using constraint satisfaction techniques. ACM Trans. Math. Softw. 32(1), 138–156 (2006)MathSciNetCrossRefGoogle Scholar
  21. Harrison, J.: A machine-checked theory of floating-point arithmetic. TPHOLs, LNCS, vol. 1690, pp. 113–130. Springer-Verlag, Berlin (1999)Google Scholar
  22. Hentenryck, P.V., Mcallester, D., Kapur, D.: Solving polynomial systems using a branch and prune approach. SIAM J. Numer. Ana. 34, 797–827 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  23. Lhomme, O.: Consistency techniques for numeric CSPs. In: Proceedings of the 13th International Joint Conference on Artificial Intelligence, pp. 232–238. Morgan Kaufmann Publishers Inc., Burlington (1993)Google Scholar
  24. Marre, B., Michel, C.: Improving the floating point addition and subtraction constraints. In: Proceedings of the CP, LNCS, vol. 6308, pp. 360–367. Springer, Berlin (2010)Google Scholar
  25. Michel, C., Rueher, M., Lebbah, Y.: Solving constraints over floating-point numbers. In: Principles and Practice of Constraint Programming—CP, LNCS, vol. 2239, pp. 524–538. Springer Verlag, Berlin (2001)Google Scholar
  26. Michel, C.: Exact projection functions for floating-point number constraints. In: Proceedings of the 7th International Symposium on Artificial Intelligence and Mathematics. (2002)Google Scholar
  27. Pelleau, M., Miné, A., Truchet, C., Benhamou, F.: A constraint solver based on abstract domains. In: Giacobazzi, R., Berdine, J., Mastroeni, I. (eds) 14th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI 2013), Lecture Notes in Computer Science, vol. 7737, pp. 434–454. Springer, Berlin (2013)Google Scholar
  28. Rossi, F., van Beek, P., Walsh, T. (eds.): Handbook of Constraint Programming, 1st edn. Elsevier Science, Amsterdam (2006)Google Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  1. 1.Université de Nice Sophia Antipolis, CNRS, I3SSophia AntipolisFrance

Personalised recommendations