Package org.oristool.lello.visitor
Class DefaultSimplification
java.lang.Object
org.oristool.lello.visitor.DefaultSimplification
- All Implemented Interfaces:
SymbolicVisitor
Simplifies a Lello expression by using some elementary algebraic properties.
This is an implementation of the SymbolicVisitor interface.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvisitBinaryExpression
(Bindings bindings, BinaryExpression e) Called by a binary expression.visitBrackets
(Bindings bindings, Brackets e) Called by a bracket expression.visitConstant
(Bindings bindings, Constant e) Called by a constant.visitFunctionCall
(Bindings bindings, FunctionCall e) Called by a function call expression.visitUnaryExpression
(Bindings bindings, UnaryExpression e) Called by an unary expression.visitVariable
(Bindings bindings, Variable e) Called by a variable reference.
-
Constructor Details
-
DefaultSimplification
public DefaultSimplification()
-
-
Method Details
-
visitBinaryExpression
Description copied from interface:SymbolicVisitor
Called by a binary expression.- Specified by:
visitBinaryExpression
in interfaceSymbolicVisitor
- Parameters:
bindings
- The bindings.e
- The calling expression.- Returns:
- The manipulated expression.
-
visitBrackets
Description copied from interface:SymbolicVisitor
Called by a bracket expression.- Specified by:
visitBrackets
in interfaceSymbolicVisitor
- Parameters:
bindings
- The bindings.e
- The calling expression.- Returns:
- The manipulated expression.
-
visitConstant
Description copied from interface:SymbolicVisitor
Called by a constant.- Specified by:
visitConstant
in interfaceSymbolicVisitor
- Parameters:
bindings
- The bindings.e
- The calling expression.- Returns:
- The manipulated expression.
-
visitFunctionCall
Description copied from interface:SymbolicVisitor
Called by a function call expression.- Specified by:
visitFunctionCall
in interfaceSymbolicVisitor
- Parameters:
bindings
- The bindings.e
- The calling expression.- Returns:
- The manipulated expression.
-
visitUnaryExpression
Description copied from interface:SymbolicVisitor
Called by an unary expression.- Specified by:
visitUnaryExpression
in interfaceSymbolicVisitor
- Parameters:
bindings
- The bindings.e
- The calling expression.- Returns:
- The manipulated expression.
-
visitVariable
Description copied from interface:SymbolicVisitor
Called by a variable reference.- Specified by:
visitVariable
in interfaceSymbolicVisitor
- Parameters:
bindings
- The bindings.e
- The calling expression.- Returns:
- The manipulated expression.
-