[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] axiom names and lisp names
From: |
David MENTRE |
Subject: |
Re: [Axiom-developer] axiom names and lisp names |
Date: |
Thu, 24 Jul 2003 21:21:10 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
Hello Bill,
"Page, Bill" <address@hidden> writes:
> How do I translate from the axiom name of a variable
> to the lisp name?
As Tim told it in a previous email
(http://mail.gnu.org/archive/html/axiom-developer/2003-07/msg00094.html),
you should look at the produced common lisp during compilation in file
MODULE.lsp or MODULE.NRLIB/code.lsp do find defined symbols.
The only thing I can say (and that Tim told me) is that for category
three symbols are defined. More precisely, taking RNG (associative
rings, see catddef.spad) as example:
* The original SPAD source (in catdef.spad):
)abbrev category RNG Rng
Rng(): Category == Join(AbelianGroup,SemiGroup)
* It produces the following lisp code (in RNG.lsp):
(|/VERSIONCHECK| 2)
(SETQ |Rng;AL| (QUOTE NIL)) ;; <=== this is a cache
(DEFUN |Rng| NIL ;; <== this is a dummy function called to construct RNG
;; "methods"
(LET (#:G82722)
(COND
(|Rng;AL|) ;; <== either the functions exist
(T (SETQ |Rng;AL| (|Rng;|)))))) ;; <= or we call the real constructor
(DEFUN |Rng;| NIL ;; <== here is the real constructor for the category's
"methods"
(PROG (#1=#:G82720)
(RETURN
(PROG1
(LETT #1# (|Join| (|AbelianGroup|) (|SemiGroup|)) |Rng|)
(SETELT #1# 0 (QUOTE (|Rng|)))))))
(MAKEPROP (QUOTE |Rng|) (QUOTE NILADIC) T)
So, as a summary, for the RNG category, we have the |Rng;AL| cache, the
|Rng| caching constructor and the |Rng;| real constructor.
The final MAKEPROP should probably add the constructor in a more global
structure, but I haven't been able to find its definition.
Unfortunalty, a lot remains to discover and say about the way
constructors work.
Best regards and I hope it helps a little,
d.
--
address@hidden