In English

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

Gustav Munkby
Göteborg : Chalmers tekniska högskola, 2006.
[Examensarbete på avancerad nivå]

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.

Publikationen registrerades 2007-02-22. Den ändrades senast 2013-04-04

CPL ID: 26461

Detta är en tjänst från Chalmers bibliotek