Class TypeConstraint
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.EnumerablePConstraint
-
- org.eclipse.viatra.query.runtime.matchers.psystem.KeyedEnumerablePConstraint<IInputKey>
-
- org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint
-
- All Implemented Interfaces:
ITypeConstraint,ITypeInfoProviderConstraint,PConstraint,PTraceable
public class TypeConstraint extends KeyedEnumerablePConstraint<IInputKey> implements ITypeConstraint
Represents an enumerable type constraint that asserts that values substituted for the given tuple of variables form a tuple that belongs to an enumerable extensional relation identified by anIInputKey.The InputKey must be enumerable!
-
-
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.KeyedEnumerablePConstraint
supplierKey
-
Fields inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.EnumerablePConstraint
variablesTuple
-
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 TypeConstraint(PBody pBody, Tuple variablesTuple, IInputKey inputKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoReplaceVariable(PVariable obsolete, PVariable replacement)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.protected java.lang.StringkeyToString()-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.KeyedEnumerablePConstraint
getSupplierKey, toStringRestRest
-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.EnumerablePConstraint
getDeducedVariables, getVariableInTuple, getVariablesTuple, toStringRest
-
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, getDeducedVariables, getMonotonousID, replaceVariable
-
-
-
-
Method Detail
-
keyToString
protected java.lang.String keyToString()
- Specified by:
keyToStringin classKeyedEnumerablePConstraint<IInputKey>
-
getEquivalentJudgement
public TypeJudgement getEquivalentJudgement()
- Specified by:
getEquivalentJudgementin interfaceITypeConstraint
-
getImpliedJudgements
public java.util.Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context)
Description copied from interface:ITypeInfoProviderConstraintReturns type information implied by this constraint.- Specified by:
getImpliedJudgementsin interfaceITypeInfoProviderConstraint
-
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.
-
doReplaceVariable
public void doReplaceVariable(PVariable obsolete, PVariable replacement)
- Overrides:
doReplaceVariablein classEnumerablePConstraint
-
-