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

Submitted by : (unknown) at: 2007-11-17T22:10:22-08:00 (10 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

I'm afraid I found my first severe compiler error. Unfortunately, I do not know yet how to workaround. I cannot even see how to localize it.

spad
)abbrev package TEST Test
Test(): Exports == Implementation where
NNI ==> NonNegativeInteger
Exports == with
subsetToComp: List Integer -> List NNI
Implementation == add
subsetToComp v == res: List NNI := []
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/125188740751070590-25px001.spad
      using old system compiler.
   TEST abbreviates package Test 
------------------------------------------------------------------------
   initializing NRLIB TEST for Test 
   compiling into NRLIB TEST 
   compiling exported subsetToComp : List Integer -> List NonNegativeInteger
      TEST;subsetToComp;LL;1 is replaced by LETres 
Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |Test| REDEFINED
;;; *** |Test| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor Test Time: 0 seconds
finalizing NRLIB TEST Processing Test for Browser database: --->-->Test(constructor): Not documented!!!! --->-->Test((subsetToComp ((List (NonNegativeInteger)) (List (Integer))))): Not documented!!!! --->-->Test(): Missing Description ; compiling file "/var/aw/var/LatexWiki/TEST.NRLIB/TEST.lsp" (written 23 FEB 2017 06:55:54 PM):
; /var/aw/var/LatexWiki/TEST.NRLIB/TEST.fasl written ; compilation finished in 0:00:00.011 ------------------------------------------------------------------------ Test is now explicitly exposed in frame initial Test will be automatically loaded when needed from /var/aw/var/LatexWiki/TEST.NRLIB/TEST

fricas
)set stream calculate 3
s := coefficients series(q^(m-i),q=1)

\label{eq1}\left[ 1, \:{m - i}, \:{{{{m}^{2}}+{{\left(-{2 \  i}- 1 \right)}\  m}+{{i}^{2}}+ i}\over 2}, \:...\right](1)
Type: Stream(Expression(Integer))
fricas
)lib TEST
Test is already explicitly exposed in frame initial Test will be automatically loaded when needed from /var/aw/var/LatexWiki/TEST.NRLIB/TEST eval(s.2,i,%A)

\label{eq2}m - i(2)
Type: Expression(Integer)
fricas
eval(s.2,i,%B)

\label{eq3}m - i(3)
Type: Expression(Integer)

Obviously, the final lines should read m-%A and m-%B. The error seems to go away if the series is generated after the )lib command or if the series contains no other variables apart from q and i. Furthermore, %A seems to be somehow special, but I cannot reproduce this peculiarity here.

I would be very grateful if somebody could at least localize the error, so that I can determine when it happens. This bug has unfortunately tremendous implications, for example, a product like \prod_{i=1}^n f(i) is replaced by f(i)^n...

If we issue the )lib command before defining any variables, the problem goes away.

Actually core of the problem is how Expression works. More precisely Expression uses Kernel and Kernels are cached inside SortedCache?. In order to force use of newly loaded domain )lib has to invalidate all existing domains, including SortedCache? storing cached kernels. In effect all Kernel-s (hence Expression-s) stored in variables became invalid. In many cases those invalid expressions still give sensible results so one may be fooled to think that expressions should work after )lib, but this is not the case...

Status: open => rejected




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