Class SubPlan
java.lang.Object
tools.refinery.interpreter.matchers.planning.SubPlan
A plan representing a subset of (or possibly all the) constraints evaluated. A SubPlan instance is responsible for
representing a state of the plan; but after it is initialized it is expected be immutable
(exception: inferred constraints, see
inferConstraint(PConstraint)
).
A SubPlan is constructed by applying a POperation
on zero or more parent SubPlans.
Important maintained information:
- set of variables whose values are known when the runtime evaluation is at this stage,
- set of constraints that are known to hold true at this point.
Recommended to instantiate via a SubPlanFactory
or subclasses,
so that query planners can subclass SubPlan if needed.
-
Constructor Summary
ConstructorsConstructorDescriptionSubPlan
(PBody body, POperation operation, List<? extends SubPlan> parentPlans) A SubPlan is constructed by applying aPOperation
on zero or more parent SubPlans.SubPlan
(PBody body, POperation operation, SubPlan... parentPlans) A SubPlan is constructed by applying aPOperation
on zero or more parent SubPlans. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Variables which have been assigned a value; includes visible variables (seegetVisibleVariables()
) and additionally any variables hidden by a projection (seePProject
).All constraints that are known to hold at this pointThe closure of all type judgments of enforced constraints at this point.getBody()
The new constraints enforced at this stage of plan, that aren't yet enforced at parents (results are also included ingetAllEnforcedConstraints()
)Delta compared to first parent: variables that are visible here but were not visible at the first parent.Variables which are assigned a value at this point (results are also included ingetAllDeducedVariables()
)int
hashCode()
void
inferConstraint
(PConstraint constraint) Indicate that a given constraint was found to be automatically satisfied at this point without additional operations.toString()
-
Constructor Details
-
SubPlan
A SubPlan is constructed by applying aPOperation
on zero or more parent SubPlans. -
SubPlan
A SubPlan is constructed by applying aPOperation
on zero or more parent SubPlans.
-
-
Method Details
-
toString
-
toShortString
-
toLongString
-
getAllEnforcedConstraints
All constraints that are known to hold at this point -
getDeltaEnforcedConstraints
The new constraints enforced at this stage of plan, that aren't yet enforced at parents (results are also included ingetAllEnforcedConstraints()
) -
inferConstraint
Indicate that a given constraint was found to be automatically satisfied at this point without additional operations. (results are also included ingetDeltaEnforcedConstraints()
)Warning: not propagated automatically to child plans, so best to invoke before constructing further SubPlans.
-
getBody
-
getVisibleVariables
Variables which are assigned a value at this point (results are also included ingetAllDeducedVariables()
) -
getAllDeducedVariables
Variables which have been assigned a value; includes visible variables (seegetVisibleVariables()
) and additionally any variables hidden by a projection (seePProject
). -
getIntroducedVariables
Delta compared to first parent: variables that are visible here but were not visible at the first parent. -
getParentPlans
-
getOperation
-
getAllImpliedTypeJudgements
The closure of all type judgments of enforced constraints at this point.No subsumption applied.
-
hashCode
public int hashCode() -
equals
-