parser.absconparseur.intension
Class EvaluationManager
java.lang.Object
parser.absconparseur.intension.EvaluationManager
public class EvaluationManager
- extends Object
Field Summary |
protected int[] |
currentValues
This field is inserted in order to avoid to have a tuple as parameter of method evaluate in Evaluator. |
protected Evaluator[] |
evaluators
|
protected static Logger |
LOGGER
|
protected int[] |
shortCircuits
1D = index of evaluator;
value = 1 means that if the result of the evaluator is 1 it can be returned immediately,
value = 0 means that if the result of the evaluator is 0 it can be returned immediately,
value = -1 means that we have to keep evaluating |
protected String[] |
universalPostfixExpression
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final Logger LOGGER
universalPostfixExpression
protected String[] universalPostfixExpression
evaluators
protected Evaluator[] evaluators
shortCircuits
protected int[] shortCircuits
- 1D = index of evaluator;
value = 1 means that if the result of the evaluator is 1 it can be returned immediately,
value = 0 means that if the result of the evaluator is 0 it can be returned immediately,
value = -1 means that we have to keep evaluating
currentValues
protected int[] currentValues
- This field is inserted in order to avoid to have a tuple as parameter of method evaluate in Evaluator.
EvaluationManager
public EvaluationManager(String[] universalPostfixExpression)
getCurentValueOf
public int getCurentValueOf(int variablePosition)
dealWithShortCircuits
protected void dealWithShortCircuits()
evaluate
public final long evaluate(int[] values)
- Evaluates the recorded postfix expression with respect to the given tuple.
controlArityOfEvaluators
public boolean controlArityOfEvaluators()
controlTypeOfEvaluators
public boolean controlTypeOfEvaluators(boolean booleanType)
isGuaranteedToBeDivisionByZeroFree
public boolean isGuaranteedToBeDivisionByZeroFree(PVariable[] variables)
isGuaranteedToBeOverflowFree
public boolean isGuaranteedToBeOverflowFree(PVariable[] variables)
display
public void display()
Copyright © 2012. All Rights Reserved.