Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Yap and indexing

2 views
Skip to first unread message

pineapp...@yahoo.com

unread,
Oct 2, 2008, 7:38:07 PM10/2/08
to
I'm currently performance-tuning a program for Yap. Is it possible to
get Yap to index on anything else but the first argument of a clause?
I've done some searching on the question, but haven't found a way to
do it so far. (I'm guessing the answer is "no.")

fodor...@gmail.com

unread,
Oct 3, 2008, 9:15:01 AM10/3/08
to

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

pineapp...@yahoo.com

unread,
Oct 3, 2008, 5:50:17 PM10/3/08
to
On Oct 3, 8:15 pm, "fodor.p...@gmail.com" <fodor.p...@gmail.com>
wrote:

> 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.

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?

bart demoen

unread,
Oct 3, 2008, 5:00:43 PM10/3/08
to


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

Chip Eastham

unread,
Oct 5, 2008, 12:29:16 PM10/5/08
to

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

pineapp...@yahoo.com

unread,
Oct 5, 2008, 10:44:33 PM10/5/08
to
On Oct 5, 11:29 pm, Chip Eastham <hardm...@gmail.com> wrote:
> Which version of YAP are you using?
>
> I think the topic Paul mentions is
> described under the heading "Internal
> Data Base" in its documentation.

Supposed to be the latest - 5.3.1 or something like that.

0 new messages