Skip to content

Instantly share code, notes, and snippets.

@ghiden
Created October 28, 2010 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghiden/650437 to your computer and use it in GitHub Desktop.
Save ghiden/650437 to your computer and use it in GitHub Desktop.
A fix for the examples from JPL prolog java binding http://www.swi-prolog.org/packages/jpl/java_api/getting_started.html
Variable X = new Variable("X");
Query q4 =
new Query(
"descendent_of",
new Term[] {X,new Atom("ralf")}
);
java.util.Hashtable solution;
solution = q4.oneSolution();
System.out.println( "first solution of descendent_of(X, ralf)");
System.out.println( "X = " + solution.get("X"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment