*** empty log message ***
authorbdemsky <bdemsky>
Fri, 28 Apr 2006 22:42:55 +0000 (22:42 +0000)
committerbdemsky <bdemsky>
Fri, 28 Apr 2006 22:42:55 +0000 (22:42 +0000)
Robust/src/IR/Tree/FlagEffect.java [new file with mode: 0644]
Robust/src/IR/Tree/FlagEffects.java [new file with mode: 0644]

diff --git a/Robust/src/IR/Tree/FlagEffect.java b/Robust/src/IR/Tree/FlagEffect.java
new file mode 100644 (file)
index 0000000..a468435
--- /dev/null
@@ -0,0 +1,33 @@
+package IR.Tree;
+
+import IR.*;
+
+public class FlagEffect {
+    FlagDescriptor flag;
+    boolean status;
+    String name;
+
+    public FlagEffect(String flag, boolean status) {
+       this.name=flag;
+       this.status=status;
+    }
+
+    public void setFlag(FlagDescriptor flag) {
+       this.flag=flag;
+    }
+
+    public FlagDescriptor getFlag() {
+       return flag;
+    }
+
+    public int kind() {
+       return Kind.FlagNode;
+    }
+
+    public String printNode(int indent) {
+       if (status)
+           return name;
+       else
+           return "!"+name;
+    }
+}
diff --git a/Robust/src/IR/Tree/FlagEffects.java b/Robust/src/IR/Tree/FlagEffects.java
new file mode 100644 (file)
index 0000000..de0f9bb
--- /dev/null
@@ -0,0 +1,28 @@
+package IR.Tree;
+
+import IR.*;
+
+public class FlagEffects {
+    Vector effects;
+    String name;
+
+    public FlagEffects(String name) {
+       this.name=name;
+       effects=new Vector();
+    }
+
+    public void addEffect(FlagEffect fe) {
+       effects.add(fe);
+    }
+
+    public String printNode(int indent) {
+       String st=name+"(";
+       for(int i=0;i<effects.size();i++) {
+           FlagEffect fe=(FlagEffect)effects.get(i);
+           st+=fe.printNode(0);
+           if ((i+1)!=effects.size())
+               st+=",";
+       }
+       return st+")";
+    }
+}