SandMark version 3.0


sandmark.util.controlflowgraph
Class SimpleSwitchSynthesizer

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

public class SimpleSwitchSynthesizer
extends VoidMethodSynthesizer

A simple code generator using TABLESWITCH instructions. A leaf node produces a RETURN. The resulting code is obviously artificial.


Field Summary
 
Fields inherited from class sandmark.util.controlflowgraph.ControlFlowSynthesizer
rng
 
Constructor Summary
SimpleSwitchSynthesizer()
           
 
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.
 
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

SimpleSwitchSynthesizer

public SimpleSwitchSynthesizer()
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.

java.lang.Exception

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003