(String[] args)
| 8 | |
| 9 | public class Db { |
| 10 | public static void main(String[] args) { |
| 11 | Term t = Term.textToTerm("consult('db.pl')"); |
| 12 | Query.hasSolution(t); |
| 13 | |
| 14 | Iterator<Map<String, Term>> solutionsIter = new Query("person(X, Y, Z)"); |
| 15 | while (solutionsIter.hasNext()) { |
| 16 | Map<String, Term> sol = solutionsIter.next(); |
| 17 | System.out.println("\t Solution found (now asserting to block?): " + sol.toString()); |
| 18 | Query.oneSolution(String.format("assertz(name_of_person(%s))", sol.get("X").toString())); |
| 19 | } |
| 20 | Query.hasSolution("listing(name_of_person/1)"); |
| 21 | } |
| 22 | } |
nothing calls this directly
no test coverage detected