JinnIde is the Jinni Prolog IDE Plugin for JEdit and it comes with
JinniDoc, which is its documentation system. A quite typical
example for it is the following taken from the JinniDoc source code itself:
/***
@descr This file creates the <font = red><i>
JinniDoc </i></red> documentation for
a list of files. It also creates an
index with a list of the files documented
and an alphabetized list of the predicates
documented.
This is the first of a couple of modules
that entirely make up JinniDoc. This work
has been started by taking PrologDoc by
Elisheva Bonchek and Sara Cohen as the
basis. Parts of them have been completely
rewritten and a lot had to be done to
adapt it for Jinni Prolog. This work is
being continued and it is expected that
only few parts, if any, of the original
code will remain.
@author Wolfgang Chico Toepfer
@date June, 2003
*/
Here you can see that, unlike JavaDoc, to describe a complete Jinni Prolog file and
not a part of it you need to open up the comment by using three stars instead
of two or one.
As can be seen from the special font choice applied for the word "JinniDoc",
the application of HTML is perfectly possible.
Finally, some typical JinniDoc documentation tags are used:
- @descr: to denote the description (of the purpose) of this fiile is now
expected
- @author: to denote the author of this file is now expected
- @date: to denote the date of this file is now expected
Note that the file description is expected by JinniDoc. Otherwise, JinniDoc
will fail with a "no".
Next every predicate may be documented as well. In this case one only needs
to open up a comment with two instead of three stars, for instance:
/**
@form analyze(FileName, FileConsults, LibConsults,
SideEffects,Details, General,
ModuleName)
@constraints
@ground FileName
@unrestricted FileConsults
@unrestricted LibConsults
@unrestricted SideEffects
@unrestricted Details
@unrestricted General
@unrestricted ModuleName
@descr True if
<ul>
<li> FileConsults are the files
consulted by FileName
<li> LibConsults are the libraries
consulted by FileName
<li> SideEffects are the side-effects
upon loading FileName
<li> Details are the information about
the predicates defined in FileName
(only those exported if FileName is
a module)
<li> General is general information about
FileName
<li> ModuleName is the name of the module
defined by FileName
</ul>
*/
Again, it can be seen how HTML is effectively used to describe the
predicate "analyze".
Next a couple of documentation tags are used to describe various aspects
other than the general purpose:
- @form: the form of the call. Here the way to call the predicate with all
its parameters is shown
- @constraints describes each variable and its expected value type which
is one of the following three types
- @ground: a Jinni Prolog atom is expected such as a number
- @unground: an unbound logical variable is expected
- @unrestricted: it may either be ground or unground
For futher examples consult the Jinni Prolog source files of JinniDoc or Loq4Jinni
which may both be found in JEdit's startup directory.