@Override
    public VertexProgram generateProgram(final Graph graph, final Memory memory) {
        final MapConfiguration base = new MapConfiguration(this.configuration);
        PureTraversal.storeState(base, ROOT_TRAVERSAL, TraversalHelper.getRootTraversal(this.getTraversal()).clone());
        base.setProperty(STEP_ID, this.getId());
        if (memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS))
            TraversalVertexProgram.storeHaltedTraversers(base, memory.get(TraversalVertexProgram.HALTED_TRAVERSERS));
        return VertexProgram.createVertexProgram(graph, base);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ProgramVertexProgramStep.java