Am Dienstag, 9. Juni 2009 schrieb Ralf Hemmecke:
> Dear Johannes,
>
> you have certainly looked at the implementation of = in Any. It says:
>
>       x = y      == (x.dm = y.dm) and EQ(x.ob, y.ob)$Lisp
>
> which I think is actually not what one wants. 

yes, but this None-business here does not illuminate what is really going on.


> One wants the equality
> semantics of the corresponding domain not EQ from Lisp.
>
> The representation is
>
>       Rep := Record(dm: SExpression, ob: None)
>
> So the actual domain that ob lives in is not really there.

the more it must return true, but I do not understand what really goes on

>
> Much better would be if Any looked somehow like Object (see chapter
> 21.10 of the pdf version of the Aldor User Guide).

yes, do not know whether the used  language features can be transfered to old 
compiler. My attempts with Type were not successful

>
> In general equality is rare. So maybe it should be something like
>
> x = y ==
>      not (x.dm = y.dm) => false
>      D := DOMAIN(x.dm)
>      if D has with (=: (%, %) -> Boolean)
>          then (x.ob pretend D) = (y.ob pretend D)
>          else false
>
> I have, however, no idea what the DOMAIN function actually is in fricas.

can someone give a hint here how to fix this code piece to substitute = in 
Any?


>
> It should transform the s-expression into a true fricas domain. Or maybe
> one should rather immediately put the original domain in the
> representation record, so "DOMAIN" would not be needed.
>
> My real suggestion is: try to avoid "Any". Can't you do without it?
> Maybe you copy Object from the Aldor User Guide.

I tried, but there are other difficulties, I would prefer to have a quick fix 
with Any, as I already wrote some code. 



>
> Ralf
>
> On 06/09/2009 10:05 AM, Johannes Grabmeier wrote:
> > I need Any for convenient use of different variable domains in a
> > database prototype. This, however, causes problems, as equality
> > semantics not transparent for me: Can anybody explain or/and give a way
> > around. E.g. counting all occurencies "A" (of type String realized as
> > Any) in a Table(Integer, Any) does not work, as the system considers
> > each occurency "A" as a new object.
> >
>
-- 
Mit freundlichen Grüßen 
Johannes Grabmeier

Prof. Dr. Johannes Grabmeier
Köckstr. 1, D-94469-Deggendorf

Tel.-pv. +49-(0)-991-2979-584, Tel.-mob. 0171-550-3789 
Tel.-d   +49-(0)-991-3615-141, Sekr. -154
Fax-p: +49-(0)-1803-5518-17745

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to