1. Barthelemy Dagenais
  2. ppa


Clone wiki

ppa / Home

Partial Program Analysis

Partial Program Analysis for Java (PPA) is a static analysis framework that transforms the source code of an incomplete Java program into a typed Abstract Syntax Tree. The advantages of using PPA over standard parsers and compilers are:

  • PPA attaches type information to all nodes in the AST, even if the declared type is inaccessible.
  • PPA infers missing type information when possible.
  • PPA resolves ambiguous syntax constructs.
  • A universal unknown type (UNKNOWNP.UNKOWN) is used as a placeholder for all unknown type declarations.

PPA comes as a set of Eclipse plug-ins extending the Eclipse Java compiler and it is distributed under the GNU Lesser General Public License. PPA produces typed abstract syntax trees compatible with the Eclipse JDT Binding API: the compilation unit is an instance of org.eclipse.jdt.core.dom.CompilationUnit and the type bindings are compatible with the hierarchy of org.eclipse.jdt.core.dom.IBinding.

If you find a bug or desire a new feature, please create a new issue. If you have a question, contact the author of PPA at bart at cs dot mcgill dot ca.


  • July 6th 2011 The documentation from the old web site has been completely ported to this wiki. I corrected a few mistakes in the process. Rejoice!
  • June 3rd 2011 - Version 1.2.1 is out. Many bugs were fixed, it is now possible to produce bytecode from files or snippets processed by PPA (experimental feature!) and most of the utility methods in ppa.ui have been ported to ppa and no longer requires a GUI environment. This is very useful for headless Eclipse applications.
  • June 29th 2010 - Version 1.2.0 is out! It supports Eclipse 3.6 and brings all the improvements of 1.1.2 such as multi-threaded environment, better support for Java 5 generics and anonymous classes, etc.



SemDiff was created by Barthélémy Dagenais for his Master's thesis in collaboration with Prof. Laurie Hendren and Prof. Martin Robillard (supervisor) at the School of Computer Science at McGill University.

Disclaimer Disambiguating a partial Java program is an undecidable problem so the typed abstract tree produced by PPA may contain some errors. PPA is still useful for software engineering research that tolerates a low level of errors and imprecision. Indeed, in an empirical study on four large open source systems, we recovered on average 91.2% correct types and produced only 2.7% erroneous types when analyzing a single class without its dependencies.