orc.ast.simple
Class Defs
java.lang.Object
   orc.ast.simple.Expression
orc.ast.simple.Expression
       orc.ast.simple.Defs
orc.ast.simple.Defs
- public class Defs 
- extends Expression
 
 
| Method Summary | 
|  Expr | convert(Env<Var> vars)Converts abstract syntax tree into a serializable form, used to generate
 portable .oil (Orc Intermediate Language) files.
 | 
|  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).
 | 
|  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 | 
 
defs
public java.util.List<Definition> defs
body
public Expression body
Defs
public Defs(java.util.List<Definition> defs,
            Expression body)
subst
public Expression subst(Argument a,
                        NamedVar x)
- Description copied from class: Expression
- 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).
 
- 
- Specified by:
- substin class- Expression
 
- 
- Parameters:
- a- The replacing variable or value
- x- The free variable whose occurrences will be replaced
 
vars
public java.util.Set<Var> vars()
- Description copied from class: Expression
- Find the set of all unbound Vars (note: not FreeVars) in this expression.
 
- 
- Specified by:
- varsin class- Expression
 
- 
 
convert
public Expr convert(Env<Var> vars)
             throws CompilationException
- Description copied from class: Expression
- Converts abstract syntax tree into a serializable form, used to generate
 portable .oil (Orc Intermediate Language) files.
 
- 
- Specified by:
- convertin class- Expression
 
- 
- Parameters:
- vars- The vars environment, used in content addressable mode to 
                                find the appropriate deBruijn index of a var.
- Returns:
- A new node.
- Throws:
- CompilationException