Automatically Generated Information
Running PrologDoc in SICSTUS Mode
PrologDoc is a system that automatically generates HTML documention from Prolog programs.
HTML documentation can be automatically created from any Prolog program. In addition, by documenting your program according to the PrologDoc syntax, you can enable the PrologDoc documentation to be even more useful for you.
PrologDoc can be run on a list of files to generate not only documentation about each file, but also an index file specifying all the files documented.
Automatically Generated Information
When documenting a Prolog program <filename>, the following information is automatically inserted in PrologDoc documentation, without user intervention:
Files
that <filename> consults.
Using the PrologDoc syntax enables you to extensively document predicates that you define. A PrologDoc predicate comment is defined within /** ? */. It should be placed immediately before the predicate it is documenting. The PrologDoc syntax is similar to JavaDoc. The following tags can be used within a predicate comment:
@descr
- For giving a general description of the predicate
@form
- Is used to define the general form of the predicate
@constraints
- Used to define constraints on the parameters. After a @contraints tag
there can be a series of :
@unground
- to define a parameter that can not be ground
@unrestricted
- to define a parameter that is not restricted
Using PrologDoc you can give a general description to the file. This enables you to globally document the purpose of the prolog program defined within. A general file comment are defined within /*** ? */. It may be located anywhere in the file. The following tags can be used within a predicate comment:
@descr
- For giving a general description of the file
@author
- To specify the name of an author
@date
- To specify the date creation of the file
Note: Since the values of the tags are copied as is into the HTML documentation, HTML tags may be used within these values.
Example:
@date 1/1/00 */
Running PrologDoc in SICSTUS Mode
PrologDoc can create two different styles of HTML documentation. The documentation can either be informal, or can imitate the style of SICSTUS documentation. When the documentation mimics SICSTUS, the main difference is in how the constraints of the variables are displayed. The constraints are shown with punctuation marks (?,+,etc) next to the variables. (In regular mode the constraints are specified explicitly.)
To imitate SICSTUS documentation, run PrologDoc with the flag -s.
Logic
Programming Course at Hebrew University of Jerusalem