[mercury-users] query-mode?

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jul 12 18:17:00 AEST 2001


On 11-Jul-2001, Terrence Monroe Brannon <tmbranno at oracle.com> wrote:
> I know that Mercury is a fully-compiled language, but I was wondering
> if there were some sort of predicate that I could use to throw a
> compiled program into a query mode so that I could pose simple queries
> to a program.

Compile your program with `--debug' (e.g. GRADEFLAGS=--debug in your Mmakefile).
On x86 Linux you also need `MGNUCFLAGS=--pic-reg' and `MLFLAGS=--shared'.
Run your program with mdb (`mdb ./foo').
Then use the "query", "io_query", or "cc_query" command,
e.g. "query border".

Note that currently you can only call predicates that are exported
in the module's interface section.

For more information see the "Interactive queries" subsection
of the "Debugger Commands" section of the "Debugging" chapter
of the Mercury User's Guide.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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