|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.hir.Program
public final class Program
Represents the entire program.
| Constructor Summary | |
|---|---|
Program()
Make an empty program. |
|
Program(java.util.List<java.lang.String> files)
Make a program from a group of source files. |
|
Program(java.lang.String[] files)
Make a program from a group of source files. |
|
| Method Summary | |
|---|---|
void |
addTranslationUnit(TranslationUnit tunit)
Adds a translation unit to the program. |
void |
createNewDDGraph()
Adds a Data Dependence Graph Object to this program, created by DDTDriver |
static void |
defaultPrint(Program prog,
java.io.OutputStream stream)
Prints the entire program to a stream. |
java.util.List<TranslationUnit> |
getChildren()
Provides access to the children of this object as a list. |
DDGraph |
getDDGraph()
Return program data dependence graph |
Traversable |
getParent()
Provides access to the parent of this object. |
void |
parallelParse()
Spawns threads to parse all of the translation units in parallel. |
void |
parse()
Parse all of the translation units that belong to this program. |
void |
print()
Write all translation units to their respective files. |
void |
print(java.io.OutputStream stream)
Print the code for the IR represented by the object. |
void |
removeChild(Traversable child)
Removes the specified child. |
void |
setChild(int index,
Traversable t)
Sets the indexth child of this object to t. |
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently created objects will use the supplied method. |
void |
setParent(Traversable t)
Unsupported - the parent of a program is null and may not be changed. |
void |
setPrintMethod(java.lang.reflect.Method m)
Overrides the print method for this object only. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Program()
public Program(java.util.List<java.lang.String> files)
files - A list of strings that are source file names.public Program(java.lang.String[] files)
files - An array of strings that are source file names.| Method Detail |
|---|
public void addTranslationUnit(TranslationUnit tunit)
tunit - The translation unit to add. Its parent
will be set to this program.
public static void defaultPrint(Program prog,
java.io.OutputStream stream)
prog - The program to print.stream - The stream on which to print the program.public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<TranslationUnit> getChildren()
Traversable
getChildren in interface Traversablepublic Traversable getParent()
Traversable
getParent in interface Traversable
public void parallelParse()
throws java.io.IOException
java.io.IOException - if there is a problem accessing any file.
public void parse()
throws java.io.IOException
java.io.IOException - if there is a problem accessing any file.
public void print()
throws java.io.IOException
java.io.FileNotFoundException - if a file could not be opened.
java.io.IOExceptionpublic void print(java.io.OutputStream stream)
Printable
print in interface Printablestream - The stream on which to print the data.public void removeChild(Traversable child)
Traversable
removeChild in interface Traversablechild - a reference to a child object that must match with ==.
public void setChild(int index,
Traversable t)
Traversable
setChild in interface Traversablepublic static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setParent(Traversable t)
setParent in interface Traversablepublic void setPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void createNewDDGraph()
public DDGraph getDDGraph()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||