On Monday, September 1, 2014 10:21:25 PM UTC-7, Joachim Durchholz wrote:
>
> Am 02.09.2014 um 05:58 schrieb Richard Fateman: 
>  > you could read 
> > about inherited and synthesized attributes (usually in relation 
> > to intermediate expression trees in the theory of compiling.) 
>
> Heh. I don't need to read about these, that's established knowledge :-) 
>
>  > I think that to understand why this is unlikely, 
>
> Not sure what you mean with "this". 
> Also, not sure whether you meant to say "unlikely to happen", "unlikely 
> to be doable", or "unlikely to exist". 
>
> So... can you clarify? 
>

Sure.  Unlikely to be easy to do by simply hacking on trees. Here's a 
classic pattern:

a*x^2+b*x+c.        a,b,c are pattern variables.  x, in this context,  is a 
symbolic constant.
You might like to also impose  a,b,c free of x, and a is non-zero,  to 
complete the pattern "quadratic in x"

match this against the expression

(45*x+10)^2/5 +q*x+pi

Yes this can be done, but can you do it by placing attributes on + and *?
I suppose there is also the question of whether you want this to match or 
not.  

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/0cbc5144-5d8c-4122-84b3-0a1d858f646b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to