Dominance Analysis via Ownership Types and Abstract Interpretation

Ilya Sergey, Jan Midtgaard and Dave Clarke1

1Katholieke Universiteit Leuven,   DistriNet,   Dept. Computer Science

2Aarhus University,   Dept. Computer Science


The dominance analysis is in the form of a front-end compiler. It takes a program in a subset of Java with ownership annotations as an input and returns a whole-program abstract dominance tree as an output in the from of Graphviz .gv-file.


Download

The Dominance Analysis for the subset Java is available for use, experiments and extension.

Build

All tools needed (Scala compiler, Scala SDK, ScalaTest, etc.) are included into the archive with sources. You only need to have javac and Apache Ant installed in order to build. You also need Graphviz installed to see the result files. The ant script build.xml is located in the root folder of the archive. Inspect the README file for more information about the project structure and examples.

To build the jar file with the compiler, run

  > ant rebuild.all 
or just
  > ant 
from the root folder of the unpacked archive.

To run compiler tests:

  > ant run.tests

Run

How to run the DominanceAnalysis (make sure that DominanceAnalysis.jar is included into your Java classpath):

  > java DominanceAnalysis java-source-file.txt 

It is also possible to specify the parameter k for the polyvariance (k accounts to Shivers's call-sensitive k-CFA and by default is equal to zero). For example, the line below runs the analysis via call-sensitive 2-CFA:

  > java DominanceAnalysis -k 2 java-source-file.txt 
As a result of the analysis, two new files will be produced in the same folder as java-source-file.txt:

Examples of valid files can be found in the folder testdata in the source archive. If an ownership argument is omitted, it is considered to be root by default.

Technical report


Last modified: Fri Aug 14 10:53:11 CEST 2015