listing/1

Writes the clauses for the given Predicate, in a form readable by humans

listing(predicate) -(i)

Compatibility: LPA Win-Prolog, most other Prologs.

There are several modes of operation for this predicate:

1) listing(Functor/Arity) -(i) writes the clauses for the given

Predicate, with the specified Functor and Arity.

2) listing(Functor) -(i) writes the clauses for the given Predicate with the Functor specified, all arities.

3)listing($) (with a dollar sign as an argument) produces a listing of all the "hidden system code" clauses, inside G.I.S. Prolog, including the DCG Grammar Parser source-code. This "hidden code" is always invoked internally (and invisibly to the user), before any other Goal is called. It is possible to change this "hidden code", by (careful) editing of the internal database file 'internal.cdb', which resides in the same directory as the executable G.I.S. Prolog file. However, you are advised not to tamper with this code, unless you know very well what you're doing!

Historical Remark:

This predicate was originally "list" inside the P.I.E. inference engine (which is also the basis for G.I.S. Prolog). However, most other Prologs use "listing" instead, and -furthermore- 'list/1' is a standard predicate doing something completely different, inside LPA Win-Prolog and in many other Prologs. For all these reasons, the original "list" predicate was replaced by "listing" in G.I.S. Prolog.