Prerequisites
Functional programming, plus familiarity with Java. A good understanding of compiler construction is essential. Programming Languages is an advantage but not a necessity.
Program analysis provides the theory, algorithms and engineering techniques to answer questions about your programs. For example, you might want to determine what statements could have contributed to the value of an expression. Another application is for a compiler to decide whether an optimisation can be applied. Or you might want some mechanical assistance when refactoring your program. Program analysis is also indispensable when proving properties of large programs, for instance to check that there are no buffer overflows.
An elegant and crisp mathematical framework is common to all these applications. This course will introduce you to that mathematics, and simultaneously show how it leads to beautiful algorithms that solve practically important problems.
Students will learn the mathematical theory of lattices, Galois connections, abstract interpretation, and fixpoint computations, Furthermore they will learn to apply those notions in controlflow analysis and dataflow analysis. In turn, those are illustrated by refactoring transformations, optimisations, program understanding tools, and program checkers
The main text will be a set of lecture notes. The following are background material:
- Flemming Nielson, Hanne Riis Nielson, Chris Hankin: Principles of Program Analysis. Springer (Corrected 2nd printing, 452 pages, ISBN 3-540-65410-0), 2005.
- Frank Tip, Adam Kiezun, Dirk Bäumer: Refactoring for generalization using type constraints. OOPSLA 2003: 13-26.
- Robert M. Fuhrer, Frank Tip, Adam Kiezun, Julian Dolby, Markus Keller: Efficiently Refactoring Java Applications to Use Generic Libraries. ECOOP 2005: 71-96
- Patrick Cousot, Radhia Cousot: Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. POPL 1977: 238-252
- Ondrej Lhoták, Laurie J. Hendren: Context-Sensitive Points-to Analysis: Is It Worth It?. CC 2006: 47-64
- David Grove, Craig Chambers: A framework for call graph construction algorithms. ACM Trans. Program. Lang. Syst. 23(6): 685-746 (2001)
- The Soot framework, \verb|http://www.sable.mcgill.ca/soot/|