Fergus Henderson fjh at
Fri Mar 5 22:37:35 AEDT 1999

In mail to mercury at, Frederic Mesnard
<Frederic.Mesnard at> wrote:

> Dear Mercury Developers,
> 1) Do you SERIOUSLY  plan to implement
> some fair computation rules in Mercury ?
> (that point is not clear in the documentation)

We don't have any immediate plans in that direction.

However, if you can prove termination, then this will guarantee
fairness.  We do provide automated termination analysis to assist
in proving termination.

We also seriously plan to implement tabled evaluation
(in particular `pragma minimal_model' -- see the `tabled evaluation'
section in the Mercury language reference manual).
This ensures termination (and hence fairness) for
all programs that have the "bounded term-depth" property.

If anyone could demonstrate some applications that have
a serious practical need for a fair computation rule,
and for which neither of the techniques described above
would be satisfactory, then we'd certainly be happy to
reconsider this.

> 2) I seriously plan to teach Mercury
> to 3rd year students ;-). They know the basics
> of Prolog (with Sicstus). I'd like to show them
> (and to convince me ...) that one might
> develop and build robust softwares written with Mercury. 
> Do you have a document which
> could help me to teach the basics of Mercury ?
> (types, modes, determinism, modules, compilation,
> well-chosen examples ...). Ok, I know that you already
> wrote a good user's manual, etc. That's nice but 
> I need something simpler and lighter, to fill the gap ! 

Ralph Beckett has kindly written one.
See <>.
It's still under development, but the stuff there is there so far
is already very useful.  I'm sure Ralph would appreciated feedback.

Ralph, is it OK if we put a link to this up on the Mercury WWW page now?

> 3) What about clp(Bool) and clp(Q) libraries ?

That sounds like a good idea to me; please implement them! ;-)
There's two things that you need to use: one is `any' insts,
the other is the trailing interface.  The trailing interface
is carefully documented (see the language reference manual),
but unfortunately `any' insts are not yet documented.
However, the meaning of `any' insts should be fairly obvious,
I hope, and the mercury-extras distribution includes a couple of
detailed examples of the use of `any' insts -- the support for
clp(R) in extra/clpr and also the support for what we call Herbrand
constraints (Prolog-style variables) in extras/trailed_update/var.m.

Fergus Henderson <fjh at>  |  "I have always known that the pursuit
WWW: <>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.

More information about the users mailing list