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

Test species in axiom/FriCAS.

The species project is written in Aldor. Thus we need to load the libraries explicitly:

axiom
)version
Value = "FriCAS 2012-10-18 compiled at Monday March 25, 2013 at 20:50:21 "
axiom
)cd /var/lib/zope/combinat/src
The current FriCAS default directory is /var/aw/var/LatexWiki
axiom
)re ../lib/combinat.input
The file ../lib/combinat.input is needed but does not exist.

We took the decision not to rely on the Axiom algebra. Unfortunately, this means that integration in Axiom is a little unsatisfactory. Eg., instead of Integer and List, we need to use ACInteger and ACList. Often explicit coercions are necessary.

This should give the set partitions of {1,2,3,4}

axiom
l: SetSpecies ACINT := set [i::ACINT for i in 1..4]
There are no library operations named SetSpecies Use HyperDoc Browse or issue )what op SetSpecies to learn if there is any operation containing " SetSpecies " in its name.
Cannot find a definition or applicable library operation named SetSpecies with argument type(s) Variable(ACINT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. [structures(l)$Partition ACINT]$ACLIST(Partition ACINT)
The constructor Partition takes 0 arguments and you have given 1 .

aldor
#includeDir "/var/lib/zope/combinat/include"
#libraryDir "/var/lib/zope/combinat/lib"
#include "combinat"
macro { E == EmptySetSpecies; X == SingletonSpecies; + == Plus; * == Times; }
A(L: LabelType): CombinatorialSpecies L == (E + X*A*A)(L) add;
aldor
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5200085684951427974-25px003.as
      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 
      options.
#1 (Warning) Could not use archive file `libaxiom.al'.
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5200085684951427974-25px003.as", line 3: 
#include "combinat"
^
[L3 C1] #2 (Error) Could not open file `combinat'.
The )library system command was not called after compilation.

Due to types not being first class objects in the Axiom interpreter, we had to write a little interpreter to allow for user specified species:

axiom
T := Interpret([parse "Plus(SingletonSpecies, Times(Self, Self))"], ACInteger);
There are no exposed library operations named parse but there is one unexposed operation with that name. Use HyperDoc Browse or issue )display op parse to learn more about the available operation.
Cannot find a definition or applicable library operation named parse with argument type(s) String
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.
axiom
)sh T
The )show system command is used to display information about types or partial types. For example, )show Integer will show information about Integer .
T is not the name of a known type constructor. If you want to see information about any operations named T , issue )display operations T l := set [i::ACINT for i in 1..3]
Cannot convert from type PositiveInteger to NIL for value failCheck(SPADCALL(i,'#<))NCTION |INT;coerce;$Of;16|>()
[structures(l)$T]$ACLIST(T)
There are no library operations named ACLIST Use HyperDoc Browse or issue )what op ACLIST to learn if there is any operation containing " ACLIST " in its name.
Cannot find a definition or applicable library operation named ACLIST with argument type(s) Variable(T)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

We are still not 100% sure how to represent isomorphism types. So far, we had two ideas: in the iso-experiment branch, we have separate (but tightly connected) representation:

axiom
m: MultiSet ACINT := multiset([1$ACINT for i in 1..3]::ACList ACINT)
There are no library operations named MultiSet Use HyperDoc Browse or issue )what op MultiSet to learn if there is any operation containing " MultiSet " in its name.
Cannot find a definition or applicable library operation named MultiSet with argument type(s) Variable(ACINT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. [isomorphismTypes(m)$MultiSet(ACINT)]$ACList(MultiSet ACINT)
There are no library operations named MultiSet Use HyperDoc Browse or issue )what op MultiSet to learn if there is any operation containing " MultiSet " in its name.
Cannot find a definition or applicable library operation named MultiSet with argument type(s) Variable(ACINT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

axiom
IsoT := ACIsomorphismType(ACINT, T)
There are no library operations named ACIsomorphismType Use HyperDoc Browse or issue )what op ACIsomorphismType to learn if there is any operation containing " ACIsomorphismType " in its name.
Cannot find a definition or applicable library operation named ACIsomorphismType with argument type(s) Variable(ACINT) Variable(T)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.
axiom
)sh IsoT
The )show system command is used to display information about types or partial types. For example, )show Integer will show information about Integer .
IsoT is not the name of a known type constructor. If you want to see information about any operations named IsoT , issue )display operations IsoT [isomorphismTypes(m)$IsoT]$ACList(IsoT)
There are no library operations named ACList Use HyperDoc Browse or issue )what op ACList to learn if there is any operation containing " ACList " in its name.
Cannot find a definition or applicable library operation named ACList with argument type(s) Variable(IsoT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

debugging needed here... On my computer, the last statement yields

On my computer, the last statement yields:

  (13)  [r([1], ([1], [1])),r(([1], [1]), [1])]

Very likely, the bug is due to the broken aldor interface. Ralf is working hard on that.

axiom
)cl all
All user variables and function definitions have been cleared. G := Interpret([parse "FunctorialCompose(Subset, Combination(2)))"], ACINT)
There are no exposed library operations named parse but there is one unexposed operation with that name. Use HyperDoc Browse or issue )display op parse to learn more about the available operation.
Cannot find a definition or applicable library operation named parse with argument type(s) String
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. l: SetSpecies ACINT := set([1,2,3]::List ACINT::ACList ACINT)
There are no library operations named SetSpecies Use HyperDoc Browse or issue )what op SetSpecies to learn if there is any operation containing " SetSpecies " in its name.
Cannot find a definition or applicable library operation named SetSpecies with argument type(s) Variable(ACINT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. s := structures(l)$G
The function structures is not implemented in NIL .

axiom
)lisp  (use-fast-links nil)
>> System error: The function BOOT::USE-FAST-LINKS is undefined.

Martin's experiment --Bill Page, Tue, 11 Nov 2008 19:34:52 -0800 reply
SandBoxSpeciesCategory




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