Class AbstractQueryMetaContext
java.lang.Object
tools.refinery.interpreter.matchers.context.AbstractQueryMetaContext
- All Implemented Interfaces:
IQueryMetaContext
Common abstract class for implementers of
IQueryMetaContext- Since:
- 1.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells whether the givenIInputKeyis an edge and may lead out of scope.getConditionalImplications(IInputKey implyingKey) Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys).Returns anIPosetComparatorfor the given set ofIInputKeys.For query normalizing, this is the order suggested for trying to eliminate input keys.getWeakenedAlternatives(IInputKey implyingKey) Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.booleanisPosetKey(IInputKey key) Returns true if the givenIInputKeyrepresents a poset type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tools.refinery.interpreter.matchers.context.IQueryMetaContext
getFunctionalDependencies, getImplications, isEnumerable, isStateless
-
Constructor Details
-
AbstractQueryMetaContext
public AbstractQueryMetaContext()
-
-
Method Details
-
getConditionalImplications
public Map<InputKeyImplication,Set<InputKeyImplication>> getConditionalImplications(IInputKey implyingKey) Description copied from interface:IQueryMetaContextReturns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys). For example, a "type x, unscoped" input key may imply the "type x, in scope" input key under the condition of the input key "x is in scope"Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys (either as the implying key or as the additional condition).
Note that symmetry is not required, i.e. the additional conditions do not have to list the same conditional implication.
- Specified by:
getConditionalImplicationsin interfaceIQueryMetaContext- Returns:
- multi-map, where the keys are additional conditions and the values are input key implications jointly implied by the condition and the given implying key.
- Since:
- 2.0
-
canLeadOutOfScope
Description copied from interface:IQueryMetaContextTells whether the givenIInputKeyis an edge and may lead out of scope.- Specified by:
canLeadOutOfScopein interfaceIQueryMetaContext- Since:
- 1.6
-
getSuggestedEliminationOrdering
Description copied from interface:IQueryMetaContextFor query normalizing, this is the order suggested for trying to eliminate input keys.- Specified by:
getSuggestedEliminationOrderingin interfaceIQueryMetaContext- Since:
- 1.6
-
getWeakenedAlternatives
Description copied from interface:IQueryMetaContextReturns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
Must follow directly or transitively from implications of
IQueryMetaContext.getImplications(IInputKey).- Specified by:
getWeakenedAlternativesin interfaceIQueryMetaContext- Since:
- 1.6
-
isPosetKey
Description copied from interface:IQueryMetaContextReturns true if the givenIInputKeyrepresents a poset type.- Specified by:
isPosetKeyin interfaceIQueryMetaContext
-
getPosetComparator
Description copied from interface:IQueryMetaContextReturns anIPosetComparatorfor the given set ofIInputKeys.- Specified by:
getPosetComparatorin interfaceIQueryMetaContext- Parameters:
key- an iterable collection of input keys- Returns:
- the poset comparator
-