A Three-Tier Strategy for Reasoning About Floating-Point Numbers in SMT

  • Sylvain Conchon
  • Mohamed Iguernlala
  • Kailiang Ji
  • Guillaume Melquiond
  • Clément Fumex
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10427)

Abstract

The SMT-LIB standard defines a formal semantics for a theory of floating-point (FP) arithmetic (FPA). This formalization reduces FP operations to reals by means of a rounding operator, as done in the IEEE-754 standard. Closely following this description, we propose a three-tier strategy to reason about FPA in SMT solvers. The first layer is a purely axiomatic implementation of the automatable semantics of the SMT-LIB standard. It reasons with exceptional cases (e.g. overflows, division by zero, undefined operations) and reduces finite representable FP expressions to reals using the rounding operator. At the core of our strategy, a second layer handles a set of lemmas about the properties of rounding. For these lemmas to be used effectively, we extend the instantiation mechanism of SMT solvers to tightly cooperate with the third layer, the NRA engine of SMT solvers, which provides interval information. We implemented our strategy in the Alt-Ergo SMT solver and validated it on a set of benchmarks coming from the SMT-LIB competition, but also from the deductive verification of C and SPARK programs. The results show that our approach is promising and compete with existing techniques implemented in state-of-the-art SMT solvers.

Keywords

SMT Floating-point arithmetic Program verification 

References

  1. 1.
    IEEE Standard for Floating-Point Arithmetic. Technical report. IEEE, August 2008Google Scholar
  2. 2.
    Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard: version 2.5. Technical report, Department of Computer Science, The University of Iowa (2015)Google Scholar
  3. 3.
    Boldo, S., Melquiond, G.: Flocq: a unified library for proving floating-point algorithms in Coq. In: Antelo, E., Hough, D., Ienne, P. (eds.) Proceedings of the 20th IEEE Symposium on Computer Arithmetic, Tübingen, Germany, pp. 243–252 (2011)Google Scholar
  4. 4.
    Brain, M., D’Silva, V., Griggio, A., Haller, L., Kroening, D.: Deciding floating-point logic with abstract conflict driven clause learning. Form. Methods Syst. Des. 45(2), 213–245 (2014). doi:10.1007/s10703-013-0203-7 CrossRefMATHGoogle Scholar
  5. 5.
    Brain, M., Tinelli, C., Rümmer, P., Wahl, T.: An automatable formal semantics for IEEE-754 floating-point arithmetic. In: Muller, J.-M., Tisserand, A., Villalba, J. (eds.) Proceedings of the 22nd IEEE Symposium on Computer Arithmetic, pp. 160–167. IEEE, Washington, D.C. (2015)Google Scholar
  6. 6.
    Daumas, M., Rideau, L., Théry, L.: A generic library for floating-point numbers and its application to exact computing. In: Boulton, R.J., Jackson, P.B. (eds.) TPHOLs 2001. LNCS, vol. 2152, pp. 169–184. Springer, Heidelberg (2001). doi:10.1007/3-540-44755-5_13 CrossRefGoogle Scholar
  7. 7.
    de Dinechin, F., Lauter, C., Melquiond, G.: Certifying the floating-point implementation of an elementary function using Gappa. Trans. Comput. 60(2), 242–253 (2011)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Fumex, C., Marché, C., Moy, Y.: Automated verification of floating-point computations in Ada programs. Research Report RR-9060, Inria Saclay-Île-de-France, April 2017Google Scholar
  9. 9.
    Goubault, E., Martel, M., Putot, S.: Asserting the precision of floating-point computations: a simple abstract interpreter. In: Métayer, D. (ed.) ESOP 2002. LNCS, vol. 2305, pp. 209–212. Springer, Heidelberg (2002). doi:10.1007/3-540-45927-8_15 CrossRefGoogle Scholar
  10. 10.
    Harrison, J.: A machine-checked theory of floating point arithmetic. In: Bertot, Y., Dowek, G., Théry, L., Hirschowitz, A., Paulin, C. (eds.) TPHOLs 1999. LNCS, vol. 1690, pp. 113–130. Springer, Heidelberg (1999). doi:10.1007/3-540-48256-3_9 CrossRefGoogle Scholar
  11. 11.
    Leeser, M., Mukherjee, S., Ramachandran, J., Wahl, T.: Make it real: effective floating-point reasoning via exact arithmetic. In: Design, Automation and Test in Europe Conference and Exhibition (DATE), Dresden, Germany, pp. 1–4, March 2014Google Scholar
  12. 12.
    Michel, C., Rueher, M., Lebbah, Y.: Solving constraints over floating-point numbers. In: Walsh, T. (ed.) CP 2001. LNCS, vol. 2239, pp. 524–538. Springer, Heidelberg (2001). doi:10.1007/3-540-45578-7_36 CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Sylvain Conchon
    • 2
    • 3
  • Mohamed Iguernlala
    • 1
    • 2
  • Kailiang Ji
    • 2
  • Guillaume Melquiond
    • 3
  • Clément Fumex
    • 2
    • 3
  1. 1.OCamlPro SASGif-sur-YvetteFrance
  2. 2.LRI (CNRS & Univ Paris-Sud)Université Paris-SaclayOrsayFrance
  3. 3.Inria, Université Paris-SaclayPalaiseauFrance

Personalised recommendations