[m-rev.] for review: list__sort_and_remove_equivs/3
Mark Brown
dougl at cs.mu.OZ.AU
Thu Sep 5 16:59:32 AEST 2002
On 05-Sep-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> Hi,
>
> This is for review by Fergus. I was motivated to make this change
> because of a bug I introduced (and then fixed) in the ICFP submission;
> I expected list__sort_and_remove_dups/3 to behave the way that
> list__sort_and_remove_equivs/3 now does.
>
> Cheers,
> Mark.
>
> Estimated hours taken: 0.5
> Branches: main
>
> library/list.m:
> Add list__sort_and_remove_equivs/3, which is the same as
> list__sort_and_remove_dups/3 except that we use the equivalence
> relation implied by the comparison predicate, instead of the usual
> equality.
>
> Clarify the existing comment on list__sort_and_remove_dups/3, to
> make it clear what its behaviour is.
>
> tests/hard_coded/Mmakefile:
> tests/hard_coded/sort_and_remove_dups.exp:
> tests/hard_coded/sort_and_remove_dups.m:
> A test case for list__sort_and_remove_{dups,equivs}/3.
>
Actually, I've just thought of a potential problem with this change. The
problem is that if list__sort is not stable, then the output of the new
predicate is not well defined (that is, there would be more than one
solution that fits the specification). Is list__sort meant to be stable?
Cheers,
Mark.
--------------------------------------------------------------------------
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