[m-dev.] Re: Mercury Tcl/Tk interface broken

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Aug 27 04:15:45 AEST 1999

On 27-Aug-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 26-Aug-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > The other is to modify simplication so that any sequence of primitive
> > unifications (i.e. any unification that cannot call a user-defined equality
> > predicate) followed by a fail are replaced by fail. This will allow the
> > existing code in simplification, which removes a disjunct if it consists
> > of only "fail", to kick in.
> simplify.m already contains a more general optimization: it replaces any
> code with determinism `failure' by fail, if that code cannot loop.
> For some reason that optimization is not working or not being called in
> this case.  I don't understand why not.  I'll investigate further.

The reason is just that predicates containing errors don't get optimized:
if a predicate contains errors, then unique_modes.m calls
module_info_remove_predid to prevent later stages from processing that

Now that I have changed unique modes so that it does not report an error
for this case, the code does get properly optimized.

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list