edited by
973 views
0 votes
0 votes
a x b x c + d - a + e x f - g + h
order of precedence : x>+>- ; with x is left associative and +, - as right.
Min number of variables required in TAC?
Should'nt the expression be expressed as :

((a x b) x c) + d - a + (e x f) - g + h
(((a x b) x c) + (d - (a + (e x f)) - (g + h)))
edited by

2 Answers

3 votes
3 votes

Make sure it is 3 address code not SSA

so we can reuse temporary variable after using * > + > - precedence

* Left to right associative rest Right to Left

 

0 votes
0 votes
It must be 16 temporary variable.

(T1 to T8) and (a to h )

Related questions

2 votes
2 votes
1 answer
1
rahul sharma 5 asked Jan 24, 2018
1,222 views
Consider the intermediate code given below:The number of nodes and edges in the control-flow graph constructed for the above code, respectively are X and Y. The value of ...
1 votes
1 votes
1 answer
4
Markzuck asked Jan 8, 2019
742 views
someone please share detailed rules for this along with solution- would be of great help.and we usually dont take start and end state- arent they extra here? coz count co...