start of new file
[IRC.git] / Robust / src / Analysis / TaskStateAnalysis / EGTaskNode.java
index eccb83d1c893a3c142f8bd3f094ac86422c542f3..169e52a4ed0a8f3610fe967c809cbc4613d9a65c 100644 (file)
@@ -6,31 +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 int loopmarker=0;
-    private boolean tomention=true;
     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;
     }
@@ -61,24 +79,6 @@ public class EGTaskNode extends TaskNode {
        return uid;
     }
 
-    public void doSelfLoopMarking(){
-       loopmarker=1;
-    }
-
-    public void doLoopMarking(){
-       loopmarker=2;
-    }
-           
-    public boolean isSelfLoop(){
-       if (loopmarker==1) return true;
-       else return false;
-    }
-
-    public boolean isLoop(){
-       if (loopmarker==2) return true;
-       else return false;
-    }
-
     public boolean isMultipleParams(){
        return getTD()!=null&&getTD().numParameters()>1;
     }
@@ -93,12 +93,4 @@ public class EGTaskNode extends TaskNode {
     public FlagState getFS(){
        return fs;
     }
-
-    public void dontMention(){
-       tomention = false;
-    }
-
-    public boolean toMention(){
-       return tomention;
-    }
 }