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

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(di +-> degree(di), a)$ListFunctions2(P, INT) -- degree : UP -> NonNegativeInteger --b := [degree i for i in a ] reduce( max, b ,0) :: INT
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/1973871146429693580-25px001.spad
      using old system compiler.
   MINI abbreviates domain MinimalInitialNotIntegrated 
------------------------------------------------------------------------
   initializing NRLIB MINI for MinimalInitialNotIntegrated 
   compiling into NRLIB MINI 
   compiling exported degreeX : $ -> Integer
Time: 0.06 SEC.
(time taken in buildFunctor: 0)
;;; *** |MinimalInitialNotIntegrated| REDEFINED
;;; *** |MinimalInitialNotIntegrated| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor MinimalInitialNotIntegrated Time: 0.06 seconds
finalizing NRLIB MINI Processing MinimalInitialNotIntegrated for Browser database: --->-->MinimalInitialNotIntegrated(constructor): Not documented!!!! --->-->MinimalInitialNotIntegrated((degreeX ((Integer) %))): Not documented!!!! --->-->MinimalInitialNotIntegrated(): Missing Description ; compiling file "/var/aw/var/LatexWiki/MINI.NRLIB/MINI.lsp" (written 31 JUL 2013 06:13:41 PM):
; /var/aw/var/LatexWiki/MINI.NRLIB/MINI.fasl written ; compilation finished in 0:00:00.018 ------------------------------------------------------------------------ MinimalInitialNotIntegrated is now explicitly exposed in frame initial MinimalInitialNotIntegrated will be automatically loaded when needed from /var/aw/var/LatexWiki/MINI.NRLIB/MINI

We need to package call map, otherwise compilation would fail.

The compiler is unable to find out the mode for +->, 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.

In fact, even with fully types +->, the compilation fails, because the compiler can not find appropriate map.

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: LFRP -> 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
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/914813484557723871-25px002.spad
      using old system compiler.
   MINI abbreviates domain MinimalInitialNotIntegrated 
------------------------------------------------------------------------
   initializing NRLIB MINI for MinimalInitialNotIntegrated 
   compiling into NRLIB MINI 
   compiling exported degreeX : List Fraction UnivariatePolynomial(x,F) -> Integer
Time: 0.01 SEC.
(time taken in buildFunctor: 0)
;;; *** |MinimalInitialNotIntegrated| REDEFINED
;;; *** |MinimalInitialNotIntegrated| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor MinimalInitialNotIntegrated Time: 0.01 seconds
finalizing NRLIB MINI Processing MinimalInitialNotIntegrated for Browser database: --->/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/1973871146429693580-25px001.spad-->MinimalInitialNotIntegrated(constructor): Not documented!!!! --->/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/1973871146429693580-25px001.spad-->MinimalInitialNotIntegrated((degreeX ((Integer) (List (Fraction (UnivariatePolynomial x F)))))): Not documented!!!! --->/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/1973871146429693580-25px001.spad-->MinimalInitialNotIntegrated(): Missing Description ; compiling file "/var/aw/var/LatexWiki/MINI.NRLIB/MINI.lsp" (written 31 JUL 2013 06:13:41 PM):
; /var/aw/var/LatexWiki/MINI.NRLIB/MINI.fasl written ; compilation finished in 0:00:00.015 ------------------------------------------------------------------------ MinimalInitialNotIntegrated is already 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




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