Synthetic Source Code Model Generation from Machine Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current program analysis methods face challenges in evaluating the correctness of computer programs due to the unavailability or complexity of software library source code, leading to missed bugs or false positives when analyzing programs that rely on these libraries.

Innovation Solution

An API and machine code associated with a software library are accessed to identify data sources and sinks, and a flow graph is generated to represent the data flow, enabling the automatic creation of a source code model that can be used for precise code analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If source code of software libraries is analyzed directly, then code analysis precision is improved, but analysis scalability deteriorates due to unavailability or complexity of library source code

Engineering Contradiction:
Improvecode analysis precisionVSAvoidanalysis scalability
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent creates simplified copies (models) of software library source code by analyzing their machine code and API documentation. These synthetic source code models replicate the essential data flow and control flow characteristics of the original libraries without requiring access to the actual source code, enabling precise analysis while maintaining scalability.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces an intermediary process that translates machine code and API documentation into synthetic source code models. This intermediary representation serves as a mediator between the unanalyzable binary libraries and the code analysis tools, allowing precise analysis without direct access to original source code.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If software libraries are ignored during code analysis, then analysis scalability is improved, but code analysis precision deteriorates due to missed bugs and false positives

Engineering Contradiction:
Improveanalysis scalabilityVSAvoidcode analysis precision
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

Instead of ignoring libraries or analyzing their complex original source code, the patent creates simplified synthetic copies that capture only the essential data flow and control flow characteristics needed for bug detection. This approach maintains scalability while improving precision by incorporating library behavior into the analysis.

Inventive Principle:
Principle #26Copying

3Measurement precision

If manual modeling of software libraries is performed, then code analysis precision is improved, but device complexity increases due to manual effort and expertise requirements

Engineering Contradiction:
Improvecode analysis precisionVSAvoidmodeling complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent enables the system to automatically generate synthetic source code models by analyzing machine code and API documentation itself, without requiring manual intervention. This self-service approach eliminates the need for expert analysts to manually create models, reducing complexity while maintaining precision.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the manual mechanical process of expert analysts creating models with an automated computational system that analyzes machine code and generates synthetic source code models algorithmically, significantly reducing human effort and complexity.

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

Data Source

PatentUS11321218B1Automated generation of source code models from machine code for code analysis
Publication Date: 2022.05.03 CORRECT COMPUTATION INC
  • US11321218B1 patent drawing
  • US11321218B1 patent drawing
  • US11321218B1 patent drawing

AI summary

In one embodiment, an application programming interface (API) and machine code associated with a software library are accessed. Data sources and data sinks in the software library are identified based on the API, and a data flow among the data sources and data sinks is determined based on a dynamic analysis of the machine code associated with the software library. A flow graph associated with the software library is then generated to represent the data flow among the data sources and data sinks, and a source code model associated with the software library is generated based on the flow graph.