Incremental Static Program Analysis via Machine Learning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static program analysis tools face inefficiencies in handling large-scale software updates, requiring extensive computation time and re-analysis of the entire program, making it impractical for developers to assess the impact of small code changes, and lacking effective methods to account for global effects of updates on method call resolution and heap memory access.

Innovation Solution

The implementation of incremental static program analysis using machine learning techniques, where a system generates feature vector data from updates to a computer program, employs a classifier algorithm to identify affected portions of the mathematical model, and applies incremental analysis to update only the affected parts, reducing computation time and enabling real-time feedback.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If static program analysis is applied to the entire program for every update, then analysis accuracy is maintained, but computation time increases significantly

Engineering Contradiction:
Improveanalysis accuracyVSAvoidcomputation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent divides the program into multiple modules or components and performs static analysis on individual modules or affected portions rather than the entire program. This segmentation allows the analysis to focus only on relevant code sections, maintaining accuracy while reducing computation time for updates.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts and identifies affected portions of the program that are impacted by updates, separating them from the rest of the codebase. By taking out only the affected portions for analysis, the system maintains comprehensive coverage where needed while avoiding redundant analysis of unaffected code, thus reducing overall computation time.

Inventive Principle:
Principle #2Taking out (Extraction)

2Productivity

If incremental analysis is applied to reduce computation time, then analysis speed improves, but handling global effects of updates becomes difficult

Engineering Contradiction:
Improveanalysis speedVSAvoidhandling global effects
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements a feedback mechanism that tracks and propagates the effects of updates throughout the program. When code is modified, the system feeds back information about the changes to identify related modules and global effects, ensuring that incremental analysis captures ripple effects across the codebase while maintaining analysis speed.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces an additional dimension of analysis by tracking dependency relationships and effect propagation paths alongside the traditional code analysis. This multi-dimensional approach allows the system to handle global effects of updates by examining not just the modified code but also its relationships with other parts of the program, thereby improving adaptability without sacrificing speed.

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

3Measurement precision

If feature vector data and machine learning are used to identify affected portions, then analysis precision improves, but system complexity increases

Engineering Contradiction:
Improveidentification precisionVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces feature vector data as an intermediary representation that captures essential characteristics of code updates and their effects. This intermediary structure enables machine learning algorithms to accurately identify affected portions without requiring direct complex analysis of the entire program, thereby improving precision while managing system complexity through structured data representation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11789724B2Machine learning to facilitate incremental static program analysis
Publication Date: 2023.10.17 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11789724B2 patent drawing
  • US11789724B2 patent drawing
  • US11789724B2 patent drawing

AI summary

Techniques for facilitating incremental static program analysis based on machine learning techniques are provided. In one example, a system comprises a feature component that, in response to an update to a computer program, generates feature vector data representing the update, wherein the feature vector data comprises feature data representing a feature of the update derived from an abstract state of the computer program, and wherein the abstract state is based on a mathematical model of the computer program that is generated in response to static program analysis of the computer program. The system can further comprise a machine learning component that employs a classifier algorithm to identify an affected portion of the mathematical model that is affected by the update. The system can further comprise an incremental analysis component that incrementally applies the static program analysis to the computer program based on the affected portion.