]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/relations/SpecialCHRRelation.java
(refs #7375) Fixed implementation of collectEffects
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / relations / SpecialCHRRelation.java
index c5dbe3c4190b54cf7aff3c08101168a6b50626b5..8abf73b3eae2827c16efc30d17b302ccfcb243af 100644 (file)
@@ -6,11 +6,14 @@ import org.simantics.scl.compiler.types.TVar;
 import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.Types;
 
+import gnu.trove.set.hash.THashSet;
+
 public enum SpecialCHRRelation implements CHRRelation {    
-    EQUALS(A, A),
-    MEMBER(A, Types.list(A)),
-    CHECK(Types.BOOLEAN),
-    EXECUTE(Types.UNIT);
+    EQUALS(A, A), // only in head
+    ASSIGN(A, A), // only in body
+    MEMBER(A, Types.list(A)), // only in head
+    CHECK(Types.BOOLEAN), // only in head
+    EXECUTE(Types.UNIT); // only in body
     
     private final TVar[] typeVariables;
     private final Type[] parameterTypes;
@@ -33,4 +36,12 @@ public enum SpecialCHRRelation implements CHRRelation {
     public TPred[] getTypeConstraints() {
         return TPred.EMPTY_ARRAY;
     }
+
+    @Override
+    public void collectEnforceEffects(THashSet<Type> effects) {
+    }
+
+    @Override
+    public void collectQueryEffects(THashSet<Type> effects) {
+    }
 }