/** Return a safe copy of the list of matched subgoals in this subderivation. */
 public List<Triple> getMatchList() {
   ArrayList<Triple> matchList = new ArrayList<>();
   for (TriplePattern matche : matches) {
     matchList.add(LPInterpreter.deref(matche));
   }
   return matchList;
 }
 /** Return the final instantiated goal given the current binding state. */
 public Triple getResult() {
   return new Triple(
       LPInterpreter.deref(argVars[0]),
       LPInterpreter.deref(argVars[1]),
       LPInterpreter.derefPossFunctor(argVars[2]));
 }