1. Sound and precise static analysis using a generalization of static single assignment and value numbering.
- Author
-
Taft, S. Tucker
- Subjects
- *
MATHEMATICAL optimization , *GENERALIZATION , *COMPILERS (Computer programs) , *ALGORITHMS - Abstract
CodePeer is a static analysis tool based on compiler optimization techniques such as static single assignment and value numbering. CodePeer infers and reports on implicit preconditions for each function of the program, based on limitations it identifies within the algorithm of the function. Presuming these inferred preconditions are satisfied, CodePeer then simulates the execution of each function, and identifies places where a program might still fail at run time, due to violating some run-time check or an error that leads to undefined behavior. CodePeer uses static single assignment and global value numbering to ensure that the determination of possible run-time values of each variable and expression encountered during the simulation of the execution of each function is both sound and precise. The approximations performed to ensure that the determination of possible values converges in the face of loops and recursion are systematic and based on the kinds of conservative analysis performed by compiler optimizers. The output of CodePeer includes for each function an enumeration of its global inputs and global outputs and inferred preconditions and postconditions. The output also includes, interspersed within a listing of the source of the function, an identification of the places where possible run-time failures or undefined behavior could occur. This output is designed to support code review, which gives the tool its CodePeer name. [ABSTRACT FROM AUTHOR]
- Published
- 2024
- Full Text
- View/download PDF