fmrisc.Semantics
Class FreeVariables

java.lang.Object
  extended by fmrisc.Syntax.ASTVisitorBase
      extended by fmrisc.Semantics.FreeVariables
All Implemented Interfaces:
ASTVisitor

public final class FreeVariables
extends ASTVisitorBase

Compute the free variables of an expression.


Method Summary
static void append(Expression exp, java.util.Vector result)
          Compute free variables of expression.
static java.util.Vector compute(Expression exp)
          Compute free variables of expression.
static java.util.Vector compute(Type type)
          Compute free variables of type.
 
Methods inherited from class fmrisc.Syntax.ASTVisitorBase
isCloned, visit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compute

public static java.util.Vector compute(Expression exp)
Compute free variables of expression.

Parameters:
exp - an expression.
Returns:
a vector of ValueSymbol objects representing the free variables of the expression (each symbol occurs once in the vector).

compute

public static java.util.Vector compute(Type type)
Compute free variables of type.

Parameters:
type - a type.
Returns:
a vector of ValueSymbol objects representing the free variables of the type (each symbol occurs once in the vector).

append

public static void append(Expression exp,
                          java.util.Vector result)
Compute free variables of expression.

Parameters:
exp - an expression.
result - a vector to which the ValueSymbol objects representing the free variables of the expression are appended (each symbol will occur only once in result).