Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged three-address-code
0
votes
0
answers
1
3 address code
Consider the following 3-address code given below. START EXIT Match the following (I)Number of nodes in control flow graph (P)4 (II)Number of edges in control flow graph (Q)5 (III) Number of basic block in control flow graph (R)7 (IV) Number of control block in control flow graph (T)7
Consider the following 3-address code given below.STARTEXITMatch the following(I)Number of nodes in control flow graph (P)4(II)Number of edges in control ...
24aaaa23
215
views
24aaaa23
asked
Oct 2, 2023
Compiler Design
compiler-design
three-address-code
+
–
1
votes
0
answers
2
Unacademy AIMT 1
The correct answer given is 3.
The correct answer given is 3.
TusharKumar
609
views
TusharKumar
asked
Dec 23, 2022
Compiler Design
compiler-design
three-address-code
intermediate-code
+
–
0
votes
0
answers
3
made easy test series
Caption
Caption
Himanshu555
399
views
Himanshu555
asked
Oct 24, 2022
Compiler Design
made-easy-test-series
three-address-code
grammar
+
–
1
votes
1
answer
4
Directed acyclic graph
Consider the following three address code: T1= a+b T2= c+d T3=a-b T4= T1+T3 T5= T2+T1 T6 = T5+T4 T7 = c + T6 Number of nodes and edges in DAG of the above code? If we'll do simplification , then T4 would be T4 = a+b+a-b => a+a , after this simplification T3 is not used anywhere in the program, so it can be eliminated or we'll include it in DAG??
Consider the following three address code:T1= a+bT2= c+dT3=a-bT4= T1+T3T5= T2+T1T6 = T5+T4T7 = c + T6Number of nodes and edges in DAG of the above code?If we'll do simpli...
Ankita87077
1.0k
views
Ankita87077
asked
Oct 27, 2021
Compiler Design
compiler-design
intermediate-code
three-address-code
+
–
1
votes
1
answer
5
Compiler Design (register allocation)
In such questions, In which it is asked " minimum number of registers required for executing this three address code without spilling", can we apply code motion optimization or not? As in a question of made easy test series : T1 = a; ... = R1} So,which one is correct, made easy one or second one applying code motion? Can anybody please clarify this.
In such questions, In which it is asked " minimum number of registers required for executing this three address code without spilling", can we apply code motion optimizat...
Ankita87077
528
views
Ankita87077
asked
Oct 27, 2021
Compiler Design
compiler-design
intermediate-code
three-address-code
made-easy-test-series
+
–
1
votes
1
answer
6
3-Address Code Generation
Hi Everyone, For this the Given Answer is 5, I got 4. I am now confused about how the 3 address code is generated here.
Hi Everyone,For this the Given Answer is 5, I got 4. I am now confused about how the 3 address code is generated here.
Nihal Singh
1.5k
views
Nihal Singh
asked
Oct 4, 2021
Compiler Design
compiler-design
three-address-code
static-single-assignment
test-series
+
–
1
votes
0
answers
7
Ullman (Compiler Design) Edition 2 Exercise 6.5 Question 2 (Page No. 399)
As in Ada, suppose that each expression must have a unique type, but that from a subexpression, by itself, all we can deduce is a set of possible types. That is, the application of function ... of the overall expression is determined, proceeds top-down to determine attribute $unique$ for the type of each subexpression.
As in Ada, suppose that each expression must have a unique type, but that from a subexpression, by itself, all we can deduce is a set of possible types. That is, the app...
admin
1.0k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
8
Ullman (Compiler Design) Edition 2 Exercise 6.5 Question 1 (Page No. 398)
Assuming that function $widen$ in Fig. $6.26$ can handle any of the types in the hierarchy of Fig. $6.25(a)$, translate the expressions below. Assume that c and d are characters, $s$ and $t$ are short integers, $i$ and $j$ are integers, and $x$ is a float. $x=s+c$ $i=s+c$ $x=(s+c)\ast(t+d)$
Assuming that function $widen$ in Fig. $6.26$ can handle any of the types in the hierarchy of Fig. $6.25(a)$, translate the expressions below. Assume that c and d are cha...
admin
691
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
9
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 9 (Page No. 386)
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[3,4,5]$ $A[1,2,7]$ $A[4,3,9]$ if $A$ is stored in column-major order.
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. ...
admin
527
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
1
answer
10
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 8 (Page No. 386)
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[3,4,5]$ $A[1,2,7]$ $A[4,3,9]$
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. ...
admin
838
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
11
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 7 (Page No. 386)
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[4,5]$ $A[10,8]$ $A[3,17]$ if A is stored in column-major order.
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starti...
admin
906
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
1
answer
12
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 6 (Page No. 386)
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[4,5]$ $A[10,8]$ $A[3,17]$
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starti...
admin
534
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
13
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 5 (Page No. 385 - 386)
Generalize formula $(6.7)$ to multidimensional arrays, and indicate what values can be stored in the symbol table and used to compute offsets. Consider the following cases: An array $A$ of two dimensions, in row-major form. The first ... $h_{j}$.The same as $(c)$ but with the array stored in column-major form.
Generalize formula $(6.7)$ to multidimensional arrays, and indicate what values can be stored in the symbol table and used to compute offsets. Consider the following case...
admin
347
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
14
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 4 (Page No. 385)
Revise the translation of Fig. $6.22$ for array references of the Fortran style, that is, $id[E_{1}, E_{2},\cdot\cdot\cdot,E_{n}]$ for an $n-$dimensional array.
Revise the translation of Fig. $6.22$ for array references of the Fortran style, that is, $id[E_{1}, E_{2},\cdot\cdot\cdot,E_{n}]$ for an $n-$dimensional array.
admin
362
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
15
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 3 (Page No. 385)
Use the translation of Fig. $6.22$ to translate the following assignments: $x=a[i]+b[j]$ $x=a[i][j]+b[i][j]$ $x=a[b[i][j]][c[[k]]$
Use the translation of Fig. $6.22$ to translate the following assignments: $x=a[i]+b[j]$$x=a[i][j]+b[i][j]$$x=a[b[i][j]][c[[k]]$
admin
681
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
16
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 2 (Page No. 384)
Add to the translation of Fig. $6.19$ rules for the following productions: $E\rightarrow E_{1}\ast E_{2}$ $E\rightarrow + E_{1}\:$(unary plus)
Add to the translation of Fig. $6.19$ rules for the following productions:$E\rightarrow E_{1}\ast E_{2}$$E\rightarrow + E_{1}\:$(unary plus)
admin
438
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
17
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 1 (Page No. 384)
Add to the translation of Fig. $6.19$ rules for the following productions: $E\rightarrow E_{1}\ast E_{2}$ $E\rightarrow + E_{1}\:$(unary plus)
Add to the translation of Fig. $6.19$ rules for the following productions:$E\rightarrow E_{1}\ast E_{2}$$E\rightarrow + E_{1}\:$(unary plus)
admin
583
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
intermediate-code
three-address-code
descriptive
+
–
0
votes
0
answers
18
Ullman (Compiler Design) Edition 2 Exercise 6.3 Question 2 (Page No. 378)
Extend the handling of field names in Fig. $6.18$ to classes and single-inheritance class hierarchies. Give an implementation of class $Enu$ that allows linked symbol tables, so that a subclass can ... inherited fields. Inherited fields must maintain the relative addresses they were assigned in the layout for the superclass.
Extend the handling of field names in Fig. $6.18$ to classes and single-inheritance class hierarchies. Give an implementation of class $Enu$ that allows linked symbol tab...
admin
477
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
intermediate-code
descriptive
+
–
0
votes
0
answers
19
Ullman (Compiler Design) Edition 2 Exercise 6.3 Question 1 (Page No. 378)
Determine the types and relative addresses for the identifiers in the following sequence of declarations: float x; record { float x; float y; } p; record { int tag; float x; float y; } q;
Determine the types and relative addresses for the identifiers in the following sequence of declarations:float x; record { float x; float y; } p; record { int tag; float ...
admin
1.2k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
intermediate-code
descriptive
+
–
0
votes
1
answer
20
Ullman (Compiler Design) Edition 2 Exercise 6.2 Question 3 (Page No. 370)
Show how to transform a three-address code sequence into one in which each defined variable gets a unique variable name.
Show how to transform a three-address code sequence into one in which each defined variable gets a unique variable name.
admin
1.7k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
intermediate-code
descriptive
+
–
1
votes
1
answer
21
Ullman (Compiler Design) Edition 2 Exercise 6.2 Question 2 (Page No. 370)
Translate the following arithmetic expression into: $a=b[i]+c[j]$ $a[i]=b\ast c-b\ast d$ $x=f(y+1)+2$ $x=\ast p + \&y$ A Syntax tree Quadruples Triples Indirect triples
Translate the following arithmetic expression into:$a=b[i]+c[j]$$a[i]=b\ast c-b\ast d$$x=f(y+1)+2$$x=\ast p + \&y$ A Syntax treeQuadruplesTriplesIndirect triples
admin
7.8k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
intermediate-code
descriptive
+
–
0
votes
1
answer
22
Ullman (Compiler Design) Edition 2 Exercise 6.2 Question 1 (Page No. 370)
Translate the arithmetic expression $a + -(b + c)$ into: A syntax tree. Quadruples. Triples. Indirect triples
Translate the arithmetic expression $a + -(b + c)$ into:A syntax tree.Quadruples.Triples.Indirect triples
admin
10.5k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
intermediate-code
descriptive
+
–
0
votes
1
answer
23
Ullman (Compiler Design) Edition 2 Exercise 6.1 Question 2 (Page No. 363)
Construct the DAG and identify the value numbers for the subexpressions of the following expressions, assuming $+$ associates from the left. $a+b+(a+b)$ $a+b+a+b$ $a+a+((a+a+a+(a+a+a+a))$
Construct the DAG and identify the value numbers for the subexpressions of the following expressions, assuming $+$ associates from the left.$a+b+(a+b)$$a+b+a+b$$a+a+((a+a...
admin
4.7k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
directed-acyclic-graph
descriptive
+
–
1
votes
2
answers
24
Ullman (Compiler Design) Edition 2 Exercise 6.1 Question 1 (Page No. 362)
Construct the DAG for the expression $((x + y)-((x + y)\ast(x -y))) + ((x+y)\ast(x-y))$
Construct the DAG for the expression$((x + y)-((x + y)\ast(x -y))) + ((x+y)\ast(x-y))$
admin
2.5k
views
admin
asked
Sep 7, 2019
Compiler Design
ullman
compiler-design
three-address-code
directed-acyclic-graph
descriptive
+
–
0
votes
1
answer
25
Ullman (Compiler Design) Edition 2 Exercise 2.8 Question 2 (Page No. 105)
The programming language C does not have a boolean type. Show how a C compiler might translate an if-statement into three-address code.
The programming language C does not have a boolean type. Show how a C compiler might translate an if-statement into three-address code.
admin
323
views
admin
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
three-address-code
+
–
0
votes
0
answers
26
Ullman (Compiler Design) Edition 2 Exercise 2.8 Question 1 (Page No. 105)
For-statements in C and Java have the form: for $( expr_l ; expr_2 ; expr_3 ) stmt$ The first expression is executed before the loop; it is typically used for initializing the loop index. The second expression is a test made before ... $2.43$ .
For-statements in C and Java have the form:for $( expr_l ; expr_2 ; expr_3 ) stmt$The first expression is executed before the loop; it is typically used for initializing ...
admin
300
views
admin
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
three-address-code
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register