Go to the first, previous, next, last section, table of contents.


Multiple Argument Indexing

Author(s): Tom Howland (http://home.pacbell.net/tomjdnh/pd.html), derived from work by Anil Nair, F. Bueno (for the Ciao package).

Version: 1.10#6 (2004/8/7, 21:46:39 CEST)

Version of last change: 1.9#225 (2003/12/21, 20:20:39 CET)

This package is an extension of the idea of Prolog indexing, usually performed, in a limited way, on the first argument. This package provides more powerful indexing schemes. It lets you pick different arguments to index on, and provides for different combinations of arguments to index on. E.g., it will let you index on the first and third argument or the second and the third argument of a predicate.

Usage and interface (indexer)

Documentation on internals (indexer)

DECLARATION: index/1:

Usage: :- index(IndexSpecs).

REGTYPE: indexspecs/1:

An index specification is defined as follows:

indexspecs(Spec) :-
        indexspec(Spec).
indexspecs((Spec,Specs)) :-
        indexspec(Spec),
        indexspecs(Specs).
indexspec(Spec) :-
        Spec=..[_F|Args],
        list(Args,argspec).

Usage: indexspecs(IndexSpecs)

REGTYPE: argspec/1:

An argument hash specification is defined as follows:

argspec(+).
argspec(*).
argspec(i).
argspec(n).
argspec(?).

Usage: argspec(Spec)

PREDICATE: hash_term/2:

hash_term(Term, HashValue)

Provides an efficient way to calculate an integer HashValue for a ground Term.

Usage 1: hash_term(T, N)

Usage 2: hash_term(T, N)


Go to the first, previous, next, last section, table of contents.