Re: tellsimp, tellsimpafter



I assume the difference was dictated by the need to avoid the
recursive simplification of arguments problem, but I don't recall
this decision at all.
It was written a while ago..
An alternative pattern matcher, e.g. a mockup of Mathematica's
matcher, might be useful as an alternative.
Especially since I wrote one in Lisp a few years ago :)

----- Original Message ----- 
From: "Robert Dodier" <robert.dodier at gmail.com>
To: "Richard Fateman" <fateman at cs.berkeley.edu>
Cc: "Barton Willis" <willisb at unk.edu>; "Maxima" <maxima at math.utexas.edu>
Sent: Friday, January 20, 2006 10:07 AM
Subject: Re: tellsimp, tellsimpafter


> On 1/20/06, Richard Fateman <fateman at cs.berkeley.edu> wrote:
>
>> They are similar.  They differ in the ordering of rule application, but
>> there is also an issue of re-simplification. That is, you don't want
>> to get into a recursion because the argument to a rule is first
>> simplified.  (calling the rule ... etc).  The situation with 
>> tellsimpafter
>> requires a different trick.  But otherwise I think the code generated
>> is the same.  (At least that is what I recall from when I wrote this
>> stuff in 1969 or so...)
>
> well, something that's relevant to the example involving interval
> objects is that tellsimpafter generates code to call PART+  and PART*
> which carry out the argument sweep-up matching for + and *.
> tellsimp doesn't; the effect is that tellsimp matches a substantially
> smaller set of patterns for + and * than tellsimpafter.
>
> it's not clear to me what is the reason for the difference in matching
> logic between tellsimp and tellsimpafter. i wonder if we should try
> to unify the two. the preamble for the matching functions probably
> needs to be different, but the matching logic itself could be the same,
> i'm guessing.
>
> matchdeclare (aa, integerp, bb, symbolp);
> tellsimp (aa + bb, FOO (aa, bb));
> tellsimpafter (aa + bb, BAR (aa, bb));
> :lisp (symbol-function '&+rule1)
> :lisp (symbol-function '&+rule2)
>
> sheds some light on this topic.
>
> fwiw
> robert dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>