Paul Tarau schrieb:
> -cp ".:$HOME/bin/prolog.jar" prolog.kernel.Main $HOME/bin/prolog.jar $1 $2 $3
Thanks for your patience with me squab chick here.
I guess the . does it. Now something happens:
?- [test].
begin_compiling(to(mem),[test])
end_compiling(time(12,msec),[test])
yes
?- hi.
hello
yes
But qsort is still magically in the search path:
?- [qsort].
error in engine prolog.kernel.Machine prolog 0:ask()=>ip=34435,cell=2:
'!! Prolog_Error'('TypeException','invalid update attempt to:
<predmark/0,time/2>==>26802:(0)'')
begin_compiling(to(mem),[qsort])
Can I switch this off?
But the good thing is absolute paths now work also:
?- ['/Projects/[...]/benchmark/jinni.p'].
Exception in thread "main" java.lang.NullPointerException
at prolog.logic.HeapStack.pushTerm(HeapStack.java:124)
at prolog.logic.HeapStack.newVar(HeapStack.java:135)
at prolog.logic.LogicEngine.INIT_INTERP(LogicEngine.java:151)
at prolog.logic.LogicEngine.load_engine(LogicEngine.java:1779)
at prolog.kernel.Shell.send_query(Shell.java:80)
at prolog.kernel.Shell.shell_step(Shell.java:105)
at prolog.kernel.Shell.run(Shell.java:144)
at prolog.kernel.Main.main(Main.java:482)
But why the NullPointerException? jinni.p reads as follows:
uptime(X) :-
statistics(runtime, [X|_]).
gctime(0).
% [...]
Whats wrong with the above? I guess the problem is the
ending comment in the Prolog text. (Syntax Syntax
-> Ulrich do you have a test case?)
When I restart jinni, and don't consult my jinni.p, and
directly consult commonshort.p, I get the following:
?- ['/Projects/[...]/benchmark/commonshort.p'].
Undefined after :-, code[52520..52770] ->uptime/2
begin_compiling(to(mem),['/Projects/Jekejeke/Prototyping/headless/jekdev/demo/benchmark/commonshort.p'])
end_compiling(time(114,msec),['/Projects/Jekejeke/Prototyping/headless/jekdev/demo/benchmark/commonshort.p'])
yes
Is the "Undefined after :-, code[52520..52770] ->uptime/2" a
ignorable warning? Or does it indicate that uptime is missing?
How can I then compile mutually recursive predicates residing
in different files?
Bye