Class TypeFilterConstraint
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.DeferredPConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint
-
- All Implemented Interfaces:
ITypeConstraint,ITypeInfoProviderConstraint,PConstraint,PTraceable
public class TypeFilterConstraint extends VariableDeferredPConstraint implements ITypeConstraint
Represents a non-enumerable type constraint that asserts that values substituted for the given tuple of variables form a tuple that belongs to a (typically non-enumerable) extensional relation identified by anIInputKey.The InputKey is typically not enumerable. If it is enumerable, use
TypeConstraintinstead, so that the PConstraint carries over the property of enumerability.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.ITypeConstraint
ITypeConstraint.TypeConstraintUtil
-
-
Field Summary
-
Fields inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
pBody
-
Fields inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint
COMPARE_BY_MONOTONOUS_ID
-
-
Constructor Summary
Constructors Constructor Description TypeFilterConstraint(PBody pBody, Tuple variablesTuple, IInputKey inputKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoReplaceVariable(PVariable obsolete, PVariable replacement)java.util.Set<PVariable>getDeducedVariables()The set of variables whose potential values can be enumerated (once all non-deduced variables have known values).java.util.Set<PVariable>getDeferringVariables()TypeJudgementgetEquivalentJudgement()java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>>getFunctionalDependencies(IQueryMetaContext context)A (preferably minimal) cover of known functional dependencies between variables.java.util.Set<TypeJudgement>getImpliedJudgements(IQueryMetaContext context)Returns type information implied by this constraint.IInputKeygetInputKey()TuplegetVariablesTuple()protected java.lang.StringtoStringRest()-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint
isReadyAt
-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
checkSanity, delete, getAffectedVariables, getBody, getMonotonousID, getPSystem, replaceVariable, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint
checkSanity, delete, getAffectedVariables, getBody, getMonotonousID, replaceVariable
-
-
-
-
Method Detail
-
getVariablesTuple
public Tuple getVariablesTuple()
-
getInputKey
public IInputKey getInputKey()
-
getEquivalentJudgement
public TypeJudgement getEquivalentJudgement()
- Specified by:
getEquivalentJudgementin interfaceITypeConstraint
-
doReplaceVariable
protected void doReplaceVariable(PVariable obsolete, PVariable replacement)
- Specified by:
doReplaceVariablein classBasePConstraint
-
getImpliedJudgements
public java.util.Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context)
Description copied from interface:ITypeInfoProviderConstraintReturns type information implied by this constraint.- Specified by:
getImpliedJudgementsin interfaceITypeInfoProviderConstraint
-
getDeducedVariables
public java.util.Set<PVariable> getDeducedVariables()
Description copied from interface:PConstraintThe set of variables whose potential values can be enumerated (once all non-deduced variables have known values).- Specified by:
getDeducedVariablesin interfacePConstraint
-
getDeferringVariables
public java.util.Set<PVariable> getDeferringVariables()
- Specified by:
getDeferringVariablesin classVariableDeferredPConstraint
-
toStringRest
protected java.lang.String toStringRest()
- Specified by:
toStringRestin classBasePConstraint
-
getFunctionalDependencies
public java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context)
Description copied from interface:PConstraintA (preferably minimal) cover of known functional dependencies between variables.- Specified by:
getFunctionalDependenciesin interfacePConstraint- Overrides:
getFunctionalDependenciesin classBasePConstraint- Returns:
- non-trivial functional dependencies in the form of {variables} --> {variables}, where dependencies with the same lhs are unified.
-
-