Hi Kurt, hi Waldek,

I have reworked my program from

https://groups.google.com/d/msg/fricas-devel/tFSAAzvFkp0/sRlfheFGBAAJ
Waldek might want to look here:
https://www.mail-archive.com/[email protected]/msg13722.html

but put it into a new thread, since I believe it is another issue than
the missing "category default implementation".

I really cannot make sense out of the error in the attached program.
Why would it in some cases work fine and in others not? That is quite
frustrating. Anyone spots an error in my code? Or is it another compiler
bug?

Ralf




(1) -> f1()$Bar(Fraction Integer)
                       2    3
   [:> , px1, 1 + q + q  + q ]
                                                                   Type:
Void
(2) -> f2()$Bar(Fraction Integer)
   Internal Error
   The function px with signature () -> UnivariateLaurentSeries(
      SimpleAlgebraicExtension(Fraction(Integer),
      SparseUnivariatePolynomial(Fraction(Integer)),?^2+1),q,0) is
      missing from domain Foo
      (SimpleAlgebraicExtension (Fraction (Integer))
(SparseUnivariatePolynomial (Fraction (Integer))) ((2 1 . 1) (0 1 . 1)))
      (UnivariateLaurentSeries (SimpleAlgebraicExtension (Fraction
(Integer)) (SparseUnivariatePolynomial (Fraction (Integer))) ((2 1 . 1)
(0 1 . 1))) (QUOTE q) 0)


(2) -> C ==> Fraction Integer
                                                                   Type:
Void
(3) -> minrootpol: SUP C := monomial(1,2)$SUP(C) + 1

         2
   (3)  ?  + 1
                          Type:
SparseUnivariatePolynomial(Fraction(Integer))
(4) -> CX ==> SimpleAlgebraicExtension(C, SUP C, minrootpol)
                                                                   Type:
Void
(5) -> L1 C  ==> UnivariateLaurentSeries(C, 'q, 0);
                                                                   Type:
Void
(6) -> px2 := px()$Foo(CX, L1 CX)

                 2    3
   (6)  1 + q + q  + q
Type:
UnivariateLaurentSeries(SimpleAlgebraicExtension(Fraction(Integer),SparseUnivariatePolynomial(Fraction(Integer)),?^2+1),q,0)
(7) ->

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/0dbac30b-98c7-32d7-9cfa-6eaaea47c64b%40hemmecke.org.
OF==>OutputForm
dbgPrint(x,y) ==> print(([":> "::Symbol::OF, x::Symbol::OF, y::OF]$List(OF)::OF))
L1 C  ==> UnivariateLaurentSeries(C, 'q, 0);
SUP ==> SparseUnivariatePolynomial

)abbrev package FOO Foo
Foo(C: IntegralDomain, L: UnivariateLaurentSeriesCategory C): with
    px: () -> L
  == add
    px(): L == laurent(0, [1,1,1,1]$List(C)::Stream(C))$L

)abbrev package BAR Bar
Bar(C: IntegralDomain): with
    f1: () -> Void
    f2: () -> Void
  == add
    f1(): Void ==
      px1 := px()$Foo(C, L1 C)
      dbgPrint("px1", px1)
    f2(): Void ==
      minrootpol: SUP C := monomial(1,2)$SUP(C) + 1
      CX ==> SimpleAlgebraicExtension(C, SUP C, minrootpol)
      px2 := px()$Foo(CX, L1 CX)
      dbgPrint("px2", px2)

-------------------------------------------------------------------
)fin
-------------------------------------------------------------------
)co foo.spad
f1()$Bar(Fraction Integer)
f2()$Bar(Fraction Integer)
C ==> Fraction Integer
minrootpol: SUP C := monomial(1,2)$SUP(C) + 1
CX ==> SimpleAlgebraicExtension(C, SUP C, minrootpol)
L1 C  ==> UnivariateLaurentSeries(C, 'q, 0);
px2 := px()$Foo(CX, L1 CX)


-------------------------------------------------------------------

Checking for foreign routines
FRICAS="/home/hemmecke/HDD/hemmecke/software/lib/fricas/target/x86_64-linux-gnu"
spad-lib="/home/hemmecke/HDD/hemmecke/software/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System
          Version: FriCAS 99b0ed3ba53afbba57169283e803b2009020047d
                  Timestamp: Sun Oct  4 17:43:38 CEST 2020
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

(1) -> )co /home/hemmecke/g/qeta-bug/src/foo.spad
   Compiling FriCAS source code from file
      /home/hemmecke/g/qeta-bug/src/foo.spad using old system compiler.
   FOO abbreviates package Foo
------------------------------------------------------------------------
   initializing NRLIB FOO for Foo
   compiling into NRLIB FOO
   compiling exported px : () -> L
Time: 0.02 SEC.

(time taken in buildFunctor:  0)

;;;     ***       |Foo| REDEFINED

;;;     ***       |Foo| REDEFINED
Time: 0 SEC.


   Cumulative Statistics for Constructor Foo
      Time: 0.02 seconds

   finalizing NRLIB FOO
   Processing Foo for Browser database:
--->-->Foo(constructor): Not documented!!!!
--->-->Foo((px (L))): Not documented!!!!
--->-->Foo(): Missing Description
; compiling file "/home/hemmecke/v/git/qeta-bug/worksheets/FOO.NRLIB/FOO.lsp" (written 03 NOV 2020 11:02:24 PM):

; wrote /home/hemmecke/v/git/qeta-bug/worksheets/FOO.NRLIB/FOO.fasl
; compilation finished in 0:00:00.007
------------------------------------------------------------------------
   Foo is now explicitly exposed in frame initial
   Foo will be automatically loaded when needed from
      /home/hemmecke/v/git/qeta-bug/worksheets/FOO.NRLIB/FOO

   BAR abbreviates package Bar
------------------------------------------------------------------------
   initializing NRLIB BAR for Bar
   compiling into NRLIB BAR
   compiling exported f1 : () -> Void
Time: 0.04 SEC.

   compiling exported f2 : () -> Void
   processing macro definition CX ==> SimpleAlgebraicExtension(C,SparseUnivariatePolynomial C,minrootpol)
Time: 0.02 SEC.

(time taken in buildFunctor:  0)

;;;     ***       |Bar| REDEFINED

;;;     ***       |Bar| REDEFINED
Time: 0 SEC.


   Cumulative Statistics for Constructor Bar
      Time: 0.06 seconds

   finalizing NRLIB BAR
   Processing Bar for Browser database:
--->-->Bar(constructor): Not documented!!!!
--->-->Bar((f1 ((Void)))): Not documented!!!!
--->-->Bar((f2 ((Void)))): Not documented!!!!
--->-->Bar(): Missing Description
; compiling file "/home/hemmecke/v/git/qeta-bug/worksheets/BAR.NRLIB/BAR.lsp" (written 03 NOV 2020 11:02:24 PM):

; wrote /home/hemmecke/v/git/qeta-bug/worksheets/BAR.NRLIB/BAR.fasl
; compilation finished in 0:00:00.014
------------------------------------------------------------------------
   Bar is now explicitly exposed in frame initial
   Bar will be automatically loaded when needed from
      /home/hemmecke/v/git/qeta-bug/worksheets/BAR.NRLIB/BAR

(1) -> f1()$Bar(Fraction Integer)
                       2    3
   [:> , px1, 1 + q + q  + q ]
                                                                   Type: Void
(2) -> f2()$Bar(Fraction Integer)
   Internal Error
   The function px with signature () -> UnivariateLaurentSeries(
      SimpleAlgebraicExtension(Fraction(Integer),
      SparseUnivariatePolynomial(Fraction(Integer)),?^2+1),q,0) is
      missing from domain Foo
      (SimpleAlgebraicExtension (Fraction (Integer)) (SparseUnivariatePolynomial (Fraction (Integer))) ((2 1 . 1) (0 1 . 1)))
      (UnivariateLaurentSeries (SimpleAlgebraicExtension (Fraction (Integer)) (SparseUnivariatePolynomial (Fraction (Integer))) ((2 1 . 1) (0 1 . 1))) (QUOTE q) 0)


(2) -> C ==> Fraction Integer
                                                                   Type: Void
(3) -> minrootpol: SUP C := monomial(1,2)$SUP(C) + 1

         2
   (3)  ?  + 1
                          Type: SparseUnivariatePolynomial(Fraction(Integer))
(4) -> CX ==> SimpleAlgebraicExtension(C, SUP C, minrootpol)
                                                                   Type: Void
(5) -> L1 C  ==> UnivariateLaurentSeries(C, 'q, 0);
                                                                   Type: Void
(6) -> px2 := px()$Foo(CX, L1 CX)

                 2    3
   (6)  1 + q + q  + q
Type: UnivariateLaurentSeries(SimpleAlgebraicExtension(Fraction(Integer),SparseUnivariatePolynomial(Fraction(Integer)),?^2+1),q,0)
(7) ->

Reply via email to