Partial Static Analysis of Source Code via Dependency Graph
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Performing full static analysis on large software projects is time-consuming and resource-intensive, often providing irrelevant results for users interested in specific portions of the codebase.
Innovation Solution
A partial static analysis system that uses a dependency graph to selectively analyze primary and secondary source code files, allowing for focused analysis on relevant files, reducing computational resources and improving responsiveness.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If full static analysis is performed on all source code files, then comprehensive analysis results are obtained, but analysis time and computational resources increase significantly
Solution Approach 1:
The patent divides the codebase into primary source code files (manually written) and secondary source code files (automatically generated), analyzing only the primary files to segment the analysis workload and eliminate irrelevant portions
Solution Approach 2:
The patent extracts and excludes automatically generated source code files from the static analysis process, removing irrelevant data that would consume computational resources without providing meaningful insights
2Measurement precision
If full static analysis is performed on all source code files, then complete coverage is achieved, but computational resources are excessively consumed
Solution Approach 1:
The codebase is segmented into primary and secondary files based on their origin (manual vs. automatic generation), allowing selective analysis that reduces computational resource consumption while maintaining coverage of relevant code
Solution Approach 2:
The patent applies partial analysis by focusing only on primary source code files rather than performing excessive full-analysis on all files, achieving sufficient coverage for development purposes without wasteful resource consumption
3Measurement precision
If static analysis is performed on automatically generated code, then complete analysis is provided, but voluminous and uninteresting results are produced
Solution Approach 1:
Automatically generated source code files are extracted and excluded from the analysis scope, removing the source of voluminous uninteresting results while preserving analysis completeness for manually written code where developer intent and potential issues reside
Data Source
AI summary
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for performing partial analysis of source code files in a code base. One of the methods includes receiving a request for analysis results for a subset of source code files in a project. A set of primary source code files is generated according to the request, wherein the set of primary source code files includes fewer than all source code files in the project. A set of secondary source code files is generated, the set comprising source code files upon which at least one of the primary source code files depends directly or transitively. A partial analysis of the code base is performed using all files included in the set of primary source code files or the set of secondary source code files. Analysis results for the files included in the set of primary source code files is provided in response to the request.


