Package uk.ac.bbk.dcs.automed.qproc.optimise.optimisers

Class Summary
ChooseOptimiser This Class optimises expressions involving the "choose" built-in function.
CollectionOperatorReorganiser This optimiser is to reorganise the order of arguments in expressions containing ++, --, intersect & union operators, so that constructs from the same schema come closer in the query tree and therefore bigger sub queries can be sent to the a datasource wrapper.
CollectionSimplification This optimiser eliminates Constructors Null, Any, Void, Nil, SNil and BNil where possible.
CommonSubexpressionElimination  
ComprehensionDistributor This optimiser is used to decompose a comprehension whose generators contain append expressions, such as [x|x<-(E1++E2)].
ComprehensionHeadSimplifier Rewrites [V(h)|Q] to map (lambda h V(h)) [h|Q]
ComprehensionHeadSimplifierUndo Rewrites map (lambda h V(h)) [h|Q] to [V(h)|Q]
ConstantInPatternOptimiser Detects equality filters between a var and a constant, deletes the filter and replaces the var in generators with the constant
EmptyJoinOptimiser  
EqualityFilterOptimiser Rewrites expressions of the form ({op11, ..., op1n} = {op21, ..., op2n}) to ((op11=op21); ...; (op1n=op2n))
NestingOptimiser This optimiser is used to reorganise generators in comprehensions.
OptimisationUtility  
RelationalMetadata Class storing relational metadata.
RelationSKJEliminator This class removes self-join of relations over their key arising from the AutoMed relational model encoding For example, [{k1,n,m}|{p1,n}<-[{{k1,..,kn},a1}|{k1,..,kn,a1,a2}<-<>]; {p2,m}<-[{{k1,..,kn},a2}|{k1,..,kn,a1,a2}<-<>]; p1 = p2] becomes: [{{k1,...,kn},a1,a2}|{k1,..,kn,a1,a2}<-<>] Although table <> may contain several key attributes, we assume that {p1,n} and {p2,m} will be pair The steps for the simplification are: 1.
SQLWrapperSKJOptimiser Removes self-key joins occurring because of the dual layer of schemas that the SQLModelDef class introduces.
UnnestOptimiser Unnests comprehensions.