|
|
last edited 7 years ago by test1 |
1 2 | ||
Editor: test1
Time: 2017/02/23 18:56:27 GMT+0 |
||
Note: |
added:
From test1 Thu Feb 23 18:56:27 +0000 2017
From: test1
Date: Thu, 23 Feb 2017 18:56:27 +0000
Subject:
Message-ID: <20170223185627+0000@axiom-wiki.newsynthesis.org>
Status: open => rejected
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.
(1) -> <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.01 SEC.
(time taken in buildFunctor: 0)
;;; *** |Test| REDEFINED
;;; *** |Test| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor Test Time: 0.01 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 19 FEB 2023 07:17:13 PM):
; /var/aw/var/LatexWiki/TEST.NRLIB/TEST.fasl written ; compilation finished in 0:00:00.018 ------------------------------------------------------------------------ Test is now explicitly exposed in frame initial Test will be automatically loaded when needed from /var/aw/var/LatexWiki/TEST.NRLIB/TEST
)set stream calculate 3
s := coefficients series(q^(m-i),q=1)
(1) |
)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)
(2) |
eval(s.2,i, %B)
(3) |
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 is replaced by ...
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...