Recent questions tagged intermediate-code

4 4 votes
1 answers 1 answer
873
873 views
Consider the following statements :$S1$: Automatic garbage collection is not essential to implement recursion.$S2$: Operator precedence parser falls under the category ...
1 1 vote
1 1 answer
587
587 views
the following intermediate best suited for derivation of common subexpression??????????a. qudraplesb.triplesc.treesd.postfix code explain plz
48 48 votes
5 answers 5 answers
17.8k
17.8k views
Consider the following intermediate program in three address codep = a - b q = p * c p = u * v q = p + qWhich one of the following corresponds to a static single assignme...
0 0 votes
1 1 answer
2.2k
2.2k views
Which of the following is correct?<ol style="list-style-type:upper-alpha"><li One of the purposes of using intermediate code in compilers is to improve the register allo...
0 0 votes
1 1 answer
1.8k
1.8k views
Please can anyone list the topics to study in this part. The syllabus only states basics of code generation and optimization. Anyone who had prepared gate earlier. What d...
0 0 votes
2 2 answers
2.0k
2.0k views
Which of the following is an advantage of $\text{'Triples'}$Statements can be moved aroundWastage of too much spaceSpace is not wastedTwo memory access per operation
0 0 votes
1 answers 1 answer
811
811 views
why x=a[i][j] and x=f(a,b) are not three address code..
1 1 vote
1 1 answer
1.3k
1.3k views
Translate the executable statements of the following Pascal Program into quadruples. Assume that integer and real values require four words each.repeat flag[i]:=true; whi...
14 14 votes
1 answers 1 answer
5.4k
5.4k views
Construct a DAG for the following set of quadruples:E:=A+BF:=E-CG:=F*DH:=A+BI:=I-CJ:=I+G
15 15 votes
3 answers 3 answers
3.6k
3.6k views
Is the following code template for the if-then-else statement correct? if not, correct it.$\text{if} \text{ expression then statement } 1$$\text{else statement }2$Templat...
3 3 votes
1 1 answer
1.8k
1.8k views
The least number of temporary variables required to create a $3$ address code sequence for the statement $L= P + R$ is ________.
2 2 votes
2 answers 2 answers
1.2k
1.2k views
Which of these is NOT true about Abstract Syntax Tree (AST)?An AST is usually the result of the syntax analysis phase of a compiler.AST has no impact on the final output...
0 0 votes
1 1 answer
2.8k
2.8k views
The issues in the design of Code generation are ________The issues in the design of code generation are due the what reason ?The compiler converts the source code by acce...
0 0 votes
1 1 answer
987
987 views
Which of the following class of statement usually produces no executable codes when compiled?Assignment Declaration Input and output statement Structural statements
0 0 votes
1 1 answer
2.1k
2.1k views
0 0 votes
1 answers 1 answer
699
699 views
The answer given was D but isn't array access not a TAC as the following link suggests:https://web.stanford.edu/class/archive/cs/cs143/cs143.1128/handouts/240%20TAC%20Exa...
0 0 votes
1 answers 1 answer
859
859 views
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 t...
1 1 vote
1 answers 1 answer
956
956 views
One of the purpose of using intermediate code in compilers is tomake parsing and semantic analysis simplerimprove error recovery and error reportingincrease the chances o...
0 0 votes
1 1 answer
1.5k
1.5k views
Which of the following is not a Three Address Code(TAC)return 0if $\mathrm{a}>\mathrm{b}$ goto c$a[i]=b$;none
1 1 vote
1 answers 1 answer
555
555 views
typechecking is done by :1. lexical analyser2. syntax analyser3. semantic analyser4. ICG
0 0 votes
1 1 answer
517
517 views
consider the above ICG,The number of nodes and edges in control-flow-graph constructed for the above code, respectively, are
1 1 vote
1 answers 1 answer
2.3k
2.3k views
Construct DAG for[a+a * (b-c) + [ (b-c) + d ].
2 2 votes
2 answers 2 answers
35.9k
35.9k views
Write Quadruples,Triples, and indirect Triples for the expression : (a+b) * (c+d) - (a+b+c)
3 3 votes
1 answers 1 answer
16.6k
16.6k views
Three address code invlovesexactly 3 addressesat most 3 addressesat least 3 addressesNo unary opeartors
29 29 votes
4 answers 4 answers
4.6k
4.6k views
Write $3$ address intermediate code (quadruples) for the following boolean expression in the sequence as it would be generated by a compiler. Partial evaluation of boolea...
1 1 vote
1 1 answer
838
838 views
A) a & b both are wrongB) a & b both are correctC) a is correct & b is wrongD) b is correct & a is wrongHow to solve such qstn??
1 1 vote
2 answers 2 answers
1.7k
1.7k views
2 2 votes
1 answers 1 answer
2.7k
2.7k views
During code generation, we need to do register allocation (kind of machine dependent stuff). So, I think it must be the part of Synthesis phase?