add OLCZero predicate
authoradam <adam@megacz.com>
Tue, 26 Aug 2008 10:03:13 +0000 (11:03 +0100)
committeradam <adam@megacz.com>
Tue, 26 Aug 2008 10:03:13 +0000 (11:03 +0100)
src/edu/berkeley/fleet/api/Instruction.java
src/edu/berkeley/fleet/api/Predicate.java

index 26191a2..5a8fd7a 100644 (file)
@@ -315,7 +315,7 @@ public abstract class Instruction {
             if (tokenOut)                       ret.append(path==null ? ", token" : ", notify " + path.getDestination().getDock());
             String s = ret.toString();
             s = s.equals("") ? "nop" : s.substring(2);
-            if (interruptible) s = "[i] " + s;
+            if (interruptible) s = "[T] " + s;
             return super.toString()+s+";";
         }
     }
index 5392807..b5c22b3 100644 (file)
@@ -2,7 +2,7 @@ package edu.berkeley.fleet.api;
 
 /** possible predicate field values */
 public enum Predicate {
-    Default, FlagA, NotFlagA, FlagB, NotFlagB, FlagC, NotFlagC, IgnoreOLC;
+    Default, FlagA, NotFlagA, FlagB, NotFlagB, FlagC, NotFlagC, IgnoreOLC, OLCZero;
     public String toString() {
         switch(this) {
             case Default:    return "";
@@ -12,7 +12,8 @@ public enum Predicate {
             case NotFlagA:   return "!a";
             case NotFlagB:   return "!b";
             case NotFlagC:   return "!c";
-            case IgnoreOLC:  return "+";
+            case IgnoreOLC:  return "*";
+            case OLCZero:    return "olc=0";
             default:         throw new Error("unknown predicate " + this);
         }
     }