Interprocedural Exception Control Flow Graph for C++ Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing C++ compiler frameworks fail to precisely model interprocedural control flow induced by exceptions, leading to conservative assumptions and reduced precision in static analysis, as they do not perform interprocedural analysis and rely on opaque runtime systems.
Innovation Solution
An interprocedural exception analysis and transformation framework that constructs an interprocedural exception control flow graph (IECFG) and uses the Signed-TypeSet domain for compact representation of program types, allowing for precise modeling of exceptions and generation of exception-free code without non-local jumps or opaque runtime systems.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If standard C++ compiler frameworks are used to handle exceptions, then the program can execute with exception handling capability, but the static analysis precision deteriorates due to conservative assumptions and opaque runtime systems
Solution Approach 1:
The patent introduces an intermediary representation called Exception Control Flow Graph (ECFG) that mediates between the original C++ code with exceptions and the static analysis tools. The ECFG explicitly models exception propagation paths and destructor calls, making the control flow induced by exceptions visible and analyzable without requiring opaque runtime system assumptions.
Solution Approach 2:
The patent replaces the mechanical reliance on opaque C++ runtime systems with a formal symbolic representation system. Instead of depending on runtime exception handling mechanisms that are invisible to static analyzers, the patent substitutes them with an explicit ECFG model that captures exception behavior in a form amenable to precise static analysis.
2Measurement precision
If interprocedural exception analysis is performed to capture precise control flow, then the static analysis precision improves, but the computational complexity increases
Solution Approach 1:
The patent segments the complex interprocedural exception analysis into manageable components: (1) construction of per-function ECFGs that capture local exception handling, (2) interprocedural propagation of exception information through call graphs, and (3) synthesis of global exception control flow. This segmentation makes the overall complex task tractable by breaking it into smaller, more manageable analysis steps.
Solution Approach 2:
The patent adds a new dimension to traditional control flow graphs by incorporating exception-specific control flow edges alongside normal control flow edges. The ECFG extends the conventional CFG by adding exceptional edges that represent exception propagation paths, creating a multi-dimensional view of program control flow that captures both normal and exceptional execution paths.
3Ease of manufacture
If the ECFG construction is made modular to support separate compilation units, then the ease of manufacture improves, but the measurement precision may be reduced due to limited visibility across compilation boundaries
Solution Approach 1:
The patent performs preliminary analysis within each compilation unit to construct local ECFGs and compute exception information that can be exported. By pre-computing and exporting exception propagation summaries from each module, the system enables subsequent interprocedural analysis to reconstruct precise global exception control flow even when modules are compiled separately, thus maintaining precision while enabling modularity.
Data Source
AI summary
An interprocedural exception analysis and transformation framework for computer programming languages such as C++ that (1) captures the control-flow induced by exceptions precisely, and (2) transforms the given computer program into an exception-free program that is amenable for precise static analysis, verification, and optimizations.


