Package mepk.kernel

Interface Expression.Internal

All Known Implementing Classes:
App, Var
Enclosing class:
Expression

public static interface Expression.Internal
An internal version of an Expression. Instances are unmodifiable values. They are equal if (and only if) they have the same structure.
  • Method Details

    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • substitute

      Expression substitute(String varName, Expression.Internal replacement, Expression.Internal.Wrapper wrapper)
      Create a new internal expression by replacing a variable by an internal expression.
      Parameters:
      varName - the variable to replace
      replacement - the replacement expression
      wrapper - expression wrapper
      Returns:
      the new expression
    • expand

      Create a new expression by expanding all instances of the given abbreviation, and collect all conditions in accu.
      Parameters:
      abbreviation - the abbreviation to expand
      accu - the accumulator for the (expanded) conditions
      wrapper - expression wrapper
      Returns:
      the new expression
    • addVarNamesTo

      void addVarNamesTo(Set<String> result)
      Find all variable names in this expression, and add them to the given set.
      Parameters:
      result - the accumulating set