Class ExprNormalizer


  • public class ExprNormalizer
    extends java.lang.Object
    Class used to normalize expressions and nodes, and output an expression that is equivalent
    Author:
    Maxime Lefrançois
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Expr normalize​(Node n)
      get a normalized expression for the node given as input, returns either the expression of a expression node (Node_Extended), or a NodeValueNode whose node is the input node.
      Expr normalize​(Expr expr)
      normalizes an expression, substituting every instance of NodeValueNode whose node is a Node_Extended with the associated expression of that Node_Extended.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • normalize

        public Expr normalize​(Expr expr)
        normalizes an expression, substituting every instance of NodeValueNode whose node is a Node_Extended with the associated expression of that Node_Extended.
        Parameters:
        expr - expression to normalize
        Returns:
      • normalize

        public Expr normalize​(Node n)
        get a normalized expression for the node given as input, returns either the expression of a expression node (Node_Extended), or a NodeValueNode whose node is the input node.
        Parameters:
        n - node (potentially expression node) to get an expression from
        Returns: