SandMark version 3.0


sandmark.util.controlflowgraph
Class MinimalSynthesizer

java.lang.Object
  |
  +--sandmark.util.controlflowgraph.ControlFlowSynthesizer
        |
        +--sandmark.util.controlflowgraph.VoidMethodSynthesizer
              |
              +--sandmark.util.controlflowgraph.MinimalSynthesizer

public class MinimalSynthesizer
extends VoidMethodSynthesizer

A simple code generator designed to minimize output size without reordering nodes.

If there is a leaf node (RETURN instruction) reachable from the root node, the generated code will be safely executable. If there is no leaf node, the generated code will loop forever.


Field Summary
 
Fields inherited from class sandmark.util.controlflowgraph.ControlFlowSynthesizer
rng
 
Constructor Summary
MinimalSynthesizer()
           
 
Method Summary
 MethodCFG generate(Graph graph, de.fub.bytecode.generic.ConstantPoolGen cpg)
          Generates a void no-argument method corresponding to the given graph.
static void main(java.lang.String[] args)
          Test driver; see ControlFlowSynthesizer.test.
 
Methods inherited from class sandmark.util.controlflowgraph.VoidMethodSynthesizer
makeMethod
 
Methods inherited from class sandmark.util.controlflowgraph.ControlFlowSynthesizer
makeNOPs, randomIn, setSeed, test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinimalSynthesizer

public MinimalSynthesizer()
Method Detail

generate

public MethodCFG generate(Graph graph,
                          de.fub.bytecode.generic.ConstantPoolGen cpg)
Generates a void no-argument method corresponding to the given graph. All graphs are acceptable; no IllegalArgumentException is thrown.

Specified by:
generate in class ControlFlowSynthesizer

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test driver; see ControlFlowSynthesizer.test.

java.lang.Exception

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003