"Amit M. Rao" <>
5 Jul 1998 01:15:25 -0400

          From comp.compilers

Related articles
Algorithm (Amit M. Rao) (1998-07-05)
Re: Algorithm (1998-07-05)
Re: Algorithm (Amit M. Rao) (1998-07-05)
| List of all articles for this month |

From: "Amit M. Rao" <>
Newsgroups: comp.compilers
Date: 5 Jul 1998 01:15:25 -0400
Organization: Dept. of ECECS, Univ. of Cincinnati
Keywords: theory, question


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]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.