/** * Initialize the choice point state. * * @param interpreter the parent interpreter whose state is to be preserved here, its arg stack * defines the parameters for the target goal */ @Override public void init(LPInterpreter interpreter) { super.init(interpreter); context = interpreter.getContext(); generator = interpreter.getEngine().generatorFor(goal); generator.addConsumer(this); resultIndex = 0; }
/** * Constructor. Initialize the triple match to preserve the current context of the given * LPInterpreter and search for the match defined by the current argument registers * * @param intepreter the interpreter instance whose env, trail and arg values are to be preserved */ public TopLevelTripleMatchFrame(LPInterpreter interpreter, TriplePattern goal) { init(interpreter); this.matchIterator = interpreter.getEngine().getInfGraph().findDataMatches(goal); this.goal = goal; }