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
  • Constructor Details

  • Method Details

    • let

      public Term let​(Term input)
      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

      public void enqueueLetter​(Term term)
      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

      public static boolean bindsVariable​(Term parent, Term child)
    • addTransformScope

      public void addTransformScope​(TermVariable[] vars, java.util.Map<Term,​de.uni_freiburg.informatik.ultimate.logic.FormulaLet.TermInfo> scope)
    • visitChild

      public void visitChild​(Term term)
      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)