parser.absconparseur.intension
Class EvaluationManager

java.lang.Object
  extended by 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
           
 
Constructor Summary
EvaluationManager(String[] universalPostfixExpression)
           
 
Method Summary
 boolean controlArityOfEvaluators()
           
 boolean controlTypeOfEvaluators(boolean booleanType)
           
protected  void dealWithShortCircuits()
           
 void display()
           
 long evaluate(int[] values)
          Evaluates the recorded postfix expression with respect to the given tuple.
 int getCurentValueOf(int variablePosition)
           
 boolean isGuaranteedToBeDivisionByZeroFree(PVariable[] variables)
           
 boolean isGuaranteedToBeOverflowFree(PVariable[] variables)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

EvaluationManager

public EvaluationManager(String[] universalPostfixExpression)
Method Detail

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.