Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
You can't start the PlDoc server from the PDT console!
swipl
doc_collect(true).
doc_server(8711).
enter: consult('<full path to prolog file>')
.
The easiest way: Consult the file in Eclipse and copy-paste the entire consult
line as shown at the top of the following snapshot.
And paste it into the terminal window.
(Ok, this second screenshot is fake, but you know what we mean )
doc_browser.
This does the same.Because it is more familiar, we should use the JavaDoc style. So the example from the SWI site should be for us:
/** length(+List:list, -Length:int) is det. * length(?List:list, -Length:int) is nondet. * length(?List:list, +Length:int) is det. * * True if List is a list of length Length. * * @compat iso */
Expected number of bindings:
determinism | number of bindings | choice-point after last success |
---|---|---|
det | 1 | Forbidden |
semidet | 0..1 | Forbidden |
nondet | 0..* | Allowed |
multi | 1..* | Allowed |
During the first presentation of PlDoc we got “Internal Server” errors telling us, things like “Undefined procedure: $pldoc/4”. It looks like the developer forgot to declare the predicates that he dynamically generates as dynamic. You can easily repair that. Just enter in your console:
dynamic '$pldoc'/4. dynamic '$mode'/2.
To summarize, here is what you should enter into your console:
doc_collect(true). doc_server(8711). doc_browser. dynamic '$pldoc'/4, '$mode'/2.
Don't forget to consult your prolog code afterwards.