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


The Ciao library browser

Author(s): Angel Fernandez Pineda.

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

Version of last change: 1.7#21 (2000/9/26, 13:37:17 CEST)

librowser library provides a set of predicates wich enables the user to interactively find Ciao/Prolog libraries and/or any predicate exported by them.

This is a simple example:

?- apropos('*find*').
persdbrt_sql: dbfindall/4
persdbrtsql: dbfindall/4
conc_aggregates: findall/3
linda: rd_findall/3
vndict: find_name/4
internals: $find_file/8
aggregates: findall/4,findall/3

yes
?-

Librowser is specially usefull when using inside GNU Emacs, just place the cursor over a librowser response and press C-cTAB in order to get help on the related predicate. Refer to the "Using Ciao inside GNU Emacs" chapter for further information.

Usage and interface (librowser)

Documentation on exports (librowser)

PREDICATE: update/0:

This predicate will scan the Ciao system libraries for predicate definitions. This may be done once time before calling any other predicate at this library.

update/0 will also be automatically called (once) when calling any other predicate at librowser.

Usage:

PREDICATE: browse/2:

This predicate is fully reversible, and is provided to inspect concrete predicate specifications. For example:

?- browse(M,findall/A).

A = 3,
M = conc_aggregates ? ;

A = 4,
M = aggregates ? ;

A = 3,
M = aggregates ? ;

no
?-

Usage: browse(Module, Spec)

PREDICATE: where/1:

This predicate will print at the screen the module needed in order to import a given predicate specification. For example:

?- where(findall/A).
findall/3 exported at module conc_aggregates
findall/4 exported at module aggregates
findall/3 exported at module aggregates

yes
?-

Usage: where(Spec)

PREDICATE: describe/1:

This one is used to find out which predicates were exported by a given module. Very usefull when you know the library, but not the concrete predicate. For example:

?- describe(librowser).
Predicates at library librowser :

apropos/1
system_lib/1
describe/1
where/1
browse/2
update/0

yes
?-

Usage: describe(Module)

PREDICATE: system_lib/1:

It retrieves on backtracking all Ciao system libraries stored in the internal database. Certainly, those which were scanned at update/0 calling.

Usage: system_lib(Module)

PREDICATE: apropos/1:

This tool makes use of regular expresions in order to find predicate specifications. It is very usefull whether you can't remember the full name of a predicate. Regular expresions take the same format as described in library patterns. Example:

?- apropos('atom_*').

terms: atom_concat/2
concurrency: atom_lock_state/2
atomic_basic: atom_concat/3,atom_length/2,atom_codes/2
iso_byte_char: atom_chars/2

yes
?-

Usage: apropos(RegSpec)

Documentation on internals (librowser)

REGTYPE: apropos_spec/1:

Defined as:

apropos_spec(_1).
apropos_spec(Pattern/Arity) :-
        pattern(Pattern),
        int(Arity).

Usage: apropos_spec(S)


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