Title of article :
Automating exception-safety classification
Author/Authors :
Gustav Munkby، نويسنده , , Sibylle Schupp، نويسنده ,
Issue Information :
ماهنامه با شماره پیاپی سال 2011
Pages :
12
From page :
278
To page :
289
Abstract :
Exception handling mechanisms provide a structured way to deal with exceptional circumstances, making it easier to read and reason about programs. Exception handling, however, cannot avoid the problem that the transfer of control might leave the program in an inconsistent state—resources might leak, invariants might be violated, the program state might be changed. Since client code often needs to know how a program behaves in the presence of exceptions, the exception-safety classification distinguishes three different classes of safety guarantees; this classification is used, for example, during the review process in the Boost organization for standardized libraries in C++. Classifying the safety level of a procedure requires understanding program invariants and tracking program state at any given point in the code, which is error-prone when done by hand. Yet, no tool support is available to date. In this paper we present the first automated analysis for exception guarantees. Since the safety level of an arbitrary procedure is undecidable, the analysis conservatively approximates exception safety . The analysis is based on the theory of backward data-flow analysis and recognizes two of the three safety guarantees, the strong and the no-throw guarantee, and provides counterexamples otherwise. A prototype implementation is available.
Keywords :
Program safety , Exception handling , data-flow analysis , Rollback semantics , Strong exception-safety guarantee
Journal title :
Science of Computer Programming
Serial Year :
2011
Journal title :
Science of Computer Programming
Record number :
1080180
Link To Document :
بازگشت