File: Mec:Count.Hlp	Author: R.A.O'Keefe	Updated: 8 September 82

#purpose.

	The COUNT program is a utility for counting the number of clauses
and predicates in a Prolog source file or program.  It has two commands:
?-	help.	%   starts you on the help system.
?-	count.	%   enters a loading loop like XREF.
?-	halt.	%   is the ordinary Prolog command.  ^Z will do as well.

	In response to 'count', the program will prompt 'Next file: '.
Your reply to this is a Dec-10 file name terminated by a carriage return,
or an empty line (just carriage return).

	If a file consults, reconsults, or compiles other files, Count
will inspect them and report on them too.  The counts of clauses and
predicates for a file include the counts for all its constituent files.
When you enter an empty line, the grand totals are printed and cleared,
and Count returns to command level.

#files.

Count expects to be given Dec-10 file names, but Prolog cannot accept
a PPN or path.  Thus what you type in response to the 'Next file: '
prompt is
	[Device :] FileName [. Extension]
where Device and FileName are identifiers of up to 6 characters, and
Extension is an identifier of up to 3 characters.  (The identifiers
will be truncated if necessary.)  If the extension is empty, .PL, or
.CPL it may be omitted.  The device may be omitted too.

Note that the file name should NOT have quotes around it or an extra
period at the end.  Typing ^Z will not work; you have to type just a
carriage return to stop the 'go' loop.

#data_base.

Count leaves a '$seen'(Pred,Arity) and a '$defn'(Pred,Arity,File) fact
in the data base for each predicate that it sees, unless such facts
are already known.  This is enough to support some pp/ixref features,
notably "from(File)" and pretty-printing things that aren't loaded.
They may be useful for other things too.  How's your imagination?

