fixed minor bugs
[cdsspec-compiler.git] / src / edu / uci / eecs / specCompiler / codeGenerator / SemanticsChecker.java
index ae53d3b39fb80d579cb30fad90a42d58bebe5a59..60732306a12f2768f44109f57d4e9d1b49b1470d 100644 (file)
@@ -100,6 +100,21 @@ public class SemanticsChecker {
        public HashMap<ConditionalInterface, HashSet<ConditionalInterface>> getHBConditions() {
                return this.hbConditions;
        }
+       
+       /**
+        * Check if the conditional interface is in the HB checking list
+        * @param condInterface
+        * @return
+        */
+       public boolean containsConditionalInterface(ConditionalInterface condInterface) {
+               if (hbConditions.containsKey(condInterface))
+                       return true;
+               for (ConditionalInterface key : hbConditions.keySet()) {
+                       if (hbConditions.get(key).contains(condInterface))
+                               return true;
+               }
+               return false;
+       }
 
        public String getOption(String key) {
                return options.get(key);