login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Submitted by : (unknown) at: 2007-11-17T22:10:40-08:00 (14 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

The following Aldor construct does not yet work in Axiom.

This is in fact the reason why I would love to have Aldor working. I did not expect it to work, and it does not, but it works almost. The code is as follows:

#include "axiom"
Test: with { f: (n: PositiveInteger) -> PrimeField(n) } == add { f(n: PositiveInteger): PrimeField(n) == 10::Integer::PrimeField(n) }
   Compiling FriCAS source code from file 
      using AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
      Use the system command )set compiler args to change these 
#1 (Warning) Could not use archive file `libaxiom.al'.
#2 (Warning) Could not use archive file `libaxiom.al'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 4: 
import from AxiomLib;
[L4 C13] #3 (Error) No meaning for identifier `AxiomLib'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 15: import { true: %, false: % } from Boolean; ..................................^ [L15 C35] #4 (Error) No meaning for identifier `Boolean'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 17: string: Literal -> %; ........................^.......^ [L17 C25] #5 (Error) No meaning for identifier `Literal'. [L17 C33] #6 (Error) There are no suitable meanings for the operator `->'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 18: } from String; .......^ [L18 C8] #8 (Error) No meaning for identifier `String'.
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/4460571600609964226-25px001.as", line 3: Test: with { f: (n: PositiveInteger) -> PrimeField(n) } ....................^................^..^ [L3 C21] #9 (Error) No meaning for identifier `PositiveInteger'. [L3 C38] #11 (Error) There are no suitable meanings for the operator `->'. [L3 C41] #10 (Error) There are no suitable meanings for the operator `PrimeField'. [L3 C41] #13 (Fatal Error) Too many errors (use `-M emax=n' or `-M no-emax' to change the limit).
The )library system command was not called after compilation.

Note that such a construction - the resulting domain depending on the function parameter - is currently illegal in Axiom. In Aldor it is fine.

I compiled it with Aldor as usual, and then loaded it into Axiom. As signature I got the slightly unusual:

)di op f
f is not a known function. FriCAS will try to list its functions which contain f in their names. This is the same output you would get by issuing )what operations f
There are possibly a great many operation names containing the substring f . Please confirm your request to have these listed by typing y or yes and then pressing Enter : Since you did not respond with y or yes the list of operation names containing f will not be displayed.

and trying it out I obtained: Axiom output parse error!

which is roughly what I expected. However, to my great surprise, if you turn on the debugger (beforehand. You always have to start a fresh axiom because of the error I told you about in my previous message) with:

  )lisp (setq |$monitorNewWorld| t)

and thus trace:


the final bit reads:

  protected-symbol-warn called with (NIL)..IntegerMod 1783 wants
   positiveRemainder : (%,%) -> % from  Integer
  ---->Integer----> searching op table for:
   positiveRemainder : (%,%) -> % from  Integer
  <----#<compiled-function |INT;positiveRemainder;3$;28|> Integer
  goget stuffing slot 47 of IntegerMod 1783
  <------#<compiled-function |INT;positiveRemainder;3$;28|> Integer

  PrimeField n activating lazy slot 8: Integer
  PrimeField n activating lazy slot 9: IntegerPrimesPackage Integer

  ..PrimeField n wants
   prime? : Integer -> Boolean from  IntegerPrimesPackage Integer
  ---->IntegerPrimesPackage Integer----> searching op table for:
   prime? : Integer -> Boolean from  IntegerPrimesPackage Integer
  <----#<compiled-function |PRIMES;prime?;IB;4|>(IntegerPrimesPackage,Integer)
  goget stuffing slot 10 of PrimeField n
  <------#<compiled-function |PRIMES;prime?;IB;4|>(IntegerPrimesPackage,Integer)

which clearly tells you, that the calculation is done alright, only the signature interferes with success.

Any ideas?

Peter said, that it's on the interpreter side. You can read the whole thread on http://lists.gnu.org/archive/html/axiom-developer/2005-01/msg00154.html

Concerning his patches, Peter also pointed out that

  • aldor "extend" does not work
  • The algebra defined in libaxiom.al is not current, and for it to be rebuilt various .as files need to be available to the build process (axextend.as and friends)
  • exported attributes from aldor domains are explicitly killed off by this patch (it's probably easy to fix, just no time at the moment).
  • Only tested the most trivial domains he could find.

property change --kratt6, Sat, 15 Oct 2005 06:04:09 -0500 reply
Severity: normal => wishlist

Note that with Peter''s patches the error message System Error: Unfortunate use of dependant type is directly triggered by the code produced by aldor. In the lisp file, there line 201 reads:
    (|Halt| (the |SInt| 101))))

|Halt| is a function in foam_l.lisp. I do not know why the call to this error was not produced with the old libaxiom.al. Would be great if somebody could help here...


  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: