Static Program Analysis Specialization via Coding Time Metrics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static program analysis tools face a tradeoff between accuracy and scalability, with existing specialization techniques being expensive and requiring non-trivial analyses, necessitating a method to balance precision and efficiency.

Innovation Solution

An automated monitoring agent is used to track coding time and edits across different lexical scopes during the code authoring process, allowing for a more refined analysis on scopes with higher time or edit counts and a coarser analysis on less complex scopes, thereby specializing the static analysis procedure.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If a granular analysis model is built to achieve precision, then accuracy is improved, but computational cost increases

Engineering Contradiction:
Improveanalysis accuracyVSAvoidcomputational cost
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent applies different levels of analysis granularity to different lexical scopes based on their coding characteristics. High-time scopes receive refined analysis while low-time scopes receive coarser analysis, making the analysis model locally adaptive rather than uniformly granular throughout the entire program.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent divides the program into lexical scopes and further segments them based on coding time metrics. This segmentation allows the analysis system to process different portions of code with appropriate detail levels, avoiding unnecessary computational expense on low-risk scopes while maintaining high accuracy on high-risk scopes.

Inventive Principle:
Principle #1Segmentation

2Productivity

If existing specialization techniques are applied to improve scalability, then analysis speed improves, but implementation complexity increases

Engineering Contradiction:
Improveanalysis scalabilityVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system automatically monitors coding time during the authoring process and uses this data to self-determine which scopes require refined analysis. This self-service approach eliminates the need for manual configuration or complex external analysis to identify specialization opportunities, reducing implementation complexity while maintaining scalability.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent collects coding time metrics during the code authoring process itself, before the static analysis begins. This preliminary data collection enables the analysis system to be pre-configured with scope priorities, avoiding the need for complex runtime decisions or post-hoc analysis during the actual static analysis phase.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10324820B2Providing specialization for static program analysis using coding hints
Publication Date: 2019.06.18 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10324820B2 patent drawing
  • US10324820B2 patent drawing

AI summary

Providing specialization for a static program analysis procedure by executing an automated agent to monitor a code authoring process for a program under examination that includes a plurality of respective lexical scopes. The agent monitors a corresponding amount of coding time, or a corresponding number of edits, for each of the plurality of respective lexical scopes. A mapping associates each of the plurality of respective lexical scopes with a first quantitative measure of the corresponding amount of time, or a second quantitative measure of the corresponding number of edits, that were used to code each of the plurality of respective lexical scopes. The static analysis procedure is specialized by applying a more refined, detailed, precise, or granular analysis to a first lexical scope that is mapped to a greater amount of time or a greater number of edits than a second lexical scope.