Program Analysis
Shmuel (Mooly)
Sagiv Sunday 16-17 Shenkar 204
Advanced techniques for statically analyzing programs are discussed.
These techniques allows one to answer computationally
hard questions about programs in an efficient albeit conservative way.
They are also referred to as abstract interpretation since the algorithms
interpret the program on a simplified abstract domain. The techniques are
useful in compilers in order to
generate more efficient code and in other programming language environments
such as debuggers and code quality checkers.
For an interesting note on static analysis click here.
Important Message
If your POWERPOINT does not show certain
mathematical characters use fonts in a zip file, by clicking
here.
Make sure to extract
them to the appropriate directory,
Alternatively, you can extract them anywhere, and install them via the
control panel
Contents
Example Program Analysis Problems
- Constant Propagation:
Determine if a variable always has a constant value at a point in a
program (Click here
to see example programs and their constants). Compilers can improve the
running time of the generated code by evaluating constants at compile time. Constant propagation algorithms
are also used to guide other compiler
optimizations.
- May be Uninitialized:
Determine if a variable may be used in the program before an
initialization. Debugging tools such as the Unix lint report the variables
which may be uninitialized.
- Strictness Analysis:
An analysis that allows the optimization of lazy functional programs by
identifying the parameters that can be passed by value thus avoiding the
need to build closures and opening up opportunities for parallel
evaluation.
- In-Line Update Analysis:
This analysis allows us to determine the points in the program at which it
is safe to destroy a data object because there are no longer references to
it. A notable result by Hudak, is that, for the first time, a functional
version of the quicksort algorithm can be made to run in linear space
using this analysis.
- Mode Analysis:
Significant performance can be achieved in PROLOG interpreters if it is
known how the logical variables are used in a relation (i.e., as input or
output variables or a mixture of the two).
Course Requirements
- 10%
Class Notes
Latex Template
-
45% HW Assignments
- 45%
Final Project
Bibliography
The course book Principles of Program
Analysis by Nielson, Nielson and Hankin is available in Dionon.
Course Schedule
- Course Overview
Printer Friendly Version
Class Summary by Oded Elbaz and Tomer Greenwald
Class Summary by Oded Elbaz and Tomer Greenwald (sources)
- Chaotic Iterations
Printer Friendly Version
Class Summary by Yuval Rochman and Michal Shagam
- Chaotic Iterations Example
Printer Friendly Version
Introduction to Abstract Interpretation
Printer Friendly Version
Class Summary by Dor Wucher and Yael Tiomkin
- Numerical Abstract Interpretation
Printer Friendly Version
Original Slides due to Antione Mine
Class Summary by Omer Anson and Shelly Grossman
- Detecting Buffer Overruns in C Programs
Printer Friendly Version
Class Summary by Misha Seltzer
- Combining Abstract Domains
Printer Friendly Version
Class Summary by Keren Zubovsky and Orit Sanandaji
- Interprocedural Analysis
Printer Friendly Version
- Automating Abstract Interpretation
Printer Friendly Version
- Counterexample Guided Abstract Refinement
Printer Friendly Version
Class Summary by Asya Frumkin and Aviv Kuvent
- Shape
Analysis
Printer Friendly Version
Class Summary by Gal Dudovitch and Daniela Rabkin
- The LLVM Inferastructure
Printer Friendly Version
- Static Analysis of Java
Printer Friendly Version
Homework Assignments
Assignment
1: Due December 20
Assignment
2: Due January 30
For further information Email:msagiv@post.tau.ac.il