|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.ast.simple.Expression
public abstract class Expression
Base class for the simplified abstract syntax tree.
Constructor Summary | |
---|---|
Expression()
|
Method Summary | |
---|---|
abstract Expr |
convert(Env<Var> vars,
Env<java.lang.String> typevars)
Converts abstract syntax tree into a serializable form, used to generate portable .oil (Orc Intermediate Language) files. |
Expression |
suball(java.util.Map<NamedVar,? extends Argument> m)
Perform a set of substitutions defined by a map. |
abstract Expression |
subst(Argument a,
NamedVar x)
Performs the substitution [a/x], replacing occurrences of the free variable x with the new argument a (which could be any argument, including another variable). |
Expression |
subvar(Var v,
NamedVar x)
Performs the substitution [v/x], replacing occurrences of the free variable x with the nameless variable v. |
abstract java.util.Set<Var> |
vars()
Find the set of all unbound Vars (note: not FreeVars) in this expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Expression()
Method Detail |
---|
public abstract Expr convert(Env<Var> vars, Env<java.lang.String> typevars) throws CompilationException
vars
- The vars environment, used in content addressable mode to
find the appropriate deBruijn index of a var.typevars
- The type vars environment, used in content addressable
mode to find the appropriate deBruijn index of a type var.
CompilationException
public abstract Expression subst(Argument a, NamedVar x)
a
- The replacing variable or valuex
- The free variable whose occurrences will be replaced
public Expression subvar(Var v, NamedVar x)
v
- The replacing variablex
- The free variable whose occurrences will be replaced
public Expression suball(java.util.Map<NamedVar,? extends Argument> m)
m
- public abstract java.util.Set<Var> vars()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |