[mercury-users] Custom declarations and preprocessors.

Manuel Hermenegildo herme at clip.dia.fi.upm.es
Fri Apr 14 18:17:13 AEST 2000


 > > Anthony, except that 'comment' is used instead of 'doc'.  I think it
 > > would be nice if we managed to agree on a uniform format for this sort
 > > of thing.
 > 
 > I think this is a nice idea.  I'm not working on it directly, and it's a
 > spare time thing for Anthony (helps him write part of his thesis on
 > neural nets) but I'd prefer to keep it similar to existing systems if
 > possible.

Great! There is a paper on the lpdoc tool in last year's ICLP
Workshops:
http://www.clip.dia.fi.upm.es/clippubsbyyear/clippubsbyyear.html 
then click on "CLIP Group's Publications in 1999", "Publications in Workshops",
"A Documentation Generator for Logic Programming Systems". The system
itself can also be downloaded from our WWW site.

 > since I'm leaning at the moment at just writing code to allow user
 > nominated declarations to be ignored by the compiler.

You may want to look at how the ':- new_declaration(...)' nechanism
used by us. The basic idea is that you declare:

:- new_declaration(comment/2).     or
:- new_declaration(doc/2).     

and this allows you to write:

:- comment(p(X,Y),"X is a p of Y").

Assertions are also added using this technique.  These declarations
are ignored by the low-level compiler (but not by the lpdoc
autodocumenter, assertion checker, etc.).  (In case you want more info
on this it is described in other papers in the ICLP99 workshops,
stored in the same location as above).

Manuel

-- 

-----------------------------------------------------------------------------
herme at fi.upm.es                      | Manuel Hermenegildo                 
+34-91-336-7435 (Work)               | Facultad de Informatica, UPM
+34-91-352-4819 or 336-7412 (FAX)    | Universidad Politecnica de Madrid   
http://www.clip.dia.fi.upm.es/~herme | 28660-Boadilla del Monte, MADRID SPAIN
-----------------------------------------------------------------------------

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list