@Override
    public State run(final String program, final State s) {
        Map<String, Integer> methodMap = Utils.getMethods(program);
        ClassWriter cw = new ClassWriter(0);
        FieldVisitor fv;
        MethodVisitor mv;

        cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, CLASS_NAME, null, "java/lang/Object", null);
        cw.visitSource(CLASS_NAME + ".java", null);
        fv = cw.visitField(ACC_PRIVATE + ACC_STATIC, "cell", "[B", null, null);
        fv.visitEnd();
        fv = cw.visitField(ACC_PRIVATE + ACC_STATIC, "p", "I", null, null);
        fv.visitEnd();
        fv = cw.visitField(ACC_PRIVATE + ACC_STATIC, "add", "B", null, null);
        fv.visitEnd();
        mv = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
        mv.visitCode();

        mv.visitLdcInsn(new Integer(65536));
        mv.visitIntInsn(NEWARRAY, T_BYTE);
        mv.visitFieldInsn(PUTSTATIC, CLASS_NAME, "cell", "[B");

        mv.visitInsn(ICONST_0);
        mv.visitFieldInsn(PUTSTATIC, CLASS_NAME, "p", "I");

        mv.visitInsn(ICONST_0);
        mv.visitFieldInsn(PUTSTATIC, CLASS_NAME, "add", "B");
        mv.visitInsn(RETURN);
        mv.visitMaxs(1, 0);
        mv.visitEnd();

        {
            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
            mv.visitCode();

            Label l0 = new Label();
            mv.visitLabel(l0);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
            mv.visitInsn(RETURN);

            Label l1 = new Label();
            mv.visitLabel(l1);
            mv.visitLocalVariable("this", "LHelloWorld;", null, l0, l1, 0);
            mv.visitMaxs(1, 1);
            mv.visitEnd();
        }

        mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "run", "()V", null, null);
        mv.visitCode();
        mv.visitFieldInsn(GETSTATIC, CLASS_NAME, "p", "I");
        mv.visitVarInsn(ISTORE, 0);

        convertMethod2BC(mv, methodMap, program, false);
        mv.visitVarInsn(ILOAD, 0);
        mv.visitFieldInsn(PUTSTATIC, CLASS_NAME, "p", "I");
        mv.visitInsn(RETURN);

        mv.visitMaxs(4, 1);
        mv.visitEnd();
        for (Map.Entry<String, Integer> entry : methodMap.entrySet()) {
            mv = cw.visitMethod(ACC_PRIVATE + ACC_STATIC, "meth" + entry.getValue(), "(I)I", null, null);
            mv.visitCode();

            convertMethod2BC(mv, methodMap, entry.getKey(), true);
            mv.visitVarInsn(ILOAD, 0);
            mv.visitInsn(IRETURN);

            mv.visitMaxs(4, 1);
            mv.visitEnd();
        }

        DynamicClassLoader loader = new DynamicClassLoader();
        Class<?> helloWorldClass = loader.define(CLASS_NAME, cw.toByteArray());
        try {
            helloWorldClass.getMethod("run").invoke(null);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (SecurityException e) {
            e.printStackTrace();
        }

        return null;
    }