a(X):-b(X),c(X,Y),d(Y).
a(X,Cont):-b(X,c(X,Y,d(Y,Cont))).
a(13).
a(13,Cont):-true(Cont).
p(X,Y):-X,Y.
p(X,Y,Cont);-call(X,call(Y,Cont))).
You can now try out in BinProlog 3.30 your own binary programs by using
::-
instead of :-
so that the preprocessor will not touch
them2. Otherwise, from the outside, BinProlog
looks like any other Prolog.
Binarization allows a significant simplification of the Prolog engine, which can be seen as specialization of the WAM for the execution of Continuation Passing Binary Programs.
As a consequence, a very small emulator (about 60K on Solaris) that often fits completely in the cache of the processor, a more efficient new data representation and some low-level optimizations make BinProlog probably the fastest freely available C-emulated Prolog at this time (812 KLIPS on a Sparcstation 20-41).
This means 3-5 times faster than C-Prolog, 2-3 times faster than SWI-Prolog, 1.5-2 times faster than (X)SB-Prolog and close to C-emulated Sicstus 2.1.