uk.ac.bbk.dcs.automed.qproc.optimise.optimisers
Class ChooseOptimiser

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.qproc.optimise.optimisers.ChooseOptimiser

public class ChooseOptimiser
extends java.lang.Object

This Class optimises expressions involving the "choose" built-in function.

Author:
Hao Fan, Lucas Zamboulis

Field Summary
protected  java.util.logging.Logger logger
           
 
Constructor Summary
ChooseOptimiser()
          The three simplification rules.
 
Method Summary
 boolean apply(Cell c)
          Applies rules in a bottom-to-top fashion.
 int getNumOfFunctions(Cell c)
          Get the number of functions in the ASG, if the ASG is a Void Cell, return -1
 boolean optimise(ASG g)
           
 boolean optimise(Cell c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected java.util.logging.Logger logger
Constructor Detail

ChooseOptimiser

public ChooseOptimiser()
The three simplification rules.

Method Detail

getNumOfFunctions

public int getNumOfFunctions(Cell c)
Get the number of functions in the ASG, if the ASG is a Void Cell, return -1

Parameters:
c -
Returns:

apply

public boolean apply(Cell c)
              throws java.lang.Exception
Applies rules in a bottom-to-top fashion.

Parameters:
c -
Returns:
Throws:
java.lang.Exception

optimise

public boolean optimise(Cell c)
                 throws QueryOptimisationException
Throws:
QueryOptimisationException

optimise

public boolean optimise(ASG g)