Selective loading of code elements for code analysis
First Claim
1. A computer-implemented method for loading into a system memory code elements included in a plurality of software entities stored on one or more non-volatile storage devices, the plurality of software entities comprising a target software entity and one or more reference software entities, a portion of the code elements being loaded into the system memory for analysis of the target software entity by a code analysis tool, the method comprising:
- assigning, automatically, a first subset of the code elements to a first group based on a dependency analysis, the first subset of the code elements including each code element of the target software entity and each code element of the one or more reference software entities that have at most a first number of dependency links from the target software entity as indicated by the dependency analysis;
assigning, automatically, a second subset of the code elements to a second group, the second subset including each code element of the one or more reference software entities that have a second number of dependency links, that is one more than the first number of dependency links, from the target software entity as indicated in the dependency analysis, the first subset being mutually exclusive of the second subset;
loading, automatically, only the code elements assigned to the first group into the system memory for analysis of the target software entity by the code analysis tool, loading a code element comprising accessing the software entity in which the code element is included;
creating a named placeholder, for each code element in the second subset of code elements, in place of each code element in the second subset of code elements; and
performing the analysis of the target software entity on the loaded code elements of the first subset of code elements and the named placeholder for each code element in the second subset of code elements, and without using the second subset of code elements.
2 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods are described herein for selectively loading code elements included in a plurality of software entities comprising a target software entity and one or more reference software entities to facilitate analysis of the target software entity by a code analysis tool, such as a static code analysis tool. In one embodiment, all of the code elements in the target software entity are loaded while only those code elements included in the reference software entities that are determined to be most important from a dependency standpoint are loaded. The loaded code elements may be used to obtain suitable definitions of the code elements included in the target software entity for the purpose of code analysis.
-
Citations
20 Claims
-
1. A computer-implemented method for loading into a system memory code elements included in a plurality of software entities stored on one or more non-volatile storage devices, the plurality of software entities comprising a target software entity and one or more reference software entities, a portion of the code elements being loaded into the system memory for analysis of the target software entity by a code analysis tool, the method comprising:
-
assigning, automatically, a first subset of the code elements to a first group based on a dependency analysis, the first subset of the code elements including each code element of the target software entity and each code element of the one or more reference software entities that have at most a first number of dependency links from the target software entity as indicated by the dependency analysis; assigning, automatically, a second subset of the code elements to a second group, the second subset including each code element of the one or more reference software entities that have a second number of dependency links, that is one more than the first number of dependency links, from the target software entity as indicated in the dependency analysis, the first subset being mutually exclusive of the second subset; loading, automatically, only the code elements assigned to the first group into the system memory for analysis of the target software entity by the code analysis tool, loading a code element comprising accessing the software entity in which the code element is included; creating a named placeholder, for each code element in the second subset of code elements, in place of each code element in the second subset of code elements; and performing the analysis of the target software entity on the loaded code elements of the first subset of code elements and the named placeholder for each code element in the second subset of code elements, and without using the second subset of code elements. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising:
-
a processing unit; a system memory; and at least one non-volatile storage device that stores software modules to be executed by the processing unit, the software modules including a code analysis tool that comprises a code element loader that loads into the system memory a portion of code elements included in a plurality of software entities stored in the at least one non-volatile storage device and comprising a target software entity and one or more reference software entities and a static code analyzer that performs a code analysis on the target software entity based on the loaded code elements; the code element loader being configured to; automatically assign a first subset of the code elements to a first group based on a dependency analysis, the first subset of the code elements including each code element of the target software entity and each code element of the one or more reference software entities that have at most a first number of dependency links from the target software entity as indicated by the dependency analysis; automatically assign a second subset of the code elements to a second group, the second subset including each code element of the one or more reference software entities that have a second number of dependency links, that is one more than the first number of dependency links, from the target software entity as indicated in the dependency analysis, the first subset being mutually exclusive of the second subset; automatically load into the system memory only the code elements assigned to the first group, and load a code element by accessing the software entity in which the code element is included; and create a named placeholder, for each code element in the second subset of code elements, in place of each code element in the second subset of code elements; and the static code analyzer being configured to perform the code analysis of the target software entity on the loaded code elements of the first subset of code elements and the named placeholder for each code element in the second subset of code elements, and without using the second subset of code elements. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer-implemented method for loading into a system memory code elements included in a plurality of software entities stored on one or more non-volatile storage devices, the plurality of software entities including a target software entity and one or more reference software entities, a portion of the code elements being loaded into the system memory for analysis of the target software entity by a code analysis module, the method comprising:
-
loading into the system memory all of the code elements included in the target software entity, loading a code element comprising reading the software entity that includes the code element; selectively loading into the system memory only a subset of the code elements included in the one or more reference software entities, the subset being mutually exclusive of the code elements included in the target software entity, for analysis of the target software entity by the code analysis module, the determination of whether a code element included in a reference software entity is loaded being based on the code element included in the reference software entity having less than a first number of dependency links n from a code element included in the target software entity; creating a named placeholder, for each code element included in the one or more reference software entities having a second number of dependency links n+1 that is one more than the first number of dependency links n and that is not in the subset of code elements, in place of each code element included in the one or more reference software entities having the second number of dependency links n+1 and that is not in the subset of code elements; and performing the analysis of the target software entity on the loaded subset of the code elements included in the one or more reference software entities and the named placeholder for each code element included in the one or more reference software entities that is not in the subset of code elements, and without using unloaded code elements included in the one or more reference software entities. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification