CFG Data Flow Interaction for the Soot - Eclipse Plugin

Overview

The main idea is to display Control Flow Graphs as Soot creates them and show the fixed point flow data sets as the are generated.

Example

This example shows an example of a live variable analysis on part of a method. We can see the before and after flow sets that have been generated after several iterations.

Controlling the Interaction

There are 4 buttons for controlling the interaction.

  • Step Forward - steps one step through the graph in a forward direction until there is no more data available for the method
  • Step Backward - steps one step back through the graph
  • Finish Method - steps through to the end of the method automatically
  • Next Method - continues to the next method

  • How - to

    To use this tool, run Soot within Eclipse and select the Interaction Option in the General Options section. This makes the plugin act as a listener to information generated by Soot. Then selected your analysis and run Soot as normal. As Soot analyzes each method, the corresponding control flow graph will appear in an editor and you can control it using the actions listed above.

    It is also possible to set a breakpoint on one of the nodes in the cfg. Right click on the node and select Add Stop to do so. A small stop sign will appear in the node. Now when the analysis is running it will stop at that node on each iteration and the node will be indicated with a red arrow. You can then proceed using any of the actions.


    Saving

    Unfortunately support for printing from Eclipse in Linux is non-existent. We have provided a way to save these annotated cfgs to dot files which can then be used to generate postscript and printed. To do so, use Save or SaveAll in the File menu of Eclipse (as normal). A ClassName.MethodName.cfg file will be generated in the sootOutput directory. To generate postscript use: dot -Tps ClassName.MethodName.cfg > ClassName.MethodName.ps. You can then view using ghostscript or print normally.