rename Node->StateNode
[sbp.git] / src / edu / berkeley / sbp / Reduction.java
index 5eb3f63..0266782 100644 (file)
@@ -9,9 +9,9 @@ final class Reduction implements Comparable<Reduction> {
     private Pos reduction;
     private GSS.Phase phase;
     private Forest forest;
-    private Node pred;
+    private StateNode pred;
     
-    public Reduction(Node pred, Pos reduction, Forest forest, GSS.Phase target) {
+    public Reduction(StateNode pred, Pos reduction, Forest forest, GSS.Phase target) {
         this.reduction = reduction;
         this.forest = forest;
         this.phase = target;
@@ -40,7 +40,10 @@ final class Reduction implements Comparable<Reduction> {
         return 1;
     }
 
-    public void perform() { new Result(forest, pred, reduction, phase); }
+    public void perform() {
+        if (reduction==null) return;
+        phase.newNodeFromReduction(forest, reduction, pred);
+    }
     public GSS.Phase predPhase() { return pred.phase(); }
     public Pos reduction() { return reduction; }
     public GSS.Phase targetPhase() { return phase; }