[mercury-users] [petdr at miscrit.be: Report on the ICFP 2000 prog contest]

Thomas Conway conway at cs.mu.OZ.AU
Wed Sep 6 09:26:13 AEDT 2000


On Tue, Sep 05, 2000 at 08:48:19PM EST, Peter Ross wrote:
> The distrubuted nature of the entry and the lack of problems encountered
> due to the distrubution of team members is a feather in the cap of the
> Mercury language.  The strong type and mode system ensured that if an
> interface between distinct parts of the ray tracer changed, the spots
> which were impacted by the change were reported by the Mercury compiler,
> and could quickly be corrected.  It also meant that different team
> members could work on different solutions to the same problem, as long
> as both solutions agreed on a common interface, and the best one could
> be chosen.

It is instructive to note that one of the bugs that took the longest to
find was in the following code:

    inside_sphere(Point, Trans) :-
	Point = point_to_object_space(Trans, Point),
	mag2(Point) =< 1.0.

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!

-- 
 Thomas Conway              Unicode for terrorists: U+0001 300C
 <conway at cs.mu.oz.au>         "Tie his hands behind his back"
 Mercurian )O+  
--------------------------------------------------------------------------
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