at.jku.risc.stout.hoau.data
Modifier and Type | Class and Description |
---|---|
class |
TermNode.TraverseCallBack
This class may be used to
traverse a term tree and
execute an arbitrary operation on every node.
|
Modifier and Type | Field and Description |
---|---|
static TermAtom |
nullAtom |
static Hedge |
nullHedge |
static boolean |
printUserFriendly
The user friendly output form transforms lambda hedges to argument lists.
|
Constructor and Description |
---|
TermNode(TermAtom atom,
Hedge hedge)
Instantiates a new term node.
|
Modifier and Type | Method and Description |
---|---|
TermNode |
clone() |
boolean |
equals(Object other)
This equality test performs an alpha equivalence test and also allows eta
expansion in order to make the given TermNodes equal.
|
void |
etaExpand(BoundVariable boundVar) |
TermAtom |
getAtom() |
Hedge |
getHedge() |
boolean |
hasFreeVar(Variable var)
Checks whether a variable occurs freely inside inside the term.
|
boolean |
isNullAtom()
Tests whether the atom of this term node is the null atom.
|
void |
print(Writer out) |
TermNode |
reduce(int maxSteps)
Perform beta reduction with the given upper bound for recursion
repetition to avoid endless recursion in untyped calculus.
|
TermNode |
reduceHedges()
Reduce unnecessary leading hedges.
|
void |
setAtom(TermAtom atom)
Null values are transformed to unique objects which represent the null
value.
|
void |
setHedge(Hedge hedge)
Null values are transformed to unique objects which represent the null
value.
|
void |
substitute(BoundVariable from,
BoundVariable to)
Substitutes one bound variable by another bound variable.
|
void |
substitute(Variable fromVar,
TermNode toTerm)
Substitutes a variable by a term and returns the result.
|
boolean |
traverse(TermNode.TraverseCallBack callBack)
Traverses the term tree and executes the callback function at every node.
|
public static final TermAtom nullAtom
public static final Hedge nullHedge
public static boolean printUserFriendly
public TermNode(TermAtom atom, Hedge hedge)
public boolean equals(Object other)
public void etaExpand(BoundVariable boundVar)
public TermAtom getAtom()
public Hedge getHedge()
public boolean hasFreeVar(Variable var)
public boolean isNullAtom()
public void print(Writer out) throws IOException
print
in class Printable
IOException
public TermNode reduce(int maxSteps) throws NotNormalizableException
NotNormalizableException
public TermNode reduceHedges()
public void setAtom(TermAtom atom)
nullAtom
public void setHedge(Hedge hedge)
nullHedge
public void substitute(BoundVariable from, BoundVariable to)
public void substitute(Variable fromVar, TermNode toTerm) throws NotNormalizableException
NotNormalizableException
public boolean traverse(TermNode.TraverseCallBack callBack)
TermNode.TraverseCallBack