// Path: src/stone/ast/ASTree.java
// public abstract class ASTree implements Iterable<ASTree> {
//     public abstract ASTree child(int i);
//     public abstract int numChildren();
//     public abstract Iterator<ASTree> children();
//     public abstract String location();
//     public Iterator<ASTree> iterator() { return children(); }
// }
// 
// Path: src/stone/ast/Fun.java
// public class Fun extends ASTList {
//     public Fun(List<ASTree> c) { super(c); }
//     public ParameterList parameters() { return (ParameterList)child(0); }
//     public BlockStmnt body() { return (BlockStmnt)child(1); }
//     public String toString() {
//         return "(fun " + parameters() + " " + body() + ")";
//     }
// }
// 
// Path: src/chap6/Environment.java
// public interface Environment {
//     void put(String name, Object value);
//     Object get(String name);
// }


import java.util.List;
import javassist.gluonj.*;
import stone.ast.ASTree;
import stone.ast.Fun;
import chap6.Environment;
package chap7;

@Require(FuncEvaluator.class)
@Reviser public class ClosureEvaluator {
    @Reviser public static class FunEx extends Fun {
// Path: src/stone/ast/ASTree.java
// public abstract class ASTree implements Iterable<ASTree> {
//     public abstract ASTree child(int i);
//     public abstract int numChildren();
//     public abstract Iterator<ASTree> children();
//     public abstract String location();
//     public Iterator<ASTree> iterator() { return children(); }
// }
// 
// Path: src/stone/ast/Fun.java
// public class Fun extends ASTList {
//     public Fun(List<ASTree> c) { super(c); }
//     public ParameterList parameters() { return (ParameterList)child(0); }
//     public BlockStmnt body() { return (BlockStmnt)child(1); }
//     public String toString() {
//         return "(fun " + parameters() + " " + body() + ")";
//     }
// }
// 
// Path: src/chap6/Environment.java
// public interface Environment {
//     void put(String name, Object value);
//     Object get(String name);
// }


// Path: src/chap7/ClosureEvaluator.java
import java.util.List;
import javassist.gluonj.*;
import stone.ast.ASTree;
import stone.ast.Fun;
import chap6.Environment;

package chap7;

@Require(FuncEvaluator.class)
@Reviser public class ClosureEvaluator {
    @Reviser public static class FunEx extends Fun {
        public FunEx(List<ASTree> c) { super(c); }