Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Compil3r.Dataflow
Class ReachingDefs  view ReachingDefs download ReachingDefs.java

java.lang.Object
  extended byCompil3r.Dataflow.Problem
      extended byCompil3r.Dataflow.ReachingDefs

public class ReachingDefs
extends Problem

ReachingDefs

Version:
$Id: ReachingDefs.java,v 1.1 2003/06/17 02:37:51 joewhaley Exp $

Nested Class Summary
static class ReachingDefs.BBComparator
           
static class ReachingDefs.RDSet
           
static class ReachingDefs.RDTransferFunction
           
 
Field Summary
(package private)  ReachingDefs.RDSet emptySet
           
(package private)  ReachingDefs.RDTransferFunction emptyTF
           
(package private)  Compil3r.Quad.Quad[] quads
           
(package private) static boolean TRACE
           
(package private)  java.util.Map transferFunctions
           
 
Constructor Summary
ReachingDefs()
           
 
Method Summary
 Fact boundary()
          Returns the boundary value for this dataflow problem.
private static void compareResults(Compil3r.Quad.ControlFlowGraph cfg, Solver s1, Solver s2)
           
 boolean direction()
          Returns true if this is a forward dataflow problem, false if it is a backward dataflow problem.
private static void dumpResults(Compil3r.Quad.ControlFlowGraph cfg, Solver s)
           
 TransferFunction getTransferFunction(java.lang.Object e)
          Returns the transfer function for the given code element.
private  void handleEdges(Compil3r.Quad.BasicBlock bb, Util.Templates.List.BasicBlock bbs, Util.BitString gen, ReachingDefs.RDTransferFunction defaultTF)
           
 void initialize(Util.Graphs.Graph g)
          Performs necessary initialization for this dataflow problem.
 Fact interior()
          Returns the value that the interior points should be initialized to.
static void main(java.lang.String[] args)
           
private static void solve(Compil3r.Quad.ControlFlowGraph cfg, Solver s, Problem p)
           
 
Methods inherited from class Compil3r.Dataflow.Problem
apply, closure, compare, compose, merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

quads

Compil3r.Quad.Quad[] quads

transferFunctions

java.util.Map transferFunctions

emptySet

ReachingDefs.RDSet emptySet

emptyTF

ReachingDefs.RDTransferFunction emptyTF

TRACE

static final boolean TRACE
See Also:
Constant Field Values
Constructor Detail

ReachingDefs

public ReachingDefs()
Method Detail

initialize

public void initialize(Util.Graphs.Graph g)
Description copied from class: Problem
Performs necessary initialization for this dataflow problem.

Overrides:
initialize in class Problem

handleEdges

private void handleEdges(Compil3r.Quad.BasicBlock bb,
                         Util.Templates.List.BasicBlock bbs,
                         Util.BitString gen,
                         ReachingDefs.RDTransferFunction defaultTF)

direction

public boolean direction()
Description copied from class: Problem
Returns true if this is a forward dataflow problem, false if it is a backward dataflow problem.

Specified by:
direction in class Problem

boundary

public Fact boundary()
Description copied from class: Problem
Returns the boundary value for this dataflow problem. For a forward problem, this is the value at the entrypoint, whereas for a backward problem, this is the value at the exitpoint.

Specified by:
boundary in class Problem

interior

public Fact interior()
Description copied from class: Problem
Returns the value that the interior points should be initialized to.

Specified by:
interior in class Problem

getTransferFunction

public TransferFunction getTransferFunction(java.lang.Object e)
Description copied from class: Problem
Returns the transfer function for the given code element.

Specified by:
getTransferFunction in class Problem

main

public static void main(java.lang.String[] args)

solve

private static void solve(Compil3r.Quad.ControlFlowGraph cfg,
                          Solver s,
                          Problem p)

dumpResults

private static void dumpResults(Compil3r.Quad.ControlFlowGraph cfg,
                                Solver s)

compareResults

private static void compareResults(Compil3r.Quad.ControlFlowGraph cfg,
                                   Solver s1,
                                   Solver s2)