Yap doesn't index on the first argument. It has a complex indexing
scheme called "Demand-Driven Indexing of Prolog Clauses". No indexing
directives are necessary.
Regards,
Paul Fodor
Then the documentation is entirely incorrect (I am using the latest
version and reading the latest documentation). It explicitly says
that Yap indexes on the first argument, and encourages one to
rearrange one's code to exploit this fact (group clauses with a non-
variable as the first argument together, etc).
Thanks for your information. Can anyone else confirm what this guy is
saying?
Yap's implementation goodies are usually ahead of their documentation.
As in this case. Fodor is right, but if you want the ultimate
confirmation, ask Vitor v s c @ d c c . f c . u p . p t
or even better: devise a test from which you could make a useful
conclusion, like writing append with the first two args interchanged and
using it in the nrev benchmark - tell us about your experience please.
Cheers
Bart Demoen
Which version of YAP are you using?
I think the topic Paul mentions is
described under the heading "Internal
Data Base" in its documentation.
Philosophically YAP seems to set store
by making optimization transparent to
the user (programmer). However their
documentation provides information on
how that internal data base is exposed
and opens the door to a programmer
making optimal use of its facilities.
HTH, chip
Supposed to be the latest - 5.3.1 or something like that.