|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.util.controlflowgraph.ControlFlowSynthesizer
Family of classes that generate code to match a control flow graph. The parent class also contains utility functions and a random number stream for use by subclasses.
Field Summary | |
protected java.util.Random |
rng
|
Constructor Summary | |
protected |
ControlFlowSynthesizer()
Constructs a new ControlFlowSynthesizer with its own private random number stream initialized from the Math.random stream. |
Method Summary | |
abstract MethodCFG |
generate(Graph g,
de.fub.bytecode.generic.ConstantPoolGen cpg)
Generates a method that corresponds to the given graph. |
(package private) de.fub.bytecode.generic.InstructionHandle[] |
makeNOPs(de.fub.bytecode.generic.InstructionList inslist,
Graph graph,
Dfs dfs)
Traverses a graph and creates a NOP instruction for each node, returning an array of handles indexed by node numbers. |
protected int |
randomIn(int m,
int n)
Returns a random r such that m <= r <= n. |
void |
setSeed(long seed)
Sets the random number seed to force reproducible behavior. |
(package private) void |
test(java.lang.String[] args)
Tests this synthesizer using a radix-encoded watermark. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Random rng
Constructor Detail |
protected ControlFlowSynthesizer()
Method Detail |
public void setSeed(long seed)
protected int randomIn(int m, int n)
public abstract MethodCFG generate(Graph g, de.fub.bytecode.generic.ConstantPoolGen cpg)
The abstract
de.fub.bytecode.generic.InstructionHandle[] makeNOPs(de.fub.bytecode.generic.InstructionList inslist, Graph graph, Dfs dfs)
void test(java.lang.String[] args) throws java.lang.Exception
Usage: java classname [-r] [watermark [classname]]
-r specifies randomized (irreproducible) behavior
watermark is the string to encode; the default is "31416"
classname, if present, causes generation of a .class file
java.lang.Exception
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |