+ public void check() { if (children.size()==0) destroy(); }
+ public void destroy() {
+ if (destroyed) return;
+ if (parent==null) return; // never destroy the "primordeal" result
+ destroyed = true;
+ parent.removeChild(this);
+ while(children.size() > 0)
+ for(Node n : children) {
+ removeChild(n);
+ n.removeResult(this);
+ break;
+ }
+ }
+
+ public Result(Forest f, Node parent, Pos reduction) {
+ this(f, parent, reduction, null);
+ }
+ public Result(Forest f, Node parent, Pos reduction, GSS.Phase target) {