InfGraph infgraph = makeInfGraph(rules, data, tabled);
ExtendedIterator<Triple> results = infgraph.find(query);
assertTrue(results.hasNext());
Triple result = results.next();
results.close();
Rule rule = rules.get(rulenumber);
List<Triple> matchList = Arrays.asList(matches);
Iterator<Derivation> derivations = infgraph.getDerivation(result);
assertTrue(derivations.hasNext());
RuleDerivation derivation = (RuleDerivation) derivations.next();
// PrintWriter pw = new PrintWriter(System.out);