Richard Fateman <fateman at eecs.berkeley.edu> writes:
> The only time turning the simplifier off makes sense is if you are
> trying to over-ride a built in simplification. e.g. if you would like
> to do tellsimp(0^0,undefined).
>
> I suspect that one fix would be to change the documentation to say
> that remrule will only remove (a) all the rules on an operator or (b)
> the last rule on an operator.
>
> I am sure that there are lots of anomalies that could be uncovered in
> Maxima by turning off the simplifier and expecting Maxima to do
> whatever a user imagines that it should do in such a circumstance.
Hmm. It hadn't occurred to me that it might be impossible to trigger
this without the simplifier temporarily turned off. That's a good point.
> While I don't want to exactly correlate it with your situation, I
> would dispute that your statement about working around bugs is
> unusual. It is probably the most frequent approach.
>
> It happens like this: a bug is reported. The person in charge of
> resolving bugs decides that it is not a bug, but a "user error" or
> PICNIC. "Problem in Chair, Not in Computer". The advice is to change
> the user program. User does so and continues until the next bug...
>
> From the user perspective it appears he/she is being told how to work
> around a bug.
Another possibility is that, from a user perspective, the program author
appears arrogant and unpleasant. I'm not convinced that it's ever a
great idea to reply with PICNIC, RTFM or other acronyms that show how
terribly clever the author is.
> Statistically speaking, user error constitute a vast majority of
> reported bugs in programs.
In some cases, programs can be designed to make it obvious to the user
that they're doing something weird. HAL's new line: "I'm sorry,
Dave. I'm afraid I can't do that. And why on Earth do you want me to?"
Maybe this is more difficult with something like Maxima, where there is
a whole programming language with which a user can shoot themselves in
the foot.
>> Are you saying that I should not expect Maxima to have sane
>> semantics with defrule and friends?
> If the documentation of remrule is changed, does that make it sane?
> Maybe one should also add that any bugs that occur only when
> simp:false, are user errors.
Maybe. But arguing that "Maxima's behaviour when you set simp:false is
undefined" implies that simp shouldn't be a variable a user can get to
without diving into lisp...
>> Or do you think that I was trying to write this to improve
>> performance?
> Nope. The difference in performance for tellsimp/tellsimpafter should
> be negligible. The initial implementation was complicated by the
> notion that after a bunch of tellsimps etc one would end up with a
> single subroutine that could be compiled into machine code. This
> would be harder to do with a separable list of rules. In practice, no
> one compiles the subroutine.
If I've understood this paragraph correctly, it doesn't quite describe
how the current code works. Each simplifying subroutine may recurse to
a previously defined one if one exists. As such, each would be compiled
into separate functions. I would expect to get identical performance
with one function calling each simplifying routine in turn (and not
descend so far into the stack!). With implementations like SBCL, of
course, everything gets compiled, so the compile/don't compile thing is
sort of moot.
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120127/20e20f1b/attachment.pgp>