Consider the following expression:
(a+a*(b-c)+(b-c)*d)
What is the minimum number of three address statements for the expression?
My question is whether we should optimize the expression before evaluating it or go as it is. For instance the above expression can be optimized as (a+(b-c)*(a+d)) which would generate lesser number of statements.