dk.brics.string.flow.operations
Class Simplifier

java.lang.Object
  extended by dk.brics.string.flow.operations.Simplifier

public class Simplifier
extends Object

Flow graph simplifier.


Method Summary
static void normalize(FlowGraph g)
          Normalizes the given graph.
static Map<Node,Node> simplify(FlowGraph g)
          Simplifies the given graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalize

public static void normalize(FlowGraph g)
Normalizes the given graph. In a normalized graph, only assignment nodes may have multiple incoming edges. (Concat nodes and binary operation nodes have at most one edge for each argument.)


simplify

public static Map<Node,Node> simplify(FlowGraph g)
Simplifies the given graph. Performs the following optimizations:

Returns:
a map from the original nodes to the corresponding node in the simplified graph


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.