[Aldor-l] [fricas-devel] Re: baselist declarations

Ralf Hemmecke ralf at hemmecke.de
Tue Jun 24 04:23:01 EDT 2008


Hi Peter,

Waldek, there is also a LISP question at the bottom that maybe you could 
also answer.

On 06/24/2008 09:28 AM, Peter Broadbery wrote:
> On Tue, Jun 24, 2008 at 12:45 AM, Ralf Hemmecke <ralf at hemmecke.de> wrote:
>> Dear Peter,
>>
>> axlit and axextend say something like
>>
>> extend Symbol : with {string: Literal -> %;} == add {
>>    string(l: Literal) : % == string(l)$Str::%;
>> }
>>
>> For that to compile I would think that a domain with name "Symbol" must
>> exist.

> It does - it is supplied by axiom (remember that these files are
> compiled with -Wname=axiom which implies that
> axiom will create type objects when they are imported.

So, the compilation works but actually moves some stuff to runtime.
Do I understand correctly that -Wname=axiom is translated into code that 
loads domains from axiom. Where is this name "axiom" reflected inside 
FriCAS?

OK, let's take Integer then.

For libaxiom.al we have first

export Integer: with;

and then

extend Integer : with {
   ...
   1: %;
   0: %;
   ...
} == add {
   Rep ==> BInt;
   import from Machine;
   import {
     ...
     BInt1: () -> BInt;
     BInt0: () -> BInt;
     ...
   } from Builtin;
   ...
   1: % == per BInt1();
   0: % == per BInt0();
   ...
}

Suppose now I write another Aldor domain AAA that uses Integer.
According to what you say, whenever I will load AAA in an Axiom session, 
it will automatically load Integer and thus any open function calls will 
be resolved at runtime. Right?

Clearly, inside Axiom, the 1 constant is only available through some 
SPAD compiler or interpreter magic from the signature

   1: constant ->  %

but not from

   1: %

as given in axextend.as.

That BInt0() is indeed connected to Axiom, is done by foam_l.lsp, right?

https://svn.origo.ethz.ch/algebraist/trunk/aldor/aldor/lib/libfoam/foam_l.lsp

But when does that come in? You have no reference to it in srcaldor3 and 
only

#
# .lsp -> .o
#

ALL_DIRS += $(OBJ)/$(SYS)/aldor/build

$(ALL_LISP_O_TARGETS): %.$(O): $(OBJ)/$(SYS)/aldor/build/.dir
	echo LSP->O: $(notdir $@)
	@echo '(progn (load "$(OBJ)/$(SYS)/interp/foam_l.o") (compile-file 
"$(filter %.lsp,$^)" :output-file "$@") (${BYE}))' | ${DEPSYS} > 
$(OBJ)/$(SYS)/aldor/build/$(notdir $@).log ;
	@if test -f $@; then echo "Built $(notdir $@)" ; else cat 
$(OBJ)/$(SYS)/aldor/build/$(notdir $@).log; false; fi

in srcaldor2.

But which foam_l should I take? The one from above or
http://fricas.svn.sourceforge.net/viewvc/fricas/trunk/src/interp/foam_l.lisp?view=markup

They do not differ much, but since I have only a vague knowledge of 
lisp, I'd highly appreciate any hints of what foam_l to take.

Thank you in advance
Ralf



More information about the Aldor-l mailing list