Phase 3 Instructions

Installation

Same as for phase 2: cp /projects/proganalysis/SEII-project/phase3/phase3.tar in directory "project", untar, edit "run" to set the root.

Run Stages 1 and 2

Generate JIMPLE and run CHA as in phase 2. Examine output files rmethods, calls, and edges and make sure you understand the ids for methods and call sites.

Finish Stage 3

Run addInstrumentation and examine carefully the JIMPLE files in CLASSES. Make sure that you understand the instrumentation. Read carefully the code in Instrumenter and MyTransformer. Modify MyTransformer to insert JIMPLE calls to RuntimeTracker.beforeCall, and check the JIMPLE files in CLASSES for correctness.

IMPORTANT: If you rerun stage 3 after you have started making changes to RuntimeTracker (in stage 4, see below), Soot may complain about "phantom classes" or "type inference failed". This is due to a small problem in the infrastructure that I haven't had the time to fix. If this happens, run stage 3 with the original RuntimeTracker downloaded from the web site, not with your own modified version of RuntimeTracker. Of course, when you run stage 4, you will use your own RuntimeTracker.

Finish Stage 4

Execute runInstrumented to observe the effects of the instrumentation. Read carefully the code in RuntimeTracker. Modify RuntimeTracker to produce the information in files nmethods and nedges, as described in the overview. When working on RuntimeTracker, just do "javac RuntimeTracker.java" followed by "run"; inside "run", only execute runInstrumented — it is unnecessary to execute addInstrumentation.

Submit the results

Email to milanova@cs.rpi.edu all the source code, plus all files nmethods and nedges (inside the corresponding subdirectories). Since you are submitting by email please DO NOT include JIMPLEs, .class files, and the run script.

Additional Resources