Methods and systems for complete static analysis of software for building a system
AssigneeRed Hat, Inc.
InventorUlrich Drepper
Life of this patent
Estimating the term…
Abstract
Embodiments of the present invention provide systems and methods for the static analysis of entire systems of software. Source code for at least some of the software system is received. An functional representation of the source code is generated from when the source code is compiled and references to other software are identified. The functional representations of the other software is retrieved from an archive and an abstract representation of the entire software system is built. A static analysis is then performed against the abstract representation of the entire system and results are provided. The software system or one or more of its components may be certified based on the static analysis results.
Claims16
A method for certifying a distribution based on static analysis of functional representations that include all information used to generate object code from source code, wherein each object file used at runtime has an archived functional representation, said method comprising:
- receiving a set of source code for a distribution;
- compiling the source code into object code;
- collecting functional representations of the compilation of the source code in an archive;
- determining transitive closure of dependencies of all executables that depend at runtime on the object code;
- retrieving archived functional representations corresponding to executables identified in the transitive closure;
- and
- certifying the distribution based on analyzing the functional representations of the compilation of the source code and the retrieved functional representations.
A system for certifying a distribution, said system comprising:
- an archive of functional representations of source code, wherein the functional representation includes information required to generate object code corresponding to the source code;
- a compiler configured to compile a set of source code for a distribution into object code and emit functional representations of the set of source code used to generate object code;
- a linker configured to build the distribution by linking together the object code from the set of source code and determine transitive closure of dependencies of all executables that depend at runtime on the generated object code;
- a tester configured to retrieve archived functional representations corresponding to executables identified in the transitive closure by the linker, build an abstract representation of the entire distribution based on the functional representation of the set of source code and the retrieved functional representation, perform a set of tests on the abstract representation of the entire distribution, and provide a result based on the set of tests that indicate whether a distribution is certified.
A compiler configured to compile a source code file into an object code file, said compiler comprising:
- a front end configured to receive the source code file and convert source code in the source code file into an intermediate representation;
- a back end configured to convert the intermediate representation into an object code file;
- and
- an emitter configured to emit a functional representation generated from the intermediate representation.
Dependencies are inferred from the claim text.