A Practical Approach to Interval Refinement for math.h/cmath Functions
Roberto Bagnara, Michele Chiari, Roberta Gori, Abramo Bagnara

TL;DR
This paper presents a practical interval refinement method for math.h/cmath functions in C++, enabling formal verification despite the lack of guarantees in standard libraries by exploiting their near-monotonicity and small glitches.
Contribution
It introduces novel interval refinement algorithms that handle non-correctly rounded functions, facilitating verification techniques like symbolic execution and abstract interpretation.
Findings
Effective detection of anomalous behaviors in real-world code
Ability to verify functions with small, rare glitches
First algorithms to handle non-correctly rounded implementations
Abstract
Verification of C++ programs has seen considerable progress in several areas, but not for programs that use these languages' mathematical libraries. The reason is that all libraries in widespread use come with no guarantees about the computed results. This would seem to prevent any attempt at formal verification of programs that use them: without a specification for the functions, no conclusion can be drawn statically about the behavior of the program. We propose an alternative to surrender. We introduce a pragmatic approach that leverages the fact that most math.h/cmath functions are almost piecewise monotonic: as we discovered through exhaustive testing, they may have glitches, often of very small size and in small numbers. We develop interval refinement techniques for such functions based on a modified dichotomic search, that enable verification via symbolic execution based model…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Formal Methods in Verification · Software Reliability and Analysis Research
