On Mon, Apr 7, 2008 at 11:07 PM, Bill Page <[EMAIL PROTECTED]> wrote:

>  Yes! That is the right idea but really what we need is for the SPAD
>  compiler to choose a reasonable signature for the '=' operation.
>  Probably everything would work-out (almost) ok if the built-in
>  'Mapping' domain exported an operation like this:
>
>   (f:(S,S)->S) = (g:(S,S)->S)):Boolean ==  EQ(f,g)$Lisp

Mapping(S,S,S) has that.

[...]
>  >  OTOH I am not sure if it is supposed to actually work --
>  >  equality of  functions is a tricky business.  One can
>  >  define reasonable equality for functions, but this
>  >  basically disables some optimizations.
>
>  I think that in principle one can simply compare the names of the
>  operations. But the complication is that the "names" of some
>  operations in SPAD are not fully determined until their first
>  application during run-time. There is a need to resolve calls to
>  'newGoGet' before comparing the names. One way to do this is simply to
>  apply the functions to some arguments at least once before doing the
>  comparison. E.g.
>
>   f(0,0)=(0+0)$S and (f = _+$S) => return 0$S
>
>  Here both 'f' and '+' are applied to a member of S before testing the 
> equality.

in my book, that is a bug.  One should be able to ask for
+$S @ Mapping(S,S,S) without tears.  One should be able to write code
that directly maps to direct expression of mathematical ideas without fears.
At least, when we are talking about languages for computational mathematics.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to