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>
inputVariables
protected PVariable
outputVariable
-
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 PVariable
checkTypeSafety(SubPlan plan, IQueryMetaContext context)
Checks whether all type restrictions are already enforced on affected variables.protected void
doReplaceVariable(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()
PVariable
getOutputVariable()
boolean
isReadyAt(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:PConstraint
The 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:
getDeferringVariables
in classVariableDeferredPConstraint
-
isReadyAt
public boolean isReadyAt(SubPlan plan, IQueryMetaContext context)
Description copied from class:VariableDeferredPConstraint
Refine further if needed- Overrides:
isReadyAt
in 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:
doReplaceVariable
in classBasePConstraint
-
-