Gabriel Dos Reis <[EMAIL PROTECTED]> writes:

> Martin Rubey <[EMAIL PROTECTED]> writes:

> If there is anything about Spad you think I can answer, then it would be good
> if it is recorded on open-axiom for reference in the future.

OK, best thing is to CC posts then, I guess.

> The only `favor' I ask in return is that anything useful or useless you come
> up with be published on open-axiom lists

I truly hope (and I think I always did) that at least open-axiom and fricas
stay close friends.

> | Martin Rubey <[EMAIL PROTECTED]> writes:
> | 
> | > That means: if I could
> | > 
> | > 1) find out in comp3 whether an operation is defined conditionally, and
> | > 2) whether we are compiling a category, and
> | > 3) find out how to get the right function name,
> | > 
> | > then I think the optimization would be easy to do.
> | > 
> | > Unfortunately, I do not know the answer to any of these.  Especially 3)
> | > seems to be tricky to me, since there might be several functions of the
> | > same name.  On the other hand, this problem exists also in the case of
> | > local functions.

> Testing for whether we are compiling a category is normally simple: test
> whether the target of the current constructor is $Category.  For example, see
> compDefine1 in src/interp/define.boot.

Great, very likely that solves (2).  I guess $insideCategoryIfTrue is the thing
to look at.

> Every (exported) function is characterized by its modemap (be sure you
> appreciate the differences between the two kinds of modemap).  So if you want
> to know the conditions that characterize a function, look at its modemap.

Well, that's only part of the story.  Here are some names:


;  minRowIndex x == mnRow
(DEFUN |MATRIX;minRowIndex;$I;1| (|x| $) 1) 

;  minColIndex x == mnCol
(DEFUN |MATRIX;minColIndex;$I;2| (|x| $) 1) 

;  swapRows_!(x,i1,i2) ==
(DEFUN |MATRIX;swapRows!;$2I$;3| (|x| |i1| |i2| $)

Thus, the name of an (exported) function is something like

CONSTRUCTORNAME;operationName;signature;index

where signature is a string created by somehow abbreviating the modemap (I
guess taking the first letter of the type of each argument, replacing several
consecutive identical letters by nL, and

index a running index.

But I have no idea at what point during compilation the names of the operations
are determined.  I hope it's before actually compiling them -- I'd like to be
able to get the name in comp3, but I cannot see it anywhere...

Any clues about question (1)?

Martin


-------------------------------------------------------------------------
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