Class FormulaLet
java.lang.Object
de.uni_freiburg.informatik.ultimate.logic.NonRecursive
de.uni_freiburg.informatik.ultimate.logic.FormulaLet
public class FormulaLet extends NonRecursive
Compute the common-subexpression-elimination (cse) form of a term. A term is
in cse form if all nodes with an out-degree of at least 1 and an in-degree of
at least 2 are eliminated, i.e., factored out into a let.
- Author:
- hoenicke
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormulaLet.AddParentMatchCasestatic classFormulaLet.CollectInfostatic classFormulaLet.CollectMatchCasestatic interfaceFormulaLet.LetFilterstatic classFormulaLet.ScopeRemoverstatic classFormulaLet.TransformMatchCaseNested classes/interfaces inherited from class de.uni_freiburg.informatik.ultimate.logic.NonRecursive
NonRecursive.TermWalker, NonRecursive.Walker -
Constructor Summary
Constructors Constructor Description FormulaLet()FormulaLet(FormulaLet.LetFilter filter) -
Method Summary
Modifier and Type Method Description voidaddTransformScope(TermVariable[] vars, java.util.Map<Term,de.uni_freiburg.informatik.ultimate.logic.FormulaLet.TermInfo> scope)static booleanbindsVariable(Term parent, Term child)voidenqueueLetter(Term term)For the initial formula and for each named term, a new scope for term infos is created (mVisited).Termlet(Term input)Compute the cse form of a term.java.util.Map<Term,de.uni_freiburg.informatik.ultimate.logic.FormulaLet.TermInfo>newScope(TermVariable[] vars)voidvisitChild(Term term)Visit a child of the current term.Methods inherited from class de.uni_freiburg.informatik.ultimate.logic.NonRecursive
enqueueWalker, reset, run, run, toString
-
Constructor Details
-
FormulaLet
public FormulaLet() -
FormulaLet
-
-
Method Details
-
let
Compute the cse form of a term. Note that all lets will be removed from the input before computing the cse form.- Parameters:
input- The input term.- Returns:
- A term in cse form that represents the same DAG than the input.
-
enqueueLetter
For the initial formula and for each named term, a new scope for term infos is created (mVisited). It then creates a TermInfo for the term, which is walked first to collect all information about the term and its subterms. After collecting all info, the the term is transformed. to a letted term. Finally, the visited scope that was initially added is removed again. -
bindsVariable
-
addTransformScope
public void addTransformScope(TermVariable[] vars, java.util.Map<Term,de.uni_freiburg.informatik.ultimate.logic.FormulaLet.TermInfo> scope) -
visitChild
Visit a child of the current term.- Parameters:
let- The formula let environment.term- The child term to visit.
-
newScope
public java.util.Map<Term,de.uni_freiburg.informatik.ultimate.logic.FormulaLet.TermInfo> newScope(TermVariable[] vars)
-