The Gateway to Computer Science Excellence
0 votes
40 views
For question like :-

Find minimum number of variable required to solve the expression in three address code. (not SSA)

Do we need to consider the given variable also?

Example:-

q + r/3 + s – t * 5 + u * v/w

how many variable required?
in Compiler Design by (253 points) | 40 views

1 Answer

+1 vote
((q +( r/3)) + s) – ((t * 5 )+( u * (v/w)))

t1 = v/w;

t1=t1*u;

t2 = t*5;

t2 = t2+t1;

t3 = r/3;

t3 = t3+q;

t3 = t3+s;

t3  = t3-t2;

so  , 3 variables needed.
by Active (3k points)
0
what about q r s t u v w?

total variables are :- 10?
0
no , only three variables t1,t2 and t3 .. we will not consider q r s t u v w as in the result now we  r treating only t1 , t2 and t3 as variables nad rest other as constants

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,314 answers
198,358 comments
105,081 users