Some more analysis...

As I said before, without the .spad files the function 
|findConstructors| from ax.boot cannot do its job properly.
But what does it actually do?

There is no documentation and no specification, so we check ourselves.

fileConstructors name ==
    [INTERN(con,"BOOT") for con in SRCABBREVS SOURCEPATH STRING name]

It takes a name NNN which is the name of a .spad source file, but 
without the .spad extension and given as a lisp identifier.
That name is then converted to a string and SOURCEPATH (as defined in 
src/interp/util.lisp) looks in $AXIOM/../../src/algebra/NNN.spad for all
the lines starting with ")abb" and returns the long name that appears in 
this )app line in a lisp "intern" form, i.e.

If you execute

(1) -> )lisp (|fileConstructors| 'VSPACE)

you get

Value = (|VectorSpace|)

(One has to (load "somefile.lisp") first in order to trigger loading 
some boot code to make |fileConstructor| available.

Now how to get around the nonexistence of the .spad files?
A workaround can be as follows. I've checked and actually, in each .spad 
file, there is exactly *one* )abb line. Furthermore, the short name 
appearing in that line always agrees with the filename. So what 
|fileConstructors| actually does, is to translate the short name into 
the corresponding long name and returning that name as a list of length 1.

So currently, I could simply define

(defun my-file-constructors (shortname)
   (list (|unabbrev| shortname)))

and replace |fileConstructors| in src/aldor/gendepap.lsp by this new 
function.

Of course, there is one big drawback. If at some point somebody decides 
to put several constructors into one .spad file, things will not work 
anymore, because then some dependencies are not detected.

So what should I do?

Pros/cons for this additional function.

I am for it and I will test it tonight. But maybe there are things that 
I have overlooked.

Comments are very welcome.

Ralf

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