[mercury-users] [petdr at miscrit.be: Report on the ICFP 2000 prog contest]
Tennessee
tjleeuw at students.cs.mu.oz.au
Thu Sep 7 10:56:35 AEDT 2000
Something strikes me. (ow) Usually in semidet code, it's just one section
that's semidet, while the rest is fine. I wonder if there's some way of
declaring not just semidet predicates, but semidet code blocks. Probably
not a very practical or nice way of doing things, though. Maybe better to
program around that sort of thing, by breaking the code into more
predicates, thus being stricter with the code that's not semidet.
Forgive my poor train of thought, it's early in the morning :)
-T
> > > Several people (fjh, dmo, conway, ...) all looked at the code and
> > > failed to notice the "variable numbering" bug - 'Point' was being
> > > used to represent the original point and the transformed point.
> > > The bug failed to trigger a warning because the predicate was semidet.
> > > Thanks to rejj who spotted the problem eventually!
> >
> > Which is why I think we should add a warning to the compiler that points
> > out implicit unifications in semidet code, because I have been bitten by
> > this `feature' before.
>
> I agree. Bart Demoen has argued this in the past -- that the compiler ought
> to issue warnings for calls to implied modes (or at least have an option to do
> so). Up until now I have not really been convinced by his arguments, since
> I had not found it to be much of a problem in practice. But now I'm convinced.
>
> --
> 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
> --------------------------------------------------------------------------
>
--------------------------------------------------------------------------
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