1 package org.simantics.scl.compiler.elaboration.chr.planning;
3 public abstract class PrePlanItem {
7 * 1 = functional calculation
8 * 2 = almost completely bound relation
9 * 3 = completely inbound relation
11 public double primaryPriority = Double.POSITIVE_INFINITY;
12 public int secondaryPriority;
15 public PrePlanItem(int secondaryPriority) {
16 this.secondaryPriority = secondaryPriority;
19 public int compare(PrePlanItem other) {
20 if(primaryPriority < other.primaryPriority)
22 if(primaryPriority > other.primaryPriority)
24 return Integer.compare(secondaryPriority, other.secondaryPriority);
27 public abstract void initializeListeners(QueryPlanningContext context);
28 public abstract void variableSolved(QueryPlanningContext context, int variableId);
30 public abstract void generate(QueryPlanningContext context);