Computer-Assisted Verification of Four Interval Arithmetic Operators
Interval arithmetic libraries provide the four elementary arithmetic operators for operand intervals bounded by floating-point numbers. However, actual implementations need to make a large case analysis that considers, e.g., magnitude relations between all pairs of argument bounds, positional relations between the arguments and zero, and handling of the special values, i.e. infinities and NaN. Their correctness is not obvious as they are implemented by human hands, which comes to be critical for the reliability. This work provides a mechanically-verified interval arithmetic library. For this purpose, we utilize the Why3 platform equipped with a specification language for annotated programs and back-end theorem provers. We conducted several proof tasks for each of three properties of the target code: validity, soundness, and tightness. To accomplish the proof, we propose several techniques to specify/verify the target annotated code. First, we specify additional lemmas that support deductions made by back-end SMT solvers. Second, we examine the tightness property so that the code annotated the property with our proposed comparison predicates is verified successfully. In the experiments, applying the techniques in conjunction with the Alt-Ergo SMT solver and the Coq proof assistant proved the entire code.
READ FULL TEXT