this.body = body;
this.existentialVariables = existentialVariables;
}
+
+ public CHRRule(long location, CHRQuery head, CHRQuery body) {
+ this(location, head, body, null);
+ }
public void resolve(TranslationContext context) {
context.pushExistentialFrame();
Variable activeFact = new Variable("activeFact", constraint.factType);
QueryPlanningContext context = new QueryPlanningContext(compilationContext, existentialVariables);
- if(!head.createQueryPlan(context, new EVariable(activeFact), i))
+ if(!head.createQueryPlan(context, new EVariable(activeFact), i, initConstraint))
return;
body.createEnforcePlan(context, priority);
addPlan(new CHRSearchPlan(constraint, activeFact, context.getPlanOps()));
if(!hasLocalActiveLiteral) {
Variable activeFact = new Variable("activeFact", initConstraint.factType);
QueryPlanningContext context = new QueryPlanningContext(compilationContext, existentialVariables);
- if(!head.createQueryPlan(context, null, -1))
+ if(!head.createQueryPlan(context, new EVariable(activeFact), -1, initConstraint))
return;
body.createEnforcePlan(context, priority);
/*System.out.println(this);