[mercury-users] Unique mode problem: what's the difference?

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 19 22:25:54 AEDT 1999


I'm about to commit a fix for this problem.
As usual, this fix will be included in our release-of-the-day
releases, and it will also be included in release 0.9.
Thanks for reporting the problem, Ralph.

On 17-Nov-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 16-Nov-1999, Ralph Becket <rbeck at microsoft.com> wrote:
> > I have a bug in some code using mostly unique modes (it's a term
> > unifier.)  I'm not entirely sure what is going wrong...
> > unify(T1, free, _T2, functor(Name2, Arity2, Args2)) -->
> >         \+ occurs(T1, Args2),
> >         tr_store__set_mutvar(T1, functor(Name2, Arity2, Args2)).
> > 
> > I get the following error report
> ...
> > logic.m:077: In clause for `unify(in, in, in, in, mdi, muo)':
> > logic.m:077:   in argument 3 of call to predicate `logic:occurs/4':
> > logic.m:077:   unique-mode error: the called procedure would clobber
> > logic.m:077:   its argument, but variable `DCG_0' is still live.
> 
> At first glance, that one looks like a bug in the compiler's
> mode analysis of mostly-unique modes.  The compiler is being
> overly conservative in its analysis.
...

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