Control Flow Graph Refining via Execution Data Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software engineers face difficulties in managing and visualizing control flow graphs (CFGs) due to their complexity and redundancy, especially in software products with a long development history, as they incorporate numerous code paths that were not followed during program execution, making it hard to identify errors.

Innovation Solution

A computer-implemented method that generates a preliminary control flow graph from memory dump and compiler listing data, translates code segments into Boolean statements, calculates edge property values, and refines the graph by deleting edges based on comparison, resulting in a more manageable and visually clear CFG.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a comprehensive control flow graph is generated to include all possible code paths, then the graph provides complete program logic coverage, but the graph becomes overly complex and difficult to visualize

Engineering Contradiction:
Improveprogram logic coverageVSAvoidcontrol flow graph complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts and removes executed code paths from the control flow graph by comparing compiler listing data with actual execution data (stack traces, register values). This extraction process eliminates redundant unexecuted paths while preserving the complete set of executed paths, thereby reducing graph complexity while maintaining reliability of the analyzed logic coverage.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If all code paths are included in the control flow graph, then complete program behavior is captured, but error identification becomes difficult due to redundancy

Engineering Contradiction:
Improveprogram behavior coverageVSAvoiderror identification difficulty
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies extraction by removing unexecuted code paths through comparison of compiler-generated control flow with actual execution traces. By eliminating paths that were not taken during program execution, the graph becomes focused on actual program behavior, making error identification in executed paths significantly easier while preserving complete coverage of observed program behavior.

Inventive Principle:
Principle #2Taking out (Extraction)

3Measurement precision

If memory dump data and compiler listing data are used to generate detailed control flow information, then accurate program state is captured, but memory constraints are exceeded

Engineering Contradiction:
Improveprogram state accuracyVSAvoidmemory usage
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential execution path information from comprehensive memory dump data and compiler listing data. By comparing against actual execution traces (stack traces, register values at exception points), it removes unnecessary detailed state information that does not contribute to identifying the executed paths, thereby maintaining measurement precision of program state while reducing memory consumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11379468B1Control flow graph refining via execution data
Publication Date: 2022.07.05 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11379468B1 patent drawing
  • US11379468B1 patent drawing
  • US11379468B1 patent drawing

AI summary

Aspects of the invention include computer-implemented method that includes generating a preliminary control flow graph from memory dump data and compiler listing data in response to an exception event at a computing program. Code segments associated with each block of the preliminary control flow graph are translated to Boolean statements. Each Boolean statement is determined to be either satisfied or unsatisfied based on input values retrieved from the memory dump data. An edge property value of a first edge and a second edge of a plurality of edges of the preliminary control flow graph based are calculated based on a satisfaction of the Boolean statements. The edge property value of the first edge is compared to the edge property value of the second edge. The preliminary control flow graph is refined by deleting the first edge of the plurality of edges based at least in part on the comparison.