build pruned graphs that encode conflict information...
authorbdemsky <bdemsky>
Fri, 1 Apr 2011 21:52:15 +0000 (21:52 +0000)
committerbdemsky <bdemsky>
Fri, 1 Apr 2011 21:52:15 +0000 (21:52 +0000)
double periphery nodes may contain conflicts...conflict effects are put in brackets...
edges that have conflicts are dashed

Robust/src/Analysis/Disjoint/SMFEState.java

index efbe690f7189dfb44e250787ece1477ce24ff082..ecbd4524658c795ac16605afad96d74e98ebeea8 100644 (file)
@@ -152,18 +152,22 @@ public class SMFEState {
   public String toStringDOT() {
     
     // first create the state as a node in DOT graph
-    String s = "  "+id+"[shape=box,label=\"";
-
-    if( effects.size() == 1 ) {
-      s += effects.iterator().next().toString();
+    String s = "  "+id+"[shape=box,";
+    if (conflicts.size()>0 ) {
+      s+="peripheries=2,";
+    }
+    s+="label=\"";
 
-    } else if( effects.size() > 1 ) {
+    if( effects.size() >= 1 ) {
 
       Iterator<Effect> eItr = effects.iterator();
       while( eItr.hasNext() ) {
         Effect e = eItr.next();
-        s += e.toString();
-
+       if (conflicts.contains(e)) {
+         s += "["+e.toString()+"]";
+       } else {
+         s += e.toString();
+       }
         if( eItr.hasNext() ) {
           s += "\\n";
         }
@@ -184,7 +188,10 @@ public class SMFEState {
 
         s += "\n  "+
           id+" -> "+state.id+
-          "[label=\""+e+"\"];";
+          "[label=\""+e+"\"";
+       if (conflicts.contains(e))
+         s+=",style=dashed";
+       s+="];";
       }
     }