-package org.simantics.scl.compiler.elaboration.chr.planning;\r
-\r
-public abstract class PrePlanItem {\r
- int queuePos;\r
- /* Primary priorities:\r
- * 0 = check\r
- * 1 = functional calculation\r
- * 2 = almost completely bound relation\r
- * 3 = completely inbound relation\r
- */\r
- public double primaryPriority = Double.POSITIVE_INFINITY;\r
- public int secondaryPriority;\r
- public long location;\r
- \r
- public PrePlanItem(int secondaryPriority) {\r
- this.secondaryPriority = secondaryPriority;\r
- }\r
-\r
- public int compare(PrePlanItem other) {\r
- if(primaryPriority < other.primaryPriority)\r
- return -1;\r
- if(primaryPriority > other.primaryPriority)\r
- return 1;\r
- return Integer.compare(secondaryPriority, other.secondaryPriority); \r
- }\r
-\r
- public abstract void initializeListeners(QueryPlanningContext context);\r
- public abstract void variableSolved(QueryPlanningContext context, int variableId);\r
-\r
- public abstract void generate(QueryPlanningContext context);\r
-}\r
+package org.simantics.scl.compiler.elaboration.chr.planning;
+
+public abstract class PrePlanItem {
+ int queuePos;
+ /* Primary priorities:
+ * 0 = check
+ * 1 = functional calculation
+ * 2 = almost completely bound relation
+ * 3 = completely inbound relation
+ */
+ public double primaryPriority = Double.POSITIVE_INFINITY;
+ public int secondaryPriority;
+ public long location;
+
+ public PrePlanItem(int secondaryPriority) {
+ this.secondaryPriority = secondaryPriority;
+ }
+
+ public int compare(PrePlanItem other) {
+ if(primaryPriority < other.primaryPriority)
+ return -1;
+ if(primaryPriority > other.primaryPriority)
+ return 1;
+ return Integer.compare(secondaryPriority, other.secondaryPriority);
+ }
+
+ public abstract void initializeListeners(QueryPlanningContext context);
+ public abstract void variableSolved(QueryPlanningContext context, int variableId);
+
+ public abstract void generate(QueryPlanningContext context);
+}