|Algorithm firstname.lastname@example.org (Amit M. Rao) (1998-07-05)|
|Re: Algorithm email@example.com (1998-07-05)|
|Re: Algorithm firstname.lastname@example.org (Amit M. Rao) (1998-07-05)|
|From:||"Amit M. Rao" <email@example.com>|
|Date:||5 Jul 1998 01:15:25 -0400|
|Organization:||Dept. of ECECS, Univ. of Cincinnati|
I am looking for an algorithm that enumerates all possible expression
trees obtained by applying the commutative law to an expresssion tree.
e.g.: a = b * c + d; ( expression is in the form of a tree )
a = d + b * c;
a = c * b + d;
a = d + c * b;
Compiler Research lab.
Univ. of Cincinnati.
[My first cut at it would be to walk the tree recursively, flipping
at each node that is a commutative operator. -John]
Return to the
Search the comp.compilers archives again.