Compiler Design PYQ 2023-24 AKTU (KIT052) Question Paper
AKTU · BTECH · Semester 6 · Compiler Design · Session 2023-24 · PYQ
AKTU Compiler Design (KIT052) previous year question paper 2023-24 for B.Tech Semester 6. Covers Compiler Foundations, Lexical Analysis and Syntactic…
Open the interactive reader to study this resource on AcademicArk.
Compiler Design AKTU syllabus
- Unit 1: Compiler Foundations, Lexical Analysis and Syntactic Specification
- Unit 2: Basic Parsing Techniques and Automatic Construction of Efficient Parsers
- Unit 3: Syntax-Directed Translation and Intermediate Code
- Unit 4: Symbol Tables, Run-Time Administration and Error Recovery
- Unit 5: Code Generation and Code Optimization
Questions in Compiler Design AKTU PYQ 2023-24
- Q1a. Explain cross compiler with suitable example. (2 marks, 2023-24)
- Q1b. Construct regular expression to accept valid identifier containing letters, digits, and underscore. (2 marks, 2023-24)
- Q1c. Consider the following grammar. S -> aSB | d B -> b Compute the number of reduction steps taken by a bottom-up parser while accepting the string “aaaadbbbb”. (2 marks, 2023-24)
- Q1d. Construct the following grammar after removing left recursion: S -> Aa | b | ε A -> Ac | SAd | ε (2 marks, 2023-24)
- Q1e. Define the syntax directed definition (SDD) with suitable and simple example. (2 marks, 2023-24)
- Q1f. Construct the syntax tree for the following expression: (a*c)+b*((c*a)+d) (2 marks, 2023-24)
- Q1g. Compare between static and dynamic scope rule. (2 marks, 2023-24)
- Q1h. Write the short note of Activation Record with their fields. (2 marks, 2023-24)
- Q1i. Elaborate the design issues of code generation. (2 marks, 2023-24)
- Q1j. Compute the number of nodes in Directed Acyclic Graph (DAG) for the following C code segment executed in the sequence: a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f; (2 marks, 2023-24)
- Q2a. Demonstrate the process of compilation with the help of following input: c = a*b+10 (10 marks, 2023-24)
- Q2b. Illustrate the problems associated with top-down parsing. Consider some examples to explain how these problems can be resolved. (10 marks, 2023-24)
- Q2c. Illustrate the role of syntax directed translation in compiler design. Also explain how semantic actions are attached to the production with example. (10 marks, 2023-24)
- Q2d. Explore the various data structures used for the symbol table construction. (10 marks, 2023-24)
- Q2e. Construct target code for the following expression: x:=(a+b)*c+d/(a+b) (10 marks, 2023-24)
- Q3a. Construct minimized DFA: (10 marks, 2023-24)
- Q3b. Explore the phases of compiler with a suitable example. (10 marks, 2023-24)
- Q4a. Construct parsing table for the following grammar using LALR parser: S -> CC C -> aC | b (10 marks, 2023-24)
- Q4b. Verify that the following grammar is LL (1) S -> AaAb | BbBa A -> ε B -> ε (10 marks, 2023-24)
- Q5a. Consider the following grammar and give the syntax directed definition to construct parse tree for the input expression 4*7+3*9. E -> E+T | T T -> T*F | F F -> num. Also construct an annotated parse tree according to your syntax directed definition. (10 marks, 2023-24)
- Q5b. Determine the quadruples, triples, and indirect triples for the following expression: (x+y) * (y+z) + (x+y+z) (10 marks, 2023-24)
- Q6a. Explain the run-time storage allocation strategies with their merits and limitations. (10 marks, 2023-24)
- Q6b. Explain the various types of compile-time errors in phases of compiler. (10 marks, 2023-24)
- Q7a. Explain what constitutes a loop in a flow graph and how will do you do loop optimizations in code optimization of a compiler. (10 marks, 2023-24)
- Q7b. Explain the need of data flow analysis in code optimization. Design the following C code segments in flow graph: for(i=1; i<=5; i++) { sum=sum+a[i]; } (10 marks, 2023-24)
AKTU paper codes: BCS602
Compiler Design previous year papers
More Compiler Design resources
Browse all notes · Semester 6 notes · Compiler Design notes