Bug SS-1244
1 vote

Global effect of MaximaTakeover()

Created by brotjob on 11/9/2014 8:43 PM Last Updated by Martin Kraska on 7/31/2017 10:50 AM
Logged: 0   (hrs)


The MaximaTakeover() command has some behaviours that I may classify as bugs. See the attached file Blatt1.sm

  1. Open the file. The double integral is not calculated, thus Maxima not activated. Press recalculate (F9) and Maxima is activated for calculations above the MaximaTakeover() command. Everywhere else in Smath the order of commands matters i.e. you can't access a variable that is below your current formula.
  2. MaximaTakeover() only works if you put an = sign after the function. I find this irritating.
  3. MaximaTakeover() in one sheet has an effect in other sheets as well. Open the attached file, copy everything except the MaximaTakeover command into a new worksheet and you will see Maxima is activated in the new worksheet too. In other words: The result of a calculation is depending on which other files are opened at the same time in Smath and which of those has been recalculated last.
  4. If you delete a MaximaTakeover() command it's effect remains active. This creates a history based calculation result.

    Martin Kraska (Monday, July 31, 2017 10:50 AM) #

In the next Maxima Plugin version, MaximaTakeover will be implemented using definitions in the current sheet context. This will eliminate any history dependence and inter-sheet side effects caused by MaximaTakeover.

The change is a side effect of that system-wide takeover of special functions is not possible any more.

Yet, an SMath session with multiple open sheets will share the same maxima session. Thus, if you use "assume" or MaximaDefine it is still a good idea to reset Maxima at the start of the sheet. However, there is no need to do that in sheets where Maxima isn't used.

    brotjob (Monday, November 10, 2014 10:50 PM) #

If this is "by design" maybe the desing is not good. It is a bad behaviour of a plugin if you have to put a command in your sheet in order not to use it. I want do distribute my sheets to other Smath users and I expect them to work the exact same way irrespective of other files they may have loaded.

By the way: If I use MaximaTakeover("none") at the beginning of my sheets (just to be sure nothing is altered) but I have not installed the plugin I get an error. So using this command at the beginning of each sheet pre-emtively is not a solution.

But where there is no will there is no way.

    Martin Kraska (Monday, November 10, 2014 4:00 AM) #

1. Each SMath Studio instance has a single Maxima session, which can be accessed by multiple sheets. In order to reset the state of the session, use MaximaControl("restart") or MaximaControl("cleanup"). Add this command at the beginning of your sheet. This is not for free, as resetting costs some seconds of computation time. Therefore, you might prefer to limit yourself to just a single open sheet per SMath instance or otherwise taking care

2. This is by SMath design. The plugin cannot be blamed for this.

3. see 1.

4. see 1.

See the Maxima page in the interactive handbook: