Class ExprNormalizer


  • public class ExprNormalizer
    extends Object
    Class used to normalize expressions and nodes, and output an expression that is equivalent
    Author:
    Maxime Lefrançois
    • 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: