one thing I believe to have learned from the threading work is: might it be that if maxima gets a interrupt signal during internal bookkeeping (for example during the wrong part of an assume) that can leave it in a broken state?
Background: Our lisps declare critical sections as "atomic. don't interrupt".
Diff:
I asked Claude to investigate.
Verdict: Yes. Ctrl+C can leave Maxima in an inconsistent state. I reproduced it on SBCL 2.6.9 with real SIGINTs: 12% of interrupts during a loop of function calls and 3% during an
assume/forgetloop left corrupted state. Ordinary computations should be hit less often, but I did not measure that. The cause is that the interrupt unwinds asynchronously at any instruction; Maxima has no interrupt masking, and multi-step updates are not rolled back.What can go wrong:
blockorevkeep the local value (e.g.a= 1 instead of 100). This includes option variables, sosimp:falseor a changedfppreccan stay set globally.facts(). It can also be listed infacts()but not in effect, in which caseforgetanswersredundant.functionscan list a function that has no definition.fpprecoption can disagree with the internal precision, sobfloatreturns the wrong number of digits.bindlist/mspecliststacks keep stale entries, or the local values are never restored.Recovery:
kill(all),forgetor re-assigningfpprecrepairs the facts and precision cases. Leaked variable values stay until reassigned. If the session matters after an interrupt, restart it.