[mercury-users] Paper on Mercury from AI practitioner's standpoint

Ian MacLarty maclarty at cs.mu.OZ.AU
Thu Jan 13 12:41:45 AEDT 2005


On 13 Jan 2005, at 11:26, Gregory D. Weber wrote:

> I'm writing a paper which I hope to present to an AI conference this
> spring, describing my experiences with Mercury in reimplementing the
> machine learning program CN2.  The paper will have no new information
> for experts in programming languages; it is simply a practitioner's
> report on his first use of Mercury for serious application programming.
>
> I invite comments to help ensure that I do not misrepresent
> the language to potential users.  A draft is posted at
> http://mypage.iu.edu/~gdweber/papers/drafts/mercury.pdf.
>

Hi Gregory,

Just a comment on the section entitled "Debugging Problems".  How much 
of an atom or term is printed can be controlled.  For example if you 
are using the "pretty" (formally "raw_pretty") print format you can 
issue a command "set depth 100" to print the term down to a depth of 
100.  Also did you try to use the interactive term browser which allows 
you to browse a term like a directory structure?  In my experience 
these two features eliminate the need for inserting print statements in 
the Mercury code (except for rare cases where there is a bug in the 
actual compiler that only manifests itself when debugging is turned 
off).  These features have been available in the debugger for a while 
now.  Which version were you using?

Also did you you use state variable syntax when threading the IO state? 
  This makes things a lot easier and preserves purity.

Ian.

--------------------------------------------------------------------------
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