This fails in SPAD: spad )abbrev domain AAA Aaa
Aaa: with
bar: Integer -> Integer
== add
foo(x:Float):Integer == 1
foo(x:Integer):Integer == 2
a:Integer == 1
a:Float == 1.0
x:Integer := 1
y:Float := 1.0
bar(z:Integer):Integer == foo(x)+foo(y)
spad Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/162293060307836856-25px001.spad using
old system compiler.
AAA abbreviates domain Aaa
------------------------------------------------------------------------
initializing NRLIB AAA for Aaa
compiling into NRLIB AAA
compiling local foo : Float -> Integer
AAA;foo is replaced by 1
Time: 0.06 SEC.axiom bar(3) spad )abbrev domain AAA0 Aaa0
Aaa0: with
bar0: Integer -> Integer
foo: Integer -> Integer
foo: Float -> Integer
== add
foo(x:Float):Integer == 1
foo(x:Integer):Integer == 2
x:Integer := 1
y:Float := 1.0
bar0(z:Integer):Integer == foo(x)+foo(y)
spad Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/6395014362195898863-25px003.spad using
old system compiler.
AAA0 abbreviates domain Aaa0
------------------------------------------------------------------------
initializing NRLIB AAA0 for Aaa0
compiling into NRLIB AAA0
compiling exported foo : Float -> Integer
AAA0;foo;FI;1 is replaced by 1
Time: 0 SEC.axiom bar0(3)
Type: PositiveInteger
But it works in Aldor: aldor #pile #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/3603377070621137033-25px005.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.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
Compiling Lisp source code from file
./3603377070621137033-25px005.lsp
Issuing )library command for 3603377070621137033-25px005
Reading /var/zope2/var/LatexWiki/3603377070621137033-25px005.asy
Bbb is now explicitly exposed in frame initial
Bbb will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3603377070621137033-25px005axiom bar2(3)
Type: PositiveInteger
aldor #pile #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/2796111966566536169-25px007.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.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"/var/zope2/var/LatexWiki/2796111966566536169-25px007.as", line 13:
bar3(z:Integer):Integer == foo(a)+foo(a)
...............................^......^
[L13 C32] #2 (Error) There are 2 meanings for the operator `foo'.
Meaning 1: (x: Float) -> Integer
Meaning 2: (x: Integer) -> Integeraxiom bar3(3) aldor #pile #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/8356965697444416280-25px009.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.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
Compiling Lisp source code from file
./8356965697444416280-25px009.lsp
Issuing )library command for 8356965697444416280-25px009
Reading /var/zope2/var/LatexWiki/8356965697444416280-25px009.asy
Ddd is now explicitly exposed in frame initial
Ddd will be automatically loaded when needed from
/var/zope2/var/LatexWiki/8356965697444416280-25px009axiom bar4(4)
Type: PositiveInteger
calling functions with tuple --Bill Page, Thu, 22 May 2008 08:24:21 -0700 reply aldor #pile #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/7154599798421986088-25px011.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.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"/var/zope2/var/LatexWiki/7154599798421986088-25px011.as", line 9:
bar5(z:Integer):Integer == foo(1)+foo(1,2)+foo(1,2,3)
......................................^
[L9 C39] #2 (Error) There are 2 meanings for the operator `foo'.
Meaning 1: (x: Tuple(Integer)) -> Integer
Meaning 2: (x: Integer, y: Integer) -> Integeraxiom bar5(1)In SPAD a reference to #1, #2, in an expression denotes an anonymous function. E.g. #1 + #1 is the same as writing:x +-> x + x spad )abbrev domain FFF Fff
Fff: with
bar7: () -> (Integer -> Integer)
bar8: () -> ((Integer,Integer) -> Integer)
== add
bar7 == #1 + #1
bar8 == (#1 * #1) + (#2 * #2)
spad Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/712240775020227376-25px013.spad using
old system compiler.
FFF abbreviates domain Fff
------------------------------------------------------------------------
initializing NRLIB FFF for Fff
compiling into NRLIB FFF
compiling exported bar7 : () -> Integer -> Integer
Time: 0.01 SEC.axiom bar7()(3)
Type: PositiveInteger
axiom bar7x() == x +-> x + x Type: Void
axiom bar7x()(3) axiom Compiling function bar7x with type () -> AnonymousFunction
Type: PositiveInteger
axiom bar8()(3,4)
Type: PositiveInteger
axiom bar8x() == (x,y) +-> x*x + y*y Type: Void
axiom bar8x()(3,4) axiom Compiling function bar8x with type () -> AnonymousFunction
Type: PositiveInteger
|