I don't know whether the following has something to do with the problem
that libaxiom cannot currently properly compiled. But it is definitely
the file ax.boot which seems to be wrongly translated into ax.clisp by
bootsys.
The boot function
makeAxExportForm(filename, constructors) ==
$defaultFlag : local := false
$literals := []
-- Note that Tuple, Exit, Type are language defined idenifiers
-- in Aldor.
axForms :=
[modemapToAx(modemap) for cname in constructors |
(modemap:=GETDATABASE(cname,'CONSTRUCTORMODEMAP)) and
(not cname in '(Tuple Exit Type)) and
not isDefaultPackageName cname]
if $baseForms then
axForms := [:$baseForms, :axForms]
-- If the category has a default definition then $defaultFlag will be
true.
-- That is used to give dummy definitions for functions inside the
-- default body.
if $defaultFlag then
axForms :=
[['Foreign, ['Declare, 'dummyDefault, 'Exit], 'Lisp], :axForms]
axForms := APPEND(axDoLiterals(), axForms)
axForm := ['Sequence, _
['Import, [], 'AxiomLib], ['Import, [], 'Boolean], :axForms]
axForm
ends up being translated by bootsys into
=============================================bootsys
(DEFUN |makeAxExportForm| (|filename| |constructors|)
(PROG (|$defaultFlag| |axForm| |axForms| |modemap|)
(DECLARE (SPECIAL |$defaultFlag|))
(RETURN
(PROGN
(SETQ |$defaultFlag| NIL)
(SETQ |$literals| NIL)
(SETQ |axForms|
((LAMBDA (|bfVar#2| |bfVar#1| |cname|)
(LOOP
(COND
((OR (ATOM |bfVar#1|)
(PROGN (SETQ |cname| (CAR |bfVar#1|)) NIL))
(RETURN (NREVERSE |bfVar#2|)))
('T
(AND
(SETQ |modemap| (GETDATABASE |cname|
'CONSTRUCTORMODEMAP))
(|member| (NULL |cname|) '(|Tuple| |Exit| |Type|))
(NULL (|isDefaultPackageName| |cname|))
(SETQ |bfVar#2|
(CONS (|modemapToAx| |modemap|) |bfVar#2|)))))
(SETQ |bfVar#1| (CDR |bfVar#1|))))
NIL |constructors| NIL))
(COND (|$baseForms| (SETQ |axForms| (APPEND |$baseForms|
|axForms|))))
(COND
(|$defaultFlag|
(SETQ |axForms|
(CONS
(LIST '|Foreign| (LIST '|Declare| '|dummyDefault| '|Exit|)
'|Lisp|)
|axForms|))))
(SETQ |axForms| (APPEND (|axDoLiterals|) |axForms|))
(SETQ |axForm|
(CONS '|Sequence|
(CONS (LIST '|Import| NIL '|AxiomLib|)
(CONS (LIST '|Import| NIL '|Boolean|)
|axForms|))))
|axForm|))))
====================================end bootsys
and by depsys into
====================================depsys
(DEFUN |makeAxExportForm| (|filename| |constructors|)
(PROG (|$defaultFlag| #1=#:G627 |modemap| |axForms| |axForm|)
(DECLARE (SPECIAL |$defaultFlag|))
(RETURN
(SEQ
(PROGN
(SPADLET |$defaultFlag| NIL)
(SPADLET |$literals| NIL)
(SPADLET |axForms|
(PROGN
(SPADLET #1# NIL)
(DO ((#2=#:G628 |constructors| (CDR #2#))
(|cname| NIL))
((OR (ATOM #2#) (PROGN (SETQ |cname| (CAR #2#)) NIL))
(NREVERSE0 #1#))
(SEQ
(EXIT
(COND
((AND
(SPADLET |modemap|
(GETDATABASE |cname| 'CONSTRUCTORMODEMAP))
(NULL (|member| |cname| '(|Tuple| |Exit| |Type|)))
(NULL (|isDefaultPackageName| |cname|)))
(SETQ #1# (CONS (|modemapToAx| |modemap|)
#1#)))))))))
(COND
(|$baseForms| (SPADLET |axForms| (APPEND |$baseForms| |axForms|))))
(COND
(|$defaultFlag|
(SPADLET |axForms|
(CONS
(CONS '|Foreign|
(CONS
(CONS '|Declare|
(CONS '|dummyDefault| (CONS '|Exit| NIL)))
(CONS '|Lisp| NIL)))
|axForms|))))
(SPADLET |axForms| (APPEND (|axDoLiterals|) |axForms|))
(SPADLET |axForm|
(CONS '|Sequence|
(CONS (CONS '|Import| (CONS NIL (CONS '|AxiomLib|
NIL)))
(CONS
(CONS '|Import| (CONS NIL (CONS '|Boolean|
NIL)))
|axForms|))))
|axForm|)))))
==================================================end depsys
In particular the line
(not cname in '(Tuple Exit Type))
comes out from bootsys as
(|member| (NULL |cname|) '(|Tuple| |Exit| |Type|))
and from depsys as
(NULL (|member| |cname| '(|Tuple| |Exit| |Type|)))
. The bootsys output looks wrong to me. Obviously in bootsys "not" has a
stronger binding as in depsys.
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.