axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: Aldor and Axiom


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Re: Aldor and Axiom
Date: Wed, 15 Feb 2006 12:43:32 +0100
User-agent: Thunderbird 1.5 (X11/20051201)

Hi Martin,

If I knew where to hook libaldor into Axiom, I would already have done
so. But libaldor basically starts from zero and for Axiom the whole
construction of the domains and categories is still mystical to me.

In any case if SPAD should be translated to Aldor one has to start with some
domain or category.

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. ;-)

So you see, I still find it mystical. I simply don't know what is built into the compiler.

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. The interpreter needs something like OutputForm in order to print something reasonable on the screen. Is this type builtin?

Does somebody know of a cutpoint between SPAD compiler and the actual libraries?

Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]