// Path: lang/src/main/java/mumbler/truffle/node/builtin/BuiltinNode.java
// public static MumblerFunction createBuiltinFunction(
//         MumblerLanguage lang,
//         NodeFactory<? extends BuiltinNode> factory,
//         VirtualFrame outerFrame) {
//     int argumentCount = factory.getExecutionSignature().size();
//     MumblerNode[] argumentNodes = new MumblerNode[argumentCount];
//     for (int i=0; i<argumentCount; i++) {
//         argumentNodes[i] = new ReadArgumentNode(i);
//     }
//     BuiltinNode node = factory.createNode((Object) argumentNodes);
//     return new MumblerFunction(Truffle.getRuntime().createCallTarget(
//             new MumblerRootNode(lang, new MumblerNode[] {node},
//                     new FrameDescriptor())));
// }
// 
// Path: lang/src/main/java/mumbler/truffle/parser/Namespace.java
// public class Namespace {
//     public static final int LEVEL_GLOBAL = -1;
//     public static final int LEVEL_UNDEFINED = -2;
// 
//     /**
//      * The name for the namespace at the top level of a file.
//      */
//     public static final String TOP_NS = "<top>";
// 
//     /**
//      * The name of the global namespace that contains all predefined variables.
//      */
//     private static final String GLOBAL_NS = "<global>";
// 
//     private final String functionName;
//     private final Namespace parent;
//     private final FrameDescriptor frameDescriptor;
// 
//     public Namespace(FrameDescriptor frameDescriptor) {
//         this.functionName = GLOBAL_NS;
//         this.parent = null;
//         this.frameDescriptor = frameDescriptor;
//     }
// 
//     public Namespace(String name, Namespace parent) {
//         this.functionName = name;
//         this.parent = parent;
//         this.frameDescriptor = new FrameDescriptor();
//     }
// 
//     public String getFunctionName() {
//         return this.functionName;
//     }
// 
//     public Namespace getParent() {
//         return this.parent;
//     }
// 
//     public FrameDescriptor getFrameDescriptor() {
//         return this.frameDescriptor;
//     }
// 
//     public FrameSlot addIdentifier(String id) {
//         return this.frameDescriptor.addFrameSlot(id);
//     }
// 
//     public Pair<Integer, FrameSlot> getIdentifier(String id) {
//         int depth = 0;
//         Namespace current = this;
//         FrameSlot slot = current.frameDescriptor.findFrameSlot(id);
//         while (slot == null) {
//             depth++;
//             current = current.parent;
//             if (current == null) {
//                 return new Pair<>(LEVEL_UNDEFINED, null);
//             }
//             slot = current.frameDescriptor.findFrameSlot(id);
//         }
//         if (current.parent == null) {
//             return new Pair<>(LEVEL_GLOBAL, slot);
//         }
//         return new Pair<>(depth, slot);
//     }
// }


import static mumbler.truffle.node.builtin.BuiltinNode.createBuiltinFunction;
import mumbler.truffle.node.builtin.arithmetic.AddBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.DivBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.ModBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.MulBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.SubBuiltinNodeFactory;
import mumbler.truffle.node.builtin.io.NowBuiltinNodeFactory;
import mumbler.truffle.node.builtin.io.PrintlnBuiltinNodeFactory;
import mumbler.truffle.node.builtin.io.SleepBuiltinNodeFactory;
import mumbler.truffle.node.builtin.lang.ReadBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.CarBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.CdrBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.ConsBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.ListBuiltinNodeFactory;
import mumbler.truffle.node.builtin.relational.EqualBuiltinNodeFactory;
import mumbler.truffle.node.builtin.relational.GreaterThanBuiltinNodeFactory;
import mumbler.truffle.node.builtin.relational.LessThanBuiltinNodeFactory;
import mumbler.truffle.parser.Namespace;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.frame.FrameDescriptor;
import com.oracle.truffle.api.frame.MaterializedFrame;
import com.oracle.truffle.api.frame.VirtualFrame;
package mumbler.truffle;



public class MumblerContext {
    private final FrameDescriptor globalFrameDescriptor;
// Path: lang/src/main/java/mumbler/truffle/node/builtin/BuiltinNode.java
// public static MumblerFunction createBuiltinFunction(
//         MumblerLanguage lang,
//         NodeFactory<? extends BuiltinNode> factory,
//         VirtualFrame outerFrame) {
//     int argumentCount = factory.getExecutionSignature().size();
//     MumblerNode[] argumentNodes = new MumblerNode[argumentCount];
//     for (int i=0; i<argumentCount; i++) {
//         argumentNodes[i] = new ReadArgumentNode(i);
//     }
//     BuiltinNode node = factory.createNode((Object) argumentNodes);
//     return new MumblerFunction(Truffle.getRuntime().createCallTarget(
//             new MumblerRootNode(lang, new MumblerNode[] {node},
//                     new FrameDescriptor())));
// }
// 
// Path: lang/src/main/java/mumbler/truffle/parser/Namespace.java
// public class Namespace {
//     public static final int LEVEL_GLOBAL = -1;
//     public static final int LEVEL_UNDEFINED = -2;
// 
//     /**
//      * The name for the namespace at the top level of a file.
//      */
//     public static final String TOP_NS = "<top>";
// 
//     /**
//      * The name of the global namespace that contains all predefined variables.
//      */
//     private static final String GLOBAL_NS = "<global>";
// 
//     private final String functionName;
//     private final Namespace parent;
//     private final FrameDescriptor frameDescriptor;
// 
//     public Namespace(FrameDescriptor frameDescriptor) {
//         this.functionName = GLOBAL_NS;
//         this.parent = null;
//         this.frameDescriptor = frameDescriptor;
//     }
// 
//     public Namespace(String name, Namespace parent) {
//         this.functionName = name;
//         this.parent = parent;
//         this.frameDescriptor = new FrameDescriptor();
//     }
// 
//     public String getFunctionName() {
//         return this.functionName;
//     }
// 
//     public Namespace getParent() {
//         return this.parent;
//     }
// 
//     public FrameDescriptor getFrameDescriptor() {
//         return this.frameDescriptor;
//     }
// 
//     public FrameSlot addIdentifier(String id) {
//         return this.frameDescriptor.addFrameSlot(id);
//     }
// 
//     public Pair<Integer, FrameSlot> getIdentifier(String id) {
//         int depth = 0;
//         Namespace current = this;
//         FrameSlot slot = current.frameDescriptor.findFrameSlot(id);
//         while (slot == null) {
//             depth++;
//             current = current.parent;
//             if (current == null) {
//                 return new Pair<>(LEVEL_UNDEFINED, null);
//             }
//             slot = current.frameDescriptor.findFrameSlot(id);
//         }
//         if (current.parent == null) {
//             return new Pair<>(LEVEL_GLOBAL, slot);
//         }
//         return new Pair<>(depth, slot);
//     }
// }


// Path: lang/src/main/java/mumbler/truffle/MumblerContext.java
import static mumbler.truffle.node.builtin.BuiltinNode.createBuiltinFunction;
import mumbler.truffle.node.builtin.arithmetic.AddBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.DivBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.ModBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.MulBuiltinNodeFactory;
import mumbler.truffle.node.builtin.arithmetic.SubBuiltinNodeFactory;
import mumbler.truffle.node.builtin.io.NowBuiltinNodeFactory;
import mumbler.truffle.node.builtin.io.PrintlnBuiltinNodeFactory;
import mumbler.truffle.node.builtin.io.SleepBuiltinNodeFactory;
import mumbler.truffle.node.builtin.lang.ReadBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.CarBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.CdrBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.ConsBuiltinNodeFactory;
import mumbler.truffle.node.builtin.list.ListBuiltinNodeFactory;
import mumbler.truffle.node.builtin.relational.EqualBuiltinNodeFactory;
import mumbler.truffle.node.builtin.relational.GreaterThanBuiltinNodeFactory;
import mumbler.truffle.node.builtin.relational.LessThanBuiltinNodeFactory;
import mumbler.truffle.parser.Namespace;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.frame.FrameDescriptor;
import com.oracle.truffle.api.frame.MaterializedFrame;
import com.oracle.truffle.api.frame.VirtualFrame;

package mumbler.truffle;



public class MumblerContext {
    private final FrameDescriptor globalFrameDescriptor;
    private final Namespace globalNamespace;