public class TermTransformer extends NonRecursive
Modifier and Type | Class and Description |
---|---|
protected static class |
TermTransformer.BuildAnnotation
Collect the sub term and annotations of an annotated formula from
the converted stack.
|
protected static class |
TermTransformer.BuildApplicationTerm
Collect the arguments of an application term from the converted stack
and finish the conversion of appTerm.
|
protected static class |
TermTransformer.BuildLetTerm
Collect the sub term and the values of a let term from the
converted stack and finish the conversion of let term.
|
protected static class |
TermTransformer.BuildQuantifier
Collect the sub term of a quantified formula and build the converted
formula.
|
protected static class |
TermTransformer.StartLetTerm
Walker that is called after the variable values are transformed
and before the let body starts.
|
NonRecursive.TermWalker, NonRecursive.Walker
Constructor and Description |
---|
TermTransformer() |
Modifier and Type | Method and Description |
---|---|
protected void |
beginScope() |
protected void |
convert(Term term)
The function that does the transformation.
|
void |
convertApplicationTerm(ApplicationTerm appTerm,
Term[] newArgs) |
protected void |
endScope() |
protected Term |
getConverted()
Get a single converted term from the converted stack.
|
protected Term[] |
getConverted(Term[] oldArgs)
Get the converted terms from the converted stack.
|
void |
postConvertAnnotation(AnnotatedTerm old,
Annotation[] newAnnots,
Term newBody) |
void |
postConvertLet(LetTerm oldLet,
Term[] newValues,
Term newBody) |
void |
postConvertQuantifier(QuantifiedFormula old,
Term newBody) |
void |
preConvertLet(LetTerm oldLet,
Term[] newValues) |
protected void |
pushTerm(Term term)
Push a term on the todo stack as CONVERT work item.
|
protected void |
pushTerms(Term[] terms)
Push all terms in the array on the todo stack as CONVERT work item.
|
void |
reset()
Manually reset this walker.
|
protected void |
setResult(Term term)
Set the conversion result to term.
|
Term |
transform(Term term)
Transform a term.
|
enqueueWalker, run, run, toString
protected final void pushTerms(Term[] terms)
terms
- the array of terms.protected final void pushTerm(Term term)
term
- the term to convert.protected final void setResult(Term term)
term
- the converted term.protected void beginScope()
protected void endScope()
protected void convert(Term term)
term
- The term to convert.public void convertApplicationTerm(ApplicationTerm appTerm, Term[] newArgs)
public void postConvertQuantifier(QuantifiedFormula old, Term newBody)
public void postConvertAnnotation(AnnotatedTerm old, Annotation[] newAnnots, Term newBody)
public final Term transform(Term term)
term
- the term to transform.protected final Term getConverted()
protected final Term[] getConverted(Term[] oldArgs)
oldArgs
- the original arguments.public void reset()
NonRecursive
reset
in class NonRecursive