[m-rev.] for review: user defined equality and comparison on sets

Ian MacLarty maclarty at cs.mu.OZ.AU
Fri Apr 8 15:45:21 AEST 2005


On Fri, Apr 08, 2005 at 01:54:31PM +1000, Zoltan Somogyi wrote:
> For review by anyone.
> 
> For the main branch only.
> 
> Zoltan.
> 
> library/set_ordlist.m:
> library/set_unordlist.m:
> 	Convert these modules to use user-defined equality and comparison.
> 	This has become possible only recently with the introduction of
> 	promise_equivalent_solutions scopes.
> 
> 	For set_unordlist, the default syntactic definitions of unify and
> 	compare are semantically incorrect; the change to user-defined
> 	equality and comparison is therefore a bug fix, even though it leads
> 	to a slow down (since the lists must be sorted and duplicates removed
> 	before the lists can be compared).
> 
> 	For set_ordlist, the default syntactic definitions of unify and
> 	compare are semantically correct, so we use them to avoid unnecessary
> 	overhead.
> 
> tests/hardcoded/string_alignment_bug.m:
> 	This test used to depend on set_ordlist(T) being defined as equivalent
> 	to list(T), which is no longer the case. Change the test case to
> 	operate on lists directly.

This all looks fine.

Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list