Class BaseTypeSafeConstraint
- 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.BaseTypeSafeConstraint
-
- All Implemented Interfaces:
PConstraint,PTraceable
- Direct Known Subclasses:
ExpressionEvaluation
public abstract class BaseTypeSafeConstraint extends VariableDeferredPConstraint
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<PVariable>inputVariablesprotected PVariableoutputVariable-
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 BaseTypeSafeConstraint(PBody pBody, java.util.Set<PVariable> inputVariables, PVariable outputVariable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PVariablecheckTypeSafety(SubPlan plan, IQueryMetaContext context)Checks whether all type restrictions are already enforced on affected variables.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()PVariablegetOutputVariable()booleanisReadyAt(SubPlan plan, IQueryMetaContext context)Refine further if needed-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint
checkSanity, delete, getAffectedVariables, getBody, getFunctionalDependencies, getMonotonousID, getPSystem, replaceVariable, toString, toStringRest
-
-
-
-
Method Detail
-
getOutputVariable
public PVariable getOutputVariable()
-
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).
-
getDeferringVariables
public java.util.Set<PVariable> getDeferringVariables()
- Specified by:
getDeferringVariablesin classVariableDeferredPConstraint
-
isReadyAt
public boolean isReadyAt(SubPlan plan, IQueryMetaContext context)
Description copied from class:VariableDeferredPConstraintRefine further if needed- Overrides:
isReadyAtin classVariableDeferredPConstraint
-
checkTypeSafety
public PVariable checkTypeSafety(SubPlan plan, IQueryMetaContext context)
Checks whether all type restrictions are already enforced on affected variables.- Parameters:
plan-- Returns:
- a variable whose type safety is not enforced yet, or null if the plan is typesafe
-
doReplaceVariable
protected void doReplaceVariable(PVariable obsolete, PVariable replacement)
- Specified by:
doReplaceVariablein classBasePConstraint
-
-