Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for compiler-design
75
votes
10
answers
1
GATE CSE 2003 | Question: 18
In a bottom-up evaluation of a syntax directed definition, inherited attributes can always be evaluated be evaluated only if the definition is L-attributed be evaluated only if the definition has synthesized attributes never be evaluated
In a bottom-up evaluation of a syntax directed definition, inherited attributes canalways be evaluatedbe evaluated only if the definition is L-attributedbe evaluated only...
Kathleen
36.5k
views
Kathleen
asked
Sep 16, 2014
Compiler Design
gatecse-2003
compiler-design
syntax-directed-translation
normal
+
–
67
votes
4
answers
2
GATE CSE 2014 Set 3 | Question: 34
Consider the basic block given below. a = b + c c = a + d d = b + c e = d - b a = e + b The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are $6$ and $6$ $8$ and $10$ $9$ and $12$ $4$ and $4$
Consider the basic block given below. a = b + c c = a + d d = b + c e = d - b a = e + b The minimum number of nodes and edges present in the DAG representation of the abo...
go_editor
34.7k
views
go_editor
asked
Sep 28, 2014
Compiler Design
gatecse-2014-set3
compiler-design
code-optimization
directed-acyclic-graph
normal
+
–
69
votes
12
answers
3
GATE CSE 2016 Set 1 | Question: 19
Consider the following code segment. x = u - t; y = x * v; x = y + w; y = t - z; y = x * y; The minimum number of total variables required to convert the above code segment to static single assignment form is __________.
Consider the following code segment.x = u - t; y = x * v; x = y + w; y = t - z; y = x * y;The minimum number of total variables required to convert the above code segment...
Sandeep Singh
27.3k
views
Sandeep Singh
asked
Feb 12, 2016
Compiler Design
gatecse-2016-set1
compiler-design
static-single-assignment
normal
numerical-answers
+
–
5
votes
1
answer
4
Ullman (Compiler Design) Edition 2 Exercise 5.1 Question 1 (Page No. 309 - 310)
For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.1$, give annotated parse trees for the following expressions: $(3+4)\ast(5+6)n.$ $1\ast2\ast3\ast(4+5)n.$ $(9+8\ast(7+6)+5)\ast 4n.$
For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.1$, give annotated parse trees for the following expressions:$(3+4)\ast(5+6)n.$$1\ast2\ast3\ast(4+5)n.$$(9+8\ast(7+6)...
admin
40.4k
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
parsing
+
–
36
votes
5
answers
5
GATE CSE 2013 | Question: 48
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and one destination operand. Assume that all variables are dead after this code segment. c = ... while preserving correctness. What is the minimum number of spills to memory in the compiled code? 0 1 2 3
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and on...
Arjun
28.3k
views
Arjun
asked
Sep 24, 2014
Compiler Design
gatecse-2013
normal
compiler-design
target-code-generation
code-optimization
+
–
75
votes
8
answers
6
GATE CSE 2007 | Question: 53
Consider the following two statements: P: Every regular grammar is LL(1) Q: Every regular set has a LR(1) grammar Which of the following is TRUE? Both P and Q are true P is true and Q is false P is false and Q is true Both P and Q are false
Consider the following two statements:P: Every regular grammar is LL(1)Q: Every regular set has a LR(1) grammarWhich of the following is TRUE?Both P and Q are trueP is tr...
Kathleen
35.4k
views
Kathleen
asked
Sep 21, 2014
Compiler Design
gatecse-2007
compiler-design
grammar
normal
+
–
57
votes
11
answers
7
GATE CSE 2017 Set 1 | Question: 43
Consider the following grammar: stmt $\rightarrow$ if expr then expr else expr; stmt | $Ò$ expr $\rightarrow$ term relop term | term term $\rightarrow$ id | number id $\rightarrow$ a | b | c number $\rightarrow [0-9]$ where relop is a relational ... program if $e_1$ then $e_2$ else $e_3$ has $2$ control flow paths. $e_1 \rightarrow e_2$ and $e_1 \rightarrow e_3$.
Consider the following grammar:stmt $\rightarrow$ if expr then expr else expr; stmt | $Ò$expr $\rightarrow$ term relop term | termterm $\rightarrow$ id | numberid $\righ...
Arjun
20.2k
views
Arjun
asked
Feb 14, 2017
Compiler Design
gatecse-2017-set1
compiler-design
parsing
normal
numerical-answers
+
–
21
votes
4
answers
8
GATE CSE 2023 | Question: 1
Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the target hardware. S2: The back-end includes phases that are specific to the target hardware. S3: The back-end includes phases that are ... $\mathbf{S 3}$ are all TRUE. Only $\mathbf{S 1}$ and $\mathbf{S 3}$ are TRUE.
Consider the following statements regarding the front-end and back-end of a compiler.S1: The front-end includes phases that are independent of the target hardware.S2: The...
admin
14.7k
views
admin
asked
Feb 15, 2023
Compiler Design
gatecse-2023
compiler-design
compilation-phases
1-mark
+
–
2
votes
2
answers
9
Write Quadruples,Triples, and indirect Triples for the expression
Write Quadruples,Triples, and indirect Triples for the expression : (a+b) * (c+d) - (a+b+c)
Write Quadruples,Triples, and indirect Triples for the expression : (a+b) * (c+d) - (a+b+c)
LavTheRawkstar
30.3k
views
LavTheRawkstar
asked
Jun 25, 2016
Compiler Design
compiler-design
intermediate-code
three-address-code
+
–
4
votes
2
answers
10
Pankaj and Mythili were both asked to write the code to evaluate the following expression
Pankaj and Mythili were both asked to write the code to evaluate the following expression: $a - b + c/(a-b) + (a-b)^2 $ Pankaj writes the following code statements (Code A): print (a-b) + c/(a-b) ... Code B Code A uses more memory and is faster than Code B Code A uses more memory and is slower than Code B
Pankaj and Mythili were both asked to write the code to evaluate the following expression: $$a - b + c/(a-b) + (a-b)^2 $$Pankaj writes the following code statements (Code...
Arjun
95.8k
views
Arjun
asked
Aug 31, 2014
Compiler Design
compiler-design
normal
code-optimization
+
–
56
votes
3
answers
11
GATE CSE 2017 Set 1 | Question: 52
Consider the expression $(a-1) * (((b+c)/3)+d)$. Let $X$ be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture, in which only load and store ... memory operands and arithmetic instructions can have only register or immediate operands. The value of $X$ is _____________ .
Consider the expression $(a-1) * (((b+c)/3)+d)$. Let $X$ be the minimum number of registers required by an optimal code generation (without any register spill) algorithm ...
Arjun
19.1k
views
Arjun
asked
Feb 14, 2017
Compiler Design
gatecse-2017-set1
compiler-design
register-allocation
normal
numerical-answers
+
–
41
votes
7
answers
12
GATE CSE 2015 Set 2 | Question: 29
Consider the intermediate code given below. (1) i=1 (2) j=1 (3) t1 = 5 * i (4) t2 = t1 + j (5) t3 = 4 * t2 (6) t4 = t3 (7) a[t4] = -1 (8) j = j + 1 (9) if j <= 5 goto (3) (10) i = i +1 (11) if i < 5 goto (2) The number of nodes and edges in control-flow-graph constructed for the above code, respectively, are $5$ and $7$ $6$ and $7$ $5$ and $5$ $7$ and $8$
Consider the intermediate code given below.(1) i=1 (2) j=1 (3) t1 = 5 * i (4) t2 = t1 + j (5) t3 = 4 * t2 (6) t4 = t3 (7) a[t4] = -1 (8) j = j + 1 (9) if j <= 5 goto (3) ...
go_editor
25.5k
views
go_editor
asked
Feb 12, 2015
Compiler Design
gatecse-2015-set2
compiler-design
intermediate-code
normal
+
–
80
votes
9
answers
13
GATE CSE 2005 | Question: 61
Consider line number $3$ of the following C-program. int main() { /*Line 1 */ int I, N; /*Line 2 */ fro (I=0, I<N, I++); /*Line 3 */ } Identify the compiler’s response about this line while creating the object-module: No compilation error Only a lexical error Only syntactic errors Both lexical and syntactic errors
Consider line number $3$ of the following C-program.int main() { /*Line 1 */ int I, N; /*Line 2 */ fro (I=0, I<N, I++); /*Line 3 */ }Identify the compiler’s response ab...
Vikrant Singh
21.4k
views
Vikrant Singh
asked
Nov 12, 2014
Compiler Design
gatecse-2005
compiler-design
compilation-phases
normal
+
–
80
votes
7
answers
14
GATE CSE 2015 Set 1 | Question: 55
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $q + r / 3 + s - t * 5 + u * v/w$ is__________________.
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $q + r / 3 + s - t * 5 + u * v/w$ is_...
makhdoom ghaya
28.8k
views
makhdoom ghaya
asked
Feb 13, 2015
Compiler Design
gatecse-2015-set1
compiler-design
intermediate-code
normal
numerical-answers
static-single-assignment
+
–
83
votes
13
answers
15
GATE CSE 2013 | Question: 9
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit-production (i.e., of type $A \rightarrow \epsilon$ and $A \rightarrow a$) to parse a string with $n$ tokens? $n/2$ $n-1$ $2n-1$ $2^{n}$
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit-production (i.e., of type $A \rightarrow \epsilo...
Arjun
32.9k
views
Arjun
asked
Sep 23, 2014
Compiler Design
gatecse-2013
compiler-design
parsing
normal
+
–
64
votes
4
answers
16
GATE CSE 2006 | Question: 32, ISRO2016-35
Consider the following statements about the context free grammar $G = \left \{ S \rightarrow SS, S \rightarrow ab, S \rightarrow ba, S \rightarrow \epsilon \right \} $ $G$ is ambiguous $G$ produces all strings with equal number of $a$'s ... combination below expresses all the true statements about $G$? I only I and III only II and III only I, II and III
Consider the following statements about the context free grammar$$G = \left \{ S \rightarrow SS, S \rightarrow ab, S \rightarrow ba, S \rightarrow \epsilon \right \} $$$G...
Rucha Shelke
28.6k
views
Rucha Shelke
asked
Sep 18, 2014
Compiler Design
gatecse-2006
compiler-design
context-free-language
normal
isro2016
+
–
12
votes
4
answers
17
GATE CSE 2023 | Question: 27
Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block? $\text{B1: { }, B2: {a}, B3: {a}, B4: {a}}$ $\text{B1: {i, j}, B2: {a}, B3: {a}, B4: {i}}$ $\text{B1: {a, i, j}, B2: {a, i, j}, B3: {a, i}, B4: {a}}$ $\text{B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j}}$
Consider the control flow graph shown.Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?$\text{B1: { }, B...
admin
11.6k
views
admin
asked
Feb 15, 2023
Compiler Design
gatecse-2023
compiler-design
live-variable-analysis
2-marks
+
–
50
votes
3
answers
18
GATE CSE 2009 | Question: 42
Which of the following statements are TRUE? There exist parsing algorithms for some programming languages whose complexities are less than $\Theta(n^3)$ A programming language which allows recursion can be implemented with static storage allocation. No L-attributed ... both source language and intermediate code level. I and II I and IV III and IV I, III and IV
Which of the following statements are TRUE?There exist parsing algorithms for some programming languages whose complexities are less than $\Theta(n^3)$A programming langu...
Kathleen
18.2k
views
Kathleen
asked
Sep 22, 2014
Compiler Design
gatecse-2009
compiler-design
parsing
normal
+
–
54
votes
4
answers
19
GATE CSE 2015 Set 1 | Question: 8
For computer based on three-address instruction formats, each address field can be used to specify which of the following: (S1) A memory operand (S2) A processor register (S3) An implied accumulator register Either $S1$ or $S2$ Either $S2$ or $S3$ Only $S2$ and $S3$ All of $S1$, $S2$ and $S3$
For computer based on three-address instruction formats, each address field can be used to specify which of the following:(S1) A memory operand(S2) A processor register(S...
makhdoom ghaya
18.7k
views
makhdoom ghaya
asked
Feb 12, 2015
Compiler Design
gatecse-2015-set1
compiler-design
intermediate-code
normal
+
–
21
votes
7
answers
20
GATE CSE 2021 Set 2 | Question: 3
Consider the following $\text{ANSI C}$ program: int main () { Integer x; return 0; } Which one of the following phases in a seven-phase $C$ compiler will throw an error? Lexical analyzer Syntax analyzer Semantic analyzer Machine dependent optimizer
Consider the following $\text{ANSI C}$ program:int main () { Integer x; return 0; }Which one of the following phases in a seven-phase $C$ compiler will throw an error?Lex...
Arjun
17.0k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set2
compilation-phases
compiler-design
1-mark
+
–
Page:
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register