avrora.actions
Class CFGAction

java.lang.Object
  extended byavrora.util.help.HelpCategory
      extended byavrora.actions.Action
          extended byavrora.actions.CFGAction
All Implemented Interfaces:
HelpItem

public class CFGAction
extends Action

The CFGAction is an Avrora action that allows a control flow graph to be generated and output to the terminal or to a file.


Field Summary
protected  ControlFlowGraph cfg
           
 Option.Bool COLLAPSE_PROCEDURES
           
 Option.Bool COLOR_PROCEDURES
           
 Option.Str FILE
           
 Option.Bool GROUP_PROCEDURES
           
static java.lang.String HELP
           
 Option.Str OUTPUT
           
protected  ProcedureMap pmap
           
protected  Program program
           
 
Fields inherited from class avrora.actions.Action
options
 
Fields inherited from class avrora.util.help.HelpCategory
COMPARATOR, help, name
 
Constructor Summary
CFGAction()
          The default constructor of the CFGAction class simply creates an empty instance with the appropriate name and help string.
 
Method Summary
 void run(java.lang.String[] args)
          The run() method starts the control flow graph utility.
 
Methods inherited from class avrora.actions.Action
newOption, newOption, newOption, newOption, newOption, newOptionList
 
Methods inherited from class avrora.util.help.HelpCategory
addCommandExample, addListSection, addOptionSection, addSection, addSubcategorySection, getHelp, getName, printHelp, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HELP

public static final java.lang.String HELP
See Also:
Constant Field Values

COLOR_PROCEDURES

public final Option.Bool COLOR_PROCEDURES

GROUP_PROCEDURES

public final Option.Bool GROUP_PROCEDURES

COLLAPSE_PROCEDURES

public final Option.Bool COLLAPSE_PROCEDURES

OUTPUT

public final Option.Str OUTPUT

FILE

public final Option.Str FILE

pmap

protected ProcedureMap pmap

cfg

protected ControlFlowGraph cfg

program

protected Program program
Constructor Detail

CFGAction

public CFGAction()
The default constructor of the CFGAction class simply creates an empty instance with the appropriate name and help string.

Method Detail

run

public void run(java.lang.String[] args)
         throws java.lang.Exception
The run() method starts the control flow graph utility. The arguments passed are the name of the file(s) that contain the program. The program is loaded, its control flow graph is built, and it is output to the console in one of two textual formats; the output supported by the dot tool, and a simple colored textual format.

Specified by:
run in class Action
Parameters:
args - the command line arguments to the control flow graph utility
Throws:
java.lang.Exception