[m-dev.] compare representation
Ian MacLarty
maclarty at cs.mu.OZ.AU
Mon Aug 2 13:19:25 AEST 2004
On 2 Aug 2004, at 12:48, Fergus Henderson wrote:
> On 02-Aug-2004, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
>> Does anyone know if there is a way to determine if it's possible to do
>> compare_representation on an arbitrary object at runtime?
>
> AFAIK, there is not.
>
>> I am trying
>> to put univ objects into a version of a 234 tree that uses
>> compare_representation instead of normal compare and have noticed that
>> this doesn't work with arrays and some other types.
>
> IMHO the right fix here is to make compare_representation work with
> arrays.
>
There also seem to be other types that this is a problem with, for
example heap_ptr. The 234 tree is used as the knowledge base for the
declarative debugger and records predicate calls with all the argument
values and the user's answer to the debugger's question about that
call. Since such calls could have any types as arguments I'd prefer to
have a general way to tell if inserting those arguments into the
knowledge base would break it. I agree arrays need to have comp-rep
implemented, but there would still be other types for which
compare_representation wouldn't work.
Ian.
--
> Fergus Henderson | "I have always known that the
> pursuit
> | of excellence is a lethal habit"
> WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S.
> Garp.
> -----------------------------------------------------------------------
> ---
> mercury-developers mailing list
> Post messages to: mercury-developers at cs.mu.oz.au
> Administrative Queries: owner-mercury-developers at cs.mu.oz.au
> Subscriptions: mercury-developers-request at cs.mu.oz.au
> -----------------------------------------------------------------------
> ---
>
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list