joeq.Compiler.Dataflow
Class ReachingDefs

java.lang.Object
  extended by joeq.Compiler.Dataflow.Problem
      extended by joeq.Compiler.Dataflow.ReachingDefs

public class ReachingDefs
extends Problem

ReachingDefs

Version:
$Id: ReachingDefs.java 1931 2004-09-22 22:17:47Z joewhaley $
Author:
John Whaley

Nested Class Summary
static class ReachingDefs.RDVisitor
           
 
Constructor Summary
ReachingDefs()
           
 
Method Summary
 Fact boundary()
          Returns the boundary value for this dataflow problem.
 boolean direction()
          Returns true if this is a forward dataflow problem, false if it is a backward dataflow problem.
 Set getReachingDefs(BasicBlock bb)
           
 Set getReachingDefs(BasicBlock bb, Quad q)
           
 Set getReachingDefs(BasicBlock bb, Quad q, RegisterFactory.Register r)
           
 Set getReachingDefs(BasicBlock bb, RegisterFactory.Register r)
           
 TransferFunction getTransferFunction(Object e)
          Returns the transfer function for the given code element.
 void initialize(jwutil.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(String[] args)
           
static ReachingDefs solve(ControlFlowGraph cfg)
           
 
Methods inherited from class joeq.Compiler.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
 

Constructor Detail

ReachingDefs

public ReachingDefs()
Method Detail

initialize

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

Overrides:
initialize in class Problem
Parameters:
g - graph of locations that we will run over

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
Returns:
direction

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
Returns:
boundary value

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
Returns:
value for interior points

getTransferFunction

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

Specified by:
getTransferFunction in class Problem
Parameters:
e - code element
Returns:
transfer function for the given code element

main

public static void main(String[] args)

solve

public static ReachingDefs solve(ControlFlowGraph cfg)

getReachingDefs

public Set getReachingDefs(BasicBlock bb)

getReachingDefs

public Set getReachingDefs(BasicBlock bb,
                           RegisterFactory.Register r)

getReachingDefs

public Set getReachingDefs(BasicBlock bb,
                           Quad q)

getReachingDefs

public Set getReachingDefs(BasicBlock bb,
                           Quad q,
                           RegisterFactory.Register r)


Copyright © 2001-2008 John Whaley. All Rights Reserved.