Class Optimizer
- java.lang.Object
-
- com.aquima.interactions.expressions.optimizer.Optimizer
-
public class Optimizer extends Object
The optimizer is responsible for converting nodes from the semantic tree to nodes that can be evaluated. The implementation of this class should attempt to create evaluation nodes that are optimal in both memory consumption (no unnecessary members) and evaluation time.- Since:
- 6.4
- Author:
- O. Kerpershoek
-
-
Constructor Summary
Constructors Constructor Description Optimizer(MessageReporter reporter)
Constructs the optimizer with the reporter that should be used to add any errors or warnings to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IExpressionNode
optimize(ISemanticNode node)
This method converts the semantic node to an optimal expression node that can be evaluated.
-
-
-
Constructor Detail
-
Optimizer
public Optimizer(MessageReporter reporter)
Constructs the optimizer with the reporter that should be used to add any errors or warnings to.- Parameters:
reporter
- the reporter that should be used to add any errors or warnings to.
-
-
Method Detail
-
optimize
public IExpressionNode optimize(ISemanticNode node)
This method converts the semantic node to an optimal expression node that can be evaluated.- Parameters:
node
- The semantic node that should be converted.- Returns:
- The expression node for the specified semantic node.
-
-