Interprocedural Dominance Graph Construction for Scalable Code Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for computing interprocedural dominators in software programs are either complex or sacrifice simplicity and ease of implementation, and they often require full program analysis, which is inefficient for large programs or incremental changes.

Innovation Solution

A method and system that compute interprocedural dominance graphs by combining intraprocedural dominator graphs, identifying interprocedural dominance candidates, and computing interprocedural dominator sets, allowing for parallel processing and incremental analysis, which reduces the need for full program reanalysis and improves efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing methods for computing interprocedural dominators are used, then dominance relationships can be identified, but the computational complexity increases and full program reanalysis is required

Engineering Contradiction:
Improvedominance relationship accuracyVSAvoidalgorithm complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent divides the program into procedure-specific dominator graphs, computing dominators locally within each procedure rather than performing a single global analysis. This segmentation allows the overall dominance computation to be broken into smaller, more manageable pieces that can be processed independently and then combined.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from traditional single-dimension dominator computation to a multi-dimensional approach by considering interprocedural edges and dominance relationships across procedure boundaries. This adds a new dimension to the analysis that captures cross-procedure dominance without requiring complete reanalysis of all procedures.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Measurement precision

If full program analysis is performed to compute interprocedural dominators, then complete dominance information is obtained, but the analysis time increases significantly for large programs

Engineering Contradiction:
Improvedominance relationship completenessVSAvoidanalysis time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary computation of procedure-specific dominator graphs before combining them into the interprocedural dominance graph. This preliminary action allows much of the dominance computation to be done in advance for each procedure, reducing the work needed during the final interprocedural combination phase.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent computes dominator relationships partially within each procedure first, then supplements this with interprocedural edge analysis. This partial action approach avoids the need to perform complete global analysis from scratch, achieving sufficient dominance information with reduced computational effort.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If traditional dominator algorithms are used, then dominance relationships are computed, but simplicity and ease of implementation are sacrificed

Engineering Contradiction:
Improvedominance computation accuracyVSAvoidimplementation ease
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The patent segments the dominator computation into procedure-specific graphs that can be computed using simpler local algorithms, then combines these with interprocedural edge information. This segmentation maintains implementation simplicity by allowing each procedure to be analyzed independently with straightforward algorithms.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent merges procedure-specific dominator graphs with interprocedural edge information to create the complete interprocedural dominance graph. This combining approach integrates local simplicity with global accuracy, maintaining ease of implementation while achieving comprehensive dominance relationships.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10013243B2System and/or method for computing interprocedural dominators
Publication Date: 2018.07.03 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10013243B2 patent drawing
  • US10013243B2 patent drawing
  • US10013243B2 patent drawing

AI summary

According to an aspect of some embodiments of the present invention there is provided a computerized method of analyzing code of a software program for dominance relationships between a plurality of functions of the software program, the method comprising: receiving source code of a software program, the source code having a plurality of functions; identifying a plurality of intraprocedural dominator graphs each for another of the plurality of functions; combining the plurality of intraprocedural dominator graphs to create an interprocedural dominance graph with edges that logically connect between nodes of the plurality of functions; identifying a plurality of interprocedural dominance relations between nodes in different functions of the plurality of functions using the interprocedural dominance graph; and analyzing the software program according to the plurality of interprocedural dominance relations.