TY - GEN
T1 - Interprocedural exception analysis for C++
AU - Prabhu, Prakash
AU - Maeda, Naoto
AU - Balakrishnan, Gogul
AU - Ivančić, Franjo
AU - Gupta, Aarti
PY - 2011
Y1 - 2011
N2 - C++ Exceptions provide a useful way for dealing with abnormal program behavior, but often lead to irregular interprocedural control flow that complicates compiler optimizations and static analysis. In this paper, we present an interprocedural exception analysis and transformation framework for C++ that captures the control-flow induced by exceptions and transforms it into an exception-free program that is amenable for precise static analysis. Control-flow induced by exceptions is captured in a modular interprocedural exception control-flow graph (IECFG). The IECFG is further refined using a novel interprocedural dataflow analysis algorithm based on a compact representation for a set of types called the Signed-TypeSet domain. The results of the interprocedural analysis are used by a lowering transformation to generate an exception-free C++ program. The lowering transformations do not affect the precision and accuracy of any subsequent program analysis. Our framework handles all the features of synchronous C++ exception handling and all exception sub-typing rules from the C++0x standard. We demonstrate two applications of our framework: (a) automatic inference of exception specifications for C++ functions for documentation, and (b) checking the "no-throw" and "no-leak" exception-safety properties.
AB - C++ Exceptions provide a useful way for dealing with abnormal program behavior, but often lead to irregular interprocedural control flow that complicates compiler optimizations and static analysis. In this paper, we present an interprocedural exception analysis and transformation framework for C++ that captures the control-flow induced by exceptions and transforms it into an exception-free program that is amenable for precise static analysis. Control-flow induced by exceptions is captured in a modular interprocedural exception control-flow graph (IECFG). The IECFG is further refined using a novel interprocedural dataflow analysis algorithm based on a compact representation for a set of types called the Signed-TypeSet domain. The results of the interprocedural analysis are used by a lowering transformation to generate an exception-free C++ program. The lowering transformations do not affect the precision and accuracy of any subsequent program analysis. Our framework handles all the features of synchronous C++ exception handling and all exception sub-typing rules from the C++0x standard. We demonstrate two applications of our framework: (a) automatic inference of exception specifications for C++ functions for documentation, and (b) checking the "no-throw" and "no-leak" exception-safety properties.
UR - http://www.scopus.com/inward/record.url?scp=79961157485&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=79961157485&partnerID=8YFLogxK
U2 - 10.1007/978-3-642-22655-7_27
DO - 10.1007/978-3-642-22655-7_27
M3 - Conference contribution
AN - SCOPUS:79961157485
SN - 9783642226540
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 583
EP - 608
BT - ECOOP 2011 - Object-Oriented Programming - 25th European Conference, Proceedings
T2 - 25th European Conference on Object-Oriented Programming, ECOOP 2011
Y2 - 25 July 2011 through 29 July 2011
ER -