Interprocedural exception analysis for C++

Prakash Prabhu, Naoto Maeda, Gogul Balakrishnan, Franjo Ivančić, Aarti Gupta

Research output: Chapter in Book/Report/Conference proceedingConference contribution

25 Scopus citations

Abstract

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.

Original languageEnglish (US)
Title of host publicationECOOP 2011 - Object-Oriented Programming - 25th European Conference, Proceedings
Pages583-608
Number of pages26
DOIs
StatePublished - 2011
Event25th European Conference on Object-Oriented Programming, ECOOP 2011 - Lancaster, United Kingdom
Duration: Jul 25 2011Jul 29 2011

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume6813 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other25th European Conference on Object-Oriented Programming, ECOOP 2011
Country/TerritoryUnited Kingdom
CityLancaster
Period7/25/117/29/11

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Interprocedural exception analysis for C++'. Together they form a unique fingerprint.

Cite this