more changes
[IRC.git] / Robust / src / Analysis / TaskStateAnalysis / EGTaskNode.java
index e6c9ac32adaf4ec094ce87ac5c0853269a2df11a..169e52a4ed0a8f3610fe967c809cbc4613d9a65c 100644 (file)
@@ -6,29 +6,49 @@ import IR.Flat.*;
 import java.util.*;
 import Util.GraphNode;
 
-public class EGTaskNode extends TaskNode {
+public class EGTaskNode extends GraphNode {
     private boolean source=false;
     private FlagState fs;
     private FlagState postfs;
     private TaskDescriptor td;
     private int index;
+    private String name;
+    private int uid;
+    private static int nodeid;
 
     public EGTaskNode(String name, TaskDescriptor td, FlagState postfs){
        this(name, null, td, -1, postfs);
     }
 
     public EGTaskNode(String name, FlagState fs, TaskDescriptor td, int index, FlagState postfs){
-       super(name);
+       this.name=name;
+       this.uid=nodeid++;
        this.fs = fs;
        this.td = td;
        this.index=index;
        this.postfs=postfs;
     }
+
+    public String getTextLabel() {
+       return "Task "+getName()+"["+fs+"]->["+postfs+"]";
+    }
+
+    public String getName() {
+       return name;
+    }
+
+    public String getLabel() {
+       return "N"+uid;
+    }
     
     public int getIndex() {
        return index;
     }
 
+    public String toString() {
+       return getTextLabel();
+    }
+
     public FlagState getPostFS() {
        return postfs;
     }