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

Edit detail for SandBox Spad revision 1 of 2

1 2
Editor:
Time: 2007/11/18 18:36:48 GMT-8
Note:

changed:
-
A minimal exemple of my trouble.

\begin{spad}
)abbrev domain MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field

    INT ==> Integer
    P ==> UnivariatePolynomial(x,F)
    FRP ==> Fraction P
    LFRP ==> List FRP

    Exports == with
      
       degreeX:$ -> INT

    Implementation == add

       Rep := LFRP

       degreeX f ==
          a := [denom i for i in f::Rep]@List P  --  denom : FRAC UP -> UP(x,F)
          b := map( (i) +-> degree i , a ) -- degree : UP -> NonNegativeInteger
          --b := [degree i for i in a ]
          reduce( max, b ,0) :: INT
          12



\end{spad}

\begin{spad}
)abbrev domain MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field

    INT ==> Integer
    P ==> UnivariatePolynomial(x,F)
    FRP ==> Fraction P
    LFRP ==> List FRP

    Exports == with
      
       degreeX:$ -> INT

    Implementation == add

       Rep := LFRP

       degreeX f ==
          a := [denom i for i in f::Rep] --  denom : FRAC UP -> UP(x,F)
        --b := map( degree , a ) -- degree : UP -> NonNegativeInteger
          b := [degree i for i in a ]
          reduce( max, b ,0) :: INT
          12



\end{spad}

From unknown Sat Apr 1 13:47:59 -0600 2006
From: unknown
Date: Sat, 01 Apr 2006 13:47:59 -0600
Subject: 
Message-ID: <20060401134759-0600@wiki.axiom-developer.org>

I believe it's map (degree #1, a) we must type in *.spad files. 
Last days I make the same error. I find this tips by grep *.spad file.

FMy

\begin{spad}
)abbrev domain MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field

    INT ==> Integer
    P ==> UnivariatePolynomial(x,F)
    FRP ==> Fraction P
    LFRP ==> List FRP

    Exports == with
      
       degreeX:$ -> INT

    Implementation == add

       Rep := LFRP

       degreeX f ==
          a := [denom i for i in f::Rep] --  denom : FRAC UP -> UP(x,F)
          b := map( degree #1, a ) -- degree : UP -> NonNegativeInteger
       -- b := [degree i for i in a ]
          reduce( max, b ,0) :: INT
          12

\end{spad}

I guess not yet

From kratt6 Tue Apr 4 03:26:02 -0500 2006
From: kratt6
Date: Tue, 04 Apr 2006 03:26:02 -0500
Subject: 
Message-ID: <20060404032602-0500@wiki.axiom-developer.org>

The compiler is unable to find out the mode for '#1', since it doesn't know what map he is supposed to use. It is tedious, but the cure is to package call 'map'. Furthermore, it is usually easier to debug packages.

\begin{spad}
)abbrev package MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field
    INT ==> Integer
    P ==> UnivariatePolynomial(x,F)
    FRP ==> Fraction P
    LFRP ==> List FRP
    Exports == with
       degreeX: LFRP -> INT
    Implementation == add
       degreeX f ==
          a: List P := [denom i for i in f]
          b := map(degree #1, a)$ListFunctions2(P, NonNegativeInteger)
          reduce( max, b ,0) :: INT
\end{spad}

\begin{axiom}
list:List FRAC UP(x,FRAC INT):= [x^2+1/x::FRAC UP(x,FRAC INT), x+1/x^2]
degreeX(list)$MINI(x, FRAC INT)
\end{axiom}


A minimal exemple of my trouble.

spad
)abbrev domain MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field
INT ==> Integer P ==> UnivariatePolynomial(x,F) FRP ==> Fraction P LFRP ==> List FRP
Exports == with
degreeX:$ -> INT
Implementation == add
Rep := LFRP
degreeX f == a := [denom i for i in f::Rep]@List P -- denom : FRAC UP -> UP(x,F) b := map( (i) +-> degree i , a ) -- degree : UP -> NonNegativeInteger --b := [degree i for i in a ] reduce( max, b ,0) :: INT 12
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/7057750299610597758-25px001.spad
      using old system compiler.
   MINI abbreviates domain MinimalInitialNotIntegrated 
******** Spad syntax error detected ********
The prior line was:
11> Exports == with
The current line is:
13> degreeX:$ -> INT
The number of valid tokens is 1. The prior token was #S(TOKEN :SYMBOL |:| :TYPE KEYWORD :NONBLANK 13) The current token is #S(TOKEN :SYMBOL $ :TYPE KEYWORD :NONBLANK 13)

spad
)abbrev domain MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field
INT ==> Integer P ==> UnivariatePolynomial(x,F) FRP ==> Fraction P LFRP ==> List FRP
Exports == with
degreeX:$ -> INT
Implementation == add
Rep := LFRP
degreeX f == a := [denom i for i in f::Rep] -- denom : FRAC UP -> UP(x,F) --b := map( degree , a ) -- degree : UP -> NonNegativeInteger b := [degree i for i in a ] reduce( max, b ,0) :: INT 12
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/319248881489787835-25px002.spad
      using old system compiler.
   MINI abbreviates domain MinimalInitialNotIntegrated 
******** Spad syntax error detected ********
The prior line was:
11> Exports == with
The current line is:
13> degreeX:$ -> INT
The number of valid tokens is 1. The prior token was #S(TOKEN :SYMBOL |:| :TYPE KEYWORD :NONBLANK 13) The current token is #S(TOKEN :SYMBOL $ :TYPE KEYWORD :NONBLANK 13)

I believe it's map (degree #1, a) we must type in .spad files. Last days I make the same error. I find this tips by grep .spad file.

FMy?

spad
)abbrev domain MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field
INT ==> Integer P ==> UnivariatePolynomial(x,F) FRP ==> Fraction P LFRP ==> List FRP
Exports == with
degreeX:$ -> INT
Implementation == add
Rep := LFRP
degreeX f == a := [denom i for i in f::Rep] -- denom : FRAC UP -> UP(x,F) b := map( degree #1, a ) -- degree : UP -> NonNegativeInteger -- b := [degree i for i in a ] reduce( max, b ,0) :: INT 12
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/1875391181916146577-25px003.spad
      using old system compiler.
   MINI abbreviates domain MinimalInitialNotIntegrated 
******** Spad syntax error detected ********
The prior line was:
11> Exports == with
The current line is:
13> degreeX:$ -> INT
The number of valid tokens is 1. The prior token was #S(TOKEN :SYMBOL |:| :TYPE KEYWORD :NONBLANK 13) The current token is #S(TOKEN :SYMBOL $ :TYPE KEYWORD :NONBLANK 13)

I guess not yet

The compiler is unable to find out the mode for #1, since it doesn't know what map he is supposed to use. It is tedious, but the cure is to package call map. Furthermore, it is usually easier to debug packages.

spad
)abbrev package MINI MinimalInitialNotIntegrated
MinimalInitialNotIntegrated(x,F): Exports == Implementation where
    x: Symbol
    F: Field
    INT ==> Integer
    P ==> UnivariatePolynomial(x,F)
    FRP ==> Fraction P
    LFRP ==> List FRP
    Exports == with
       degreeX: LFRP -> INT
    Implementation == add
       degreeX f ==
          a: List P := [denom i for i in f]
          b := map(degree #1, a)$ListFunctions2(P, NonNegativeInteger)
          reduce( max, b ,0) :: INT
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/7632940607010675536-25px004.spad
      using old system compiler.
   Illegal NRLIB 
   MINI.NRLIB claims that its constructor name is the package 
      MinimalInitialNotIntegrated but MinimalInitialNotIntegrated is 
      already known to be the for domain MINI .
   MINI abbreviates package MinimalInitialNotIntegrated 
------------------------------------------------------------------------
   initializing NRLIB MINI for MinimalInitialNotIntegrated 
   compiling into NRLIB MINI 
   compiling exported degreeX : List Fraction UnivariatePolynomial(x,F) -> Integer
Time: 0.05 SEC.
(time taken in buildFunctor: 0)
;;; *** |MinimalInitialNotIntegrated| REDEFINED
;;; *** |MinimalInitialNotIntegrated| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor MinimalInitialNotIntegrated Time: 0.05 seconds
finalizing NRLIB MINI Processing MinimalInitialNotIntegrated for Browser database: --->-->MinimalInitialNotIntegrated(constructor): Not documented!!!! --->-->MinimalInitialNotIntegrated((degreeX ((Integer) (List (Fraction (UnivariatePolynomial x F)))))): Not documented!!!! --->-->MinimalInitialNotIntegrated(): Missing Description ; compiling file "/var/aw/var/LatexWiki/MINI.NRLIB/MINI.lsp" (written 14 JUL 2013 10:50:45 AM):
; /var/aw/var/LatexWiki/MINI.NRLIB/MINI.fasl written ; compilation finished in 0:00:00.017 ------------------------------------------------------------------------ MinimalInitialNotIntegrated is now explicitly exposed in frame initial MinimalInitialNotIntegrated will be automatically loaded when needed from /var/aw/var/LatexWiki/MINI.NRLIB/MINI

fricas
list:List FRAC UP(x,FRAC INT):= [x^2+1/x::FRAC UP(x,FRAC INT), x+1/x^2]

\label{eq1}\left[{{{{x}^{3}}+ 1}\over x}, \:{{{{x}^{3}}+ 1}\over{{x}^{2}}}\right](1)
Type: List(Fraction(UnivariatePolynomial?(x,Fraction(Integer))))
fricas
degreeX(list)$MINI(x, FRAC INT)

\label{eq2}2(2)
Type: Integer