[mercury-users] infinite recursion

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Sep 27 08:05:26 AEDT 2000


On 26-Sep-2000, Peter Moulder <pjm at bofh.asn.au> wrote:
> > On 06-Sep-2000, Michael Day <mcda at students.cs.mu.oz.au> wrote:
> > > 
> > > :- pred a.
> > > :- mode a is semidet.
> > > 
> > > a :- a.
> 
> Hmm, I thought that this used to be treated like a call to error/1?

Only if you use a `:- pragma loop_check(a/0).' declaration,
which enables the loop-checking form of tabling.

> I'm not convinced by the consistency argument; in general, mmc can't
> correctly determine the determinism of a predicate, but it still makes
> its best attempt.  I'm not saying that lots of effort should be
> expended to detect infinite recursion, but when it is detected, I
> think the compiler should try to make use of the information
> (depending on compiler flags), analagous to how intermodule
> optimizations can change the determinism calculated.

I think maybe you misunderstand how determinism analysis works.
Intermodule optimizations don't change how the determinism is
calculated for the purpose of checking determinism-correctness.
Whether or not your program contains a determinism error does
not depend on whether you enable intermodule optimization.

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