The lpdoc Documentation Generator

An Automatic Documentation Generator for (C)LP Systems
Edited by:
Manuel Hermenegildo
Jose F. Morales
REFERENCE MANUAL
The Ciao Documentation Series
https://ciao-lang.org/
Generated/Printed on: 2024/10/15
Technical Report CLIP 5/97.1-3.8
Version 3.8 (2024/4/1)


lpdoc is an automatic program documentation generator for (C)LP systems.

lpdoc generates a reference manual automatically from one or more source files for a logic program (including ISO-Prolog, Ciao, and other CLP systems). It is particularly useful for documenting library modules, for which it automatically generates a description of the module interface. However, lpdoc can also be used quite successfully to document full applications and to generate nicely formatted plain ascii ``readme'' files. A fundamental advantage of using lpdoc to document programs is that it is much easier to maintain a true correspondence between the program and its documentation, and to identify precisely to what version of the program a given printed manual corresponds.

The quality of the documentation generated can be greatly enhanced by including within the program text:

  • assertions (types, modes, etc. ...) for the predicates in the program, and

  • machine-readable comments (in the ``literate programming'' style).

The assertions and comments included in the source file need to be written using the Ciao system assertion language as well as in machine-readable comments with lpdoc''s markup and/or markdown. A simple compatibility library is available to make traditional (constraint) logic programming systems ignore these assertions and comments allowing normal treatment of programs documented in this way.

The documentation is currently generated directly in HTML or texinfo format. From the texinfo output, lpdoc also generates printed and on-line manuals in several other formats automatically (pdf, info, ascii, etc.), by calling publicly available tools. lpdoc can also generate 'man' pages (Unix man page format) as well as brief descriptions in html or emacs info formats suitable for inclusion in an on-line index of applications. In particular, lpdoc can create and maintain fully automatically WWW and info sites containing on-line versions of the documents it produces.

The lpdoc manual (and the Ciao system manuals) are generated by lpdoc.

lpdoc is distributed under the GNU general public license.

This documentation corresponds to version 3.8 (2024/4/1).

Parts of this manual