Ralf Hemmecke <[EMAIL PROTECTED]> writes:

> > Yes. But what exactly is mystical to you? Everything starts in catdef.spad,
> > and in fact the code is very easy to read, I find.
> 
> Let me quote the first few lines... (documentation stripped)
> 
> AbelianGroup(): Category == CancellationAbelianMonoid with
>        "-": % -> %
>        "-": (%,%) -> %
>        "*": (Integer,%) -> %
>      add
>        (x:% - y:%):% == x+(-y)
>        subtractIfCan(x:%,y:%):Union(%,"failed")==(x-y)::Union(%,"failed")
>        n:NonNegativeInteger * x:% == (n::Integer) * x
>        import RepeatedDoubling(%)
>        if not (% has Ring) then
>          n:Integer * x:% ==
>            zero? n => 0
>            n>0 => double(n pretend PositiveInteger,x)
>            double((-n) pretend PositiveInteger,-x)
> 
> Since there is no definition of "Integer" in that file, the compiler must
> know about that thing or it must look into integer.spad to find what Integer
> stands for. Yes, yes, I know, here the whole business of circular
> dependencies begins. I guess, finally, Integer will be an abelian group
> itself. ;-)

But as far as I know, for Aldor this situation was abstracted and there is now
a keyword for dealing with it, I believe it is "extend".

> Let us suppose the following scenario. I remove any file from src/algebra/
> and any corresponding Makefile entry. Then I start compiling Axiom. Would I
> end up with an Axiom framework that has no mathematical knowledge.
> 
> Probably not.

Well, I do think so, at least roughly. In fact, as far as I know, debugsys does
something similar.

Furthermore, Tim Daly analysed the circular dependencies to know in which
"layer" any given domain is. You can see this in the file lattice.pamphlet on
MathAction or in src/algebre/Makefile.

> The interpreter needs something like OutputForm in order to print something
> reasonable on the screen. Is this type builtin?

No, it is defined in outform.spad. And, as long as you don't have a coercion
function to OUTFORM, you don't need it anyway :-)

Without OUTFORM, you can print using the Lisp function "print".

Martin



_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to