tentative checkpoint
[sbp.git] / src / edu / berkeley / sbp / Forest.java
index 9dabf60..bc31117 100644 (file)
@@ -71,7 +71,7 @@ public abstract class Forest<T> /*extends PrintableTree<Forest.MyBody<T>>*/
         public GraphViz.Node toGraphViz(GraphViz gv) {
             if (gv.hasNode(this)) return gv.createNode(this);
             GraphViz.Node n = gv.createNode(this);
-            n.label = StringUtil.escapify(headToString()==null?"":headToString(), "\r\n");
+            n.label = headToString()==null?"":headToString();
             n.directed = true;
             n.comment = reduction==null?null:reduction+"";
             edges(n);
@@ -159,6 +159,10 @@ public abstract class Forest<T> /*extends PrintableTree<Forest.MyBody<T>>*/
      *  viewed, it becomes immutable
      */
     static class Ref<T> extends Forest<T> {
+        public HashSet<GSS.Phase.Node> parents = new HashSet<GSS.Phase.Node>();
+        public boolean contains(Forest f) {
+            return hp.contains(f);
+        }
         public boolean ambiguous() {
             if (hp.size()==0) return false;
             if (hp.size()==1) return hp.iterator().next().ambiguous();