axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Set Any and SXHASH


From: Waldek Hebisch
Subject: Re: [Axiom-developer] Set Any and SXHASH
Date: Thu, 5 Apr 2007 19:04:23 +0200 (CEST)

Bill Page wrote:
> 
> If Set is implemented by sorting the linear order cannot be
> domain specific since there certainly are domains from which
> we might wish to form finite sets for which no "natural" order
> can be defined, e.g. the domain Any. But I think it is always
> possible to define some lexical ordering over the members of
> all domains For example, the Axiom interpreter contains the
> Lisp function LEXGREATERP in
> 
>   src/interp/ggreater.lisp.pamphlet
> 
> For the implementation of Set using sorting all that is required
> is that the ordering be constant within an Axiom session.
>

You need an order which is consistent with equality.  Since
equality is domain-specific you need also domian-specific
order.  I agree that we do not have one handy.  Producing
order is not very hard.  Producing "from outside" order which
agrees with equality seem to be expensive (I am affraid that
you need to store all domain elements in a hash table).
That is why I am saying about design bug.

> Yes, but that would require a complete re-design of Set -
> perhaps not a bad idea. Probably the current implementation
> could be considered a little lame, but I was just looking for
> a simple way to correct the existing bug. Axiom has other
> domains that already use hashing such as EqTable so it might
> be as easy as just choosing a different representation of the
> Set domain.
> 

I am affraid that a complete re-design is the only real fix
for design bugs.
 
-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]