axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] Data structure for object definition


From: Gabriel Dos Reis
Subject: Re: [Axiom-mail] Data structure for object definition
Date: 28 Sep 2006 16:45:39 +0200

root <address@hidden> writes:

| > | Types created at runtime can also be accessed.
| > | 
| > | What you'd need to do is define a package which exports a set
| > | of functions you'd like which give you the ability you need.
| > | Once these functions are defined we can certainly create the
| > | lisp functions which implement them.
| > 
| > So those functions need to be Lisp, instead of SPAD?
| > 
| > | Your package can then call
| > | these lisp functions at the spad level to let you do anything 
| > | you'd like.
| > 
| > OK.
| > 
| > | What functions do you need and why do you need them?
| > 
| > I need the functions for implementing Algorithmic Differentiation of
| > codes written in SPAD.
| 
| Ultimately any reflection mechanism needs to know the details
| of the underlying data structures and how information is represented.

Yes.

| How detailed this knowledge needs to be depends on what you want to know.
| 
| See FAQ #19 How can I get equations written on one line?
| It hay answer some of your questions.
| 
| More detailed information requires that you reach into lisp.
| Axiom does this all the time. For instance in outform.spad.pamphlet
| we see
| 
|         (a:$ = b:$):Boolean  == EQUAL(a, b)$Lisp
| 
| which means that we define the Spad "=" function to be the lisp EQUAL.

Indeed.

| The $Lisp package is always available so you can define any function
| you want in lisp and use it in spad.

After I failed to find its definition, I concluded that it was one of
those magical package, and I'm fine with that.

| I'd recomment that you define a spad package that exports all of
| the functions you'd like to have to do Algorithmic Differentiation.
| We can then work on creating lisp functions that access and format
| the underlying lisp data structures so you can implement the spad
| level functions. 

That sound good to me. 
I have little time today, but I'll moll over this and report back
(either me or one of the students).

| No one outside of the Algorithmic Differentiation package will know
| that it accesses lisp.

Definitely.


On a slightly related note, how many "old new worlds", are there in the
intepreter?  I've been reading the source codes, and each refers to
"old" something, "new" something, "Davenport's new world", etc.
Without proper documentation it is all confusing :-(

Thanks!

-- Gaby




reply via email to

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