[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [fricas-devel] axlit.as and axextend.as
From: |
Peter Broadbery |
Subject: |
[Axiom-developer] Re: [fricas-devel] axlit.as and axextend.as |
Date: |
Mon, 23 Jun 2008 08:20:04 +0100 |
On Sun, Jun 22, 2008 at 10:29 PM, Ralf Hemmecke <address@hidden> wrote:
>
> To whoever knows about the history of the aldor-axiom connection,
>
> Important in the build of the aldor-axiom connection are the files
> axlit.as and axextend.as that can be found at
>
> https://svn.origo.ethz.ch/algebraist/trunk/aldor/lib/libax0/
>
> I roughly understand why they exist. What I don't understand is their
> actual contents. It seems clear to me that Literal and Generator have to
> be made available and that I should be able to use [...], i.e., the
> function "bracket" to construct lists. But what I don't understand is,
> for example, why
>
> Bit ==> Boolean;
> extend SingleInteger : with {
> ...
> =: (%, %) -> Bit;
> <: (%, %) -> Bit;
> } == add {
> Rep ==> SInt;
> asBool(x) ==> x pretend Boolean;
> ...
> import {
> ...
> SIntEQ: (SInt, SInt) -> Bool;
> SIntLT: (SInt, SInt) -> Bool;
> ...
> } from Builtin;
> ...
> (a: %) = (b: %): Bit == asBool(SIntEQ(rep a, rep b));
> (a: %) < (b: %): Bit == asBool(SIntLT(rep a, rep b));
> ...
> }
>
> appears in axextend.as. Axiom's SingleInteger already exports
> IntegerNumberSystem, which clearly should also contain = and <.
>
Quick answer - inlining - the definitions enable aldor to inline the
functions when they are used. If they were not available, the
generated code would have to call out to the axiom definitions.
Peter