Static Annotation Analysis for Code Error Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing programming code analysis methods fail to effectively identify and flag errors or performance issues introduced by function calls to sub-functions, particularly in terms of resource allocation, without executing the code, which can lead to performance problems in computer systems.

Innovation Solution

A server computer parses annotated programming code to identify annotations for functions and sub-functions, generating summary reports that flag potential issues, such as memory allocation thresholds, allowing for static analysis without execution, and aggregating information to reduce redundant analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If code analysis is performed by executing the programming code, then detection accuracy of function call errors is improved, but system performance deteriorates and computational resources are consumed

Engineering Contradiction:
Improvedetection accuracyVSAvoidcomputational resource usage
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent creates a symbolic execution model that copies and simulates code execution paths without actually running the code. Annotation summaries are generated as copies of function behavior metadata, allowing error detection through analysis of these symbolic representations rather than actual code execution, thus maintaining detection accuracy while reducing computational resource consumption.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent replaces the mechanical execution system with a symbolic analysis system. Instead of physically executing code to detect errors, the system uses annotation summaries and symbolic execution paths to analyze function calls statically, substituting dynamic mechanical execution with static symbolic analysis to reduce resource usage while maintaining detection capability.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If comprehensive code analysis is performed on all functions and sub-functions, then error detection capability is improved, but analysis time increases

Engineering Contradiction:
Improveerror detection capabilityVSAvoidanalysis time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by generating annotation summaries that capture essential function behavior metadata before comprehensive analysis is needed. These pre-computed summaries contain information about memory allocation, resource usage, and function characteristics, allowing subsequent error detection to proceed faster by referencing pre-analyzed data rather than performing full analysis each time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the code analysis process into independent function units, each with its own annotation summary. This segmentation allows the analysis system to focus on specific functions and their call relationships rather than analyzing the entire codebase monolithically, reducing overall analysis time while maintaining comprehensive error detection capability across all functions.

Inventive Principle:
Principle #1Segmentation

3Reliability

If annotation summaries are generated for each function including all sub-function mappings, then code reliability is improved, but device complexity increases

Engineering Contradiction:
Improvecode reliabilityVSAvoiddata structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts essential function behavior information into separate annotation summaries, taking out detailed function metadata from the main code structure. Each annotation summary contains extracted information about memory allocation, resource usage, and sub-function relationships, organizing complexity into isolated, manageable units that improve code reliability without overwhelming the overall system structure.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10409707B2Methods and systems for analyzing annotated programming code
Publication Date: 2019.09.10 META PLATFORMS INC
  • US10409707B2 patent drawing
  • US10409707B2 patent drawing
  • US10409707B2 patent drawing

AI summary

Exemplary methods, apparatuses, and systems for analyzing annotated programming code are detailed. For example, in an embodiment, a computer-implemented method comprises parsing code to identify a plurality of functions. For each function in the plurality of functions, the method further comprises determining a first annotation associated with the function and determining a second annotation associated with a first sub-function called by the function. The method further comprises generating an error message in an annotation summary for the function in response to determining that the first annotation associated with the function specifies the function as the first code type and the second annotation associated with the first sub-function called by the function specifies the first sub-function as the second code type.