tuProlog unknow behavior
- by Josh Guzman
I'm using tuProlog to integrate Prolog with Java, to do so I'v been defined a .pl file wich contains this code:
go:-write('hello world!'),nl.
In my Java File at NetBeans i Have a Main Class that invokes this:
Prolog engine = new Prolog();
Theory theory = new Theory(new FileInputStream("facultad.pl"));
try {
engine.setTheory(theory);
} catch (InvalidTheoryException ex) {
}
SolveInfo solution = engine.solve("go.");
if (solution.isSuccess()) {
System.out.println(solution.getSolution());
}
This Code must returns 'hello world', but instead of that it answer 'go', any ideas about this erratic behavior ??