axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Axiom/Aldor


From: Peter Broadbery
Subject: Re: [Axiom-developer] Axiom/Aldor
Date: Tue, 11 Jan 2005 20:40:36 +0000

On Tue, 2005-01-11 at 14:30 +0100, Martin Rubey wrote:
> Dear Peter,
> 
> this is just great stuff -- nearly... I had to try it out right away, but I
> experienced two problems.
> 
> the minor one is, that )co inside axiom still does not work:
> 
> (1) -> 
> (1) -> )co test.as
>    Compiling AXIOM source code from file 
>       /home/rubey/martin/Axiom/test.as using AXIOM-XL compiler and 
>       options 
> -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra
>       Use the system command )set compiler args to change these 
>       options.
>  
>    >> System error:
>    NIL is not of type STRING.


ln -s $ALDORROOT $AXIOM/compiler may help here.  fixing i-syscmd.boot to
produce a nice error would be nice, I guess.


> (1) -> 
> 
> Never mind.
> 
> Unfortunately, there is a more severe issue. I put the following simple domain
> in a file "test.as" and compiled it using 
> 
> aldor -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom test.as
> 
> without any problem. There is only the warning
> 
> #1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
> 
> but I suspect that this is of no importance.

Yep.



> 
> 
> -------------------------------------------------------------------------------
> #include "axiom.as"
> 
> Test: with { fact: PositiveInteger -> PositiveInteger }
>    == add  { fact(n: PositiveInteger): PositiveInteger == 
>               { n <= 1 => 1;
>                 res: PositiveInteger := 1;
>                 while n > 1 repeat {
>                   res := res * n;
>                   n := n-1; }
>                 res } }
> -------------------------------------------------------------------------------
> 
> After this I start axiom and load runtime and axextend. By the way axextend
> *is* in the distribution, it's only a little hidden... There is even more
> obscure stuff in theis directory, maybe it's of use to you!
> 

The .as file isn't in CVS (the file is compiled - don't be fooled by the
readable coding style)

> (1) -> )sh Test
>  Test  is a domain constructor
>  Abbreviation for Test is TEST 
>  This constructor is exposed in this frame.
>  Issue )edit test.as to see algebra source code for TEST 
> 
> ------------------------------- Operations --------------------------------
>  fact : PositiveInteger -> PositiveInteger
> 
> (1) -> fact(5)$Test
> 
>    (1)  120
>                                                         Type: PositiveInteger
> (2) -> fact(4)$Test
>  
>    >> System error:
>    #<vector 08cf4150> is not of type LIST.
> 

Fixed by the patch I send earlier (I hope)...


> By the way, could you explain what your patches are doing? It's just a mystery
> to me! I suspect that one needs some knowledge of Aldor internals?

The significant bit is removing an unbound variable from as.boot, the
rest is to fix the )co command (obviously not bullet proof), and the .ap
file generation.  

In terms of aldor internal knowledge, you don't need that much, the hard
work is on the axiom side. The trick is to load all the aldor runtime
env interpreted and see what breaks (this includes daase.lisp, as.clisp
& interop.clisp, plus the aldor .lsp files).  This stuff used to vaguely
work, so putting it back in shape can't be too bad.  


> 
> Thanks again, 
> 
> Martin
-- 
Peter Broadbery <address@hidden>




reply via email to

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