[comp.lang.prolog] assert, retract + CProlog,BIM, and Quintus

news@laas.laas.fr (USENET News System) (01/08/90)

Just before the holidays, I posted a summary to this newsgroup
about some tests with assert/1, retract/1, etc. which I carried
out with three different prolog environments currently
available at LAAS: C-Prolog (version 1.5), BIM (version 2.2, 15-Jan-1988),
and Quintus (version 2.4.2, 1988).

Hedi Ezzouaoui at BIM (hedi@prlb.philips.be@sunbim.be)
was kind enough to send me some e-mail about my previous posting
and although I have no affiliation with BIM (nor with Quintus or anyone else
for that matter), some of his remarks are worth sharing with the Usenet.

First, Hedi notes that BIM has undergone two major updates (July 88,
March 89). Therefore, people with releases more recent than
15-Jan-1988 should experience 
better documentation, different runtime speeds, etc.

He also makes some comments about the BIM `compatibility' mode for
programs written in DEC-10 Edinburgh syntax.
Although I had no luck with the online `-Pc' option for starting prolog,
nor with putting the directive into the prolog init file,
the command `please(compatibility, on)' does work
when manually invoked from inside prolog.
Therefore, my comments about the compatibility switch were incorrect
(although 'nil' must still be used in place of '[]'.)

It's also true that programs may be interpreted under BIM
(in `debug' mode), not just compiled.
I will be adding tests with the interpreted mode
to my technical report.

As a final point of clarification, I should have mentioned that
compilation under BIM is a 2 step process.
The source code 'foo.pro' is first turned into intermediate
WAM style code 'foo.wic', and this then becomes native code.
Hedi Ezzouaoui informs me that as of July 88,
this intermediate code was portable among different Sun machines,
and as of September 89, among Sun and VAX machines.

--------------------------------------------------

Laurent Hascoet at INRIA Sophia-antipolis (llh@paprika.inria.fr) also
sent me e-mail with some comments about C-Prolog which I'd like to share:

> a) retractall does exist in C-prolog. Only it used to be called abolish.
>   I guess it would have been too simple for the people on mu-prolog to
>   use the same name!
> b) I can't understand why you need append in you collecting predicate.
>   Anyway, you'd better use the fast append with difference lists
>   (fast_append(dlist(A,TLA),dlist(TLA,TLB),dlist(A,TLB)).)
>   where a list, say [a,b] is replaced by dlist([a,b|TL],TL).
>   perhaps this would slightly change the time you get.


-------------------------------------------------

For those people waiting for my technical report, please be patient.
I have decided to add the test programs as appendices, add some more
tests with BIM in interpreted mode, and
make some changes to my conclusions based on this second posting.

It should have been clear from my previous posting that
I NEVER INTENDED TO MAKE DEFINITIVE COMPARISONS
using the most recent releases of the 3 prologs,
and MY TEST PROGRAMS WERE NOT MEANT TO BE BENCHMARKS in any public sense.
I am not responsible for the updates to the different Prolog
environments here at LAAS, and my tests were intended to simply
compare the releases available to me, and from one particular vantage point.
More importantly, I was trying to evaluate the penalty imposed
by assert/1, retract/1, etc. at runtime, and how much improvement
might be gained by their elimination, depending upon the particular
prolog used.

If you're in the market for a Prolog environment
and you're trying to choose among C-Prolog, Quintus, and BIM,
then you ought to be thinking about much more than my previous posting.
Indeed, there are lots of other Prologs around
such as SICStus, MU, Prolog III which deserve careful study !

And I certainly didn't intend to run down any of the Prologs.
At LAAS, all three are in use for three different projects
involving verification of formal systems.

My thanks to Hedi and to Laurent for their comments.