Verification of C/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 without 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 statically drawn about the behavior of the program. We propose an alternative to surrender: even if we do not have a proper specification for the functions, we might have a partial specification; at the very least we have their implementation, for which a partial specification can sometimes be extracted. When even a partial specification is unavailable, we can still detect flaws in the program and facilitate its partial verification with testing. We propose a pragmatic, practical approach that leverages the fact that most math.h/cmath functions are almost piecewise monotonic: they may have "glitches", often of very small size and in small quantities. We develop interval refinement techniques for such functions that enable verification via abstract interpretation, symbolic model checking and constraint-based test data generation.

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

A Practical Approach to Interval Refinement for math.h/cmath Functions

BAGNARA, Roberto;
2016

Abstract

Verification of C/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 without 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 statically drawn about the behavior of the program. We propose an alternative to surrender: even if we do not have a proper specification for the functions, we might have a partial specification; at the very least we have their implementation, for which a partial specification can sometimes be extracted. When even a partial specification is unavailable, we can still detect flaws in the program and facilitate its partial verification with testing. We propose a pragmatic, practical approach that leverages the fact that most math.h/cmath functions are almost piecewise monotonic: they may have "glitches", often of very small size and in small quantities. We develop interval refinement techniques for such functions that enable verification via abstract interpretation, symbolic model checking and constraint-based test data generation.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: http://hdl.handle.net/11381/2825200
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact