Compiler Design 2022 Question Paper — Government College of Engineeri…
The 2022 Compiler Design previous year question paper (Government College of Engineering and Technology, Jammu), with every question and its marks.
- University: Government College of Engineering and Technology, Jammu
- Subject: Compiler Design
- Course: Compiler Design
- Branch: Computer Science & Engineering
- Year: 2022
- Paper: end-term
- Duration: 180 minutes
- Total marks: 100
Instructions
- Attempt five questions in all, selecting at least two questions from each section.
- All questions carry equal marks.
Questions
SECTION-A
- Q1. Explain five properties of a compiler. Discuss the structure and phases of a compiler with the help of a neat diagram. Also explain the difference between a compiler and an interpreter. [20 marks]
- Q2. (a) What is a token in the context of lexical analysis and what information does it typically contain? Explain the difference between a lexeme and a token. Provide an example. (b) Why are finite automata (Deterministic Finite Automata- DFA or Non-deterministic Finite Automata- NFA) often used as the mathematical model for lexical analysis? [20 marks]
- Q3. Explain the parsing techniques with a hierarchical diagram. What are the problems associated with Top-down Parsing? [20 marks]
- Q4. Write notes on the following: (a) Properties of LR Parser. (b) Ambiguity with example. (c) Context-free Grammar. (d) Push-down Automata. [20 marks]
SECTION-B
- Q5. (a) What is syntax-directed translation (SDT) and how does it relate to semantic analysis? (b) What is the role of semantic analysis in identifying errors that are syntactically correct but semantically meaningless? [20 marks]
- Q6. (a) How is a symbol table used in semantic analysis? What are the different data structures used to implement a symbol table? (b) Explain different types of intermediate code representations. [20 marks]
- Q7. Explain what code optimization is in the context of compilers and why it is a crucial phase? Discuss the primary goals of code optimization and explain the inherent trade-offs involved in code optimization. [20 marks]
- Q8. (a) What is control and data flow analysis? Explain with example. (b) Explain the peep-hole optimization technique. [20 marks]
Related pages
Other years
- Compiler Design 2018 question paper — end-term
- Compiler Design 2018 question paper — end-term
- Compiler Design 2018 question paper — end-term
- Compiler Design 2018 question paper — end-term
- Compiler Design 2018 question paper — end-term