how to add new stuff to Maxima



C Y wrote:

>--- Richard Fateman <fateman@cs.berkeley.edu> wrote:
>  
>
>>I have a draft of paper posted in
>>http://www.cs.berkeley.edu/~fateman/papers/addformat.pdf
>>
>>which may be of interest to people who have sought information
>>on what goes on inside macsyma/ maxima.  I am sure it
>>is lacking in many respects, and I invite comments
>>to try to improve it.
>>    
>>
>
>An interesting read.  I fear I don't know enough to make any
>intelligent comments, but it did start me thinking about a couple of
>points I would appreciate clarification on.
>
>1)  The implication seems to be that any added functionality one wants
>to put into Maxima requires that, for full integration, the
>implications of each relevant Maxima command on the new functionality
>must be considered and if necessary other extensions made.  (Indeed,
>apparently a fair bit of that sort of work is lacking even in features
>already present in the system.) I guess in some sense this is natural,
>since the mathematics themselves often seem to exhibit subtle issues
>even in "basic" examples, but it bodes ill for development.
>
Depends on what you mean by "added functionality".  If you add a "new 
representation"
then I think the answer is yes, you have to consider what each command 
might do, and whether
the default for "unknown" stuff is good enough.  Added functionality 
which fits in the standard
representation is not so problematical. E.g. adding the Lambert W 
function which would require
a handful of additions:

a. how to differentiate
b. how to evaluate in floating point
c. how to evaluate in bigfloat
d. maybe some integration formulas
e. some fact about the inverse  (for solve)
f. maybe some facts about taylor series
g. simplification at special arguments.
 
None of these requires changing existing programs, but only data, and 
new programs.
some other stuff might need changes, e.g.
simplification of  expressions around W;   e.g. exp(W(x)) would require 
changes
to exp simplifier.

>
>2)  To my mind the task of trying to add features and consider all
>relevant cases "by the seat of one's pants," so to speak, is guaranteed
>to produce unexpected issues, obscure bugs, and a headache.
>
I agree.

> Is there
>some system, ANY system, by which we can intelligently add features to
>Maxima in such a way that we know what areas have been addressed and
>what areas still need to be addressed?  If I understand correctly the
>only thing which would really serve is a database where the interaction
>of a new function/datatype with every function/datatype in the system
>is described as either a) known and handled, with a description of the
>behavior implimented b) deemed obviously irrelevant or c)
>indeterminant.  For example, such a system would document what the
>subst command would do with each data type on the system, and a new
>datatype being added to the database would "flag" a new issue - namely
>how subst should interact with it.  (It would "flag" a lot of others
>too - this is one example.) This would be huge, but probably there
>would be practical limits beyond which we wouldn't need to go.  I'm
>hoping there exists SOME level at which this can be modularized, but I
>don't know.  As a matter of development methodology there should really
>be SOME systematic way we know we are getting the job done "right".  Is
>this possible, or am I misunderstanding the issue?
>  
>
I think you are understanding the problem for new representations,  but 
this should not
happen very often.  Introduction of new functions is much simpler.  It 
is even simpler
if you just define away the function as, for example, if sinh were not 
there, you could
define sinh(x):=(exp(x)-exp(-x))/2 ,   or if all functions were 
immediately replaced by
their (truncated) taylor series. 
So not all is quite so desperate.

The point of the Axiom system is, at least in principle, to make use of 
declarative
knowledge about stuff like "polynomials" over "rings"  in which case you 
know that
to define such domains, you need to build upon the operations and 
representations
of specific rings, and all these operations and related axioms are 
listed.  So you will
in that sense get the job done right in an abstract mathematical sense.

The extent to which this can actually work has been an issue.  If all 
you get is "modern algebra"
but not analysis, then the result is insufficient for Macsyma, unless 
you do a lot of
faking.
If you are less ambitious and are interesting in (say) univariate 
polynomials over finite fields,
then you can be linguistically very clean, and I suspect you could even 
add new representations
in a fairly clean manner.

My feeling is that any of the "3M" CAS are too ambitious.

RJF

>
>		
>__________________________________
>Do you Yahoo!?
>New and Improved Yahoo! Mail - Send 10MB messages!
>http://promotions.yahoo.com/new_mail 
>  
>