Design and Implementation of an Algorithm for the Strong Exception-Safety Guarantee in C++

Typ
Examensarbete för masterexamen
Master Thesis
Program
Publicerad
2006
Författare
Munkby, Gustav
Modellbyggare
Tidskriftstitel
ISSN
Volymtitel
Utgivare
Sammanfattning
Exception handling mechanisms provide a structured way to deal with exceptional circumstances, which makes it easier to read a program and reason about it, but 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++. Although it is not easy to correctly classify the exception level of a procedure, no tool support was available until now; thus, designers and reviewers had to trace the control flow of a program manually and along all hidden execution paths. In this paper we present the first automated analysis for exception guarantees. The analysis addresses two of the three safety guarantees, the strong and the no-throw guarantee. The analysis is implemented in the BangSafe tool set, which interfaces the Elsa parser for C++ and targets C++-programs. BangSafe itself is implemented in Ruby.
Beskrivning
Ämne/nyckelord
Datavetenskap (datalogi) , Computer Science
Citation
Arkitekt (konstruktör)
Geografisk plats
Byggnad (typ)
Byggår
Modelltyp
Skala
Teknik / material
Index