Based on my experience when I was adding ')storage' and tweaking
g-timer.boot, the problem is that '$timedNameStack' should not
be initialized multiple times.
Aka 'initializeTimedNames' should not be called in 'processInteractive'
(it is already called at toplevel 'interpsysInitialization').
diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index 20b4773c..04d37850 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -130,8 +130,6 @@ processInteractive(form, posnForm) ==
-- and then calls processInteractive1 to do most of the work.
-- This function receives the output from the parser.
- initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses)
-
$op: local:= (form is [op,:.] => op; form) --name of operator
$Coerce: local := NIL
$compErrorMessageStack:local := nil
With this change, the looping problem is gone.
Also if my analysis is right, 'savedTimerStack' can also be removed.
This needs more testing and analysis. A side effect of this is
that stats are not working properly.
I'll take a deeper look.
- Qian
On 12/11/23 09:18, Waldek Hebisch wrote:
There is trouble with recusive calls to intepreter. Ralf reported
problem with use of 'systemCommand("read foo.input")', after
fixing part of it I got a hang. Earlier, doing
s := "1 + 1"
interpret_block(s)$Lisp
we got a hang. I now found the reason: recursive call to
intepreter mangles '$timedNameStack' (and other timing
variables) causing infinite loop in statisctics code.
I am not sure what is proper fix for this (more precisely,
how should we time recursive calls). The attached patch
works around infinite loop and fixes abort when doing 'read'
as system command.
--
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/a8f14ae5-f571-488e-9e53-9c33d0e20019%40gmail.com.