Skip to content
SmartFigureEdu

CS 3501 Compiler Design question paper, November/December 2024

Question Paper Code : 40926

B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2024.

Fifth Semester

Computer Science and Engineering

CS 3501 — COMPILER DESIGN

(Common to : )

(Regulations 2021)

Time : Three hoursMaximum : 100 marks

Answer ALL questions.

PART A — (10 × 2 = 20 marks)

  1. 1.

    State the term interpreter.

  2. 2.

    Write the major task of lexical analyzer.

  3. 3.

    Mention the role of parser.

  4. 4.

    Specify the error recovery in YAAC.

  5. 5.

    Express the construction of syntax tree.

  6. 6.

    Source-language expression is x + y * z and translate it into the sequence of three-address code instructions.

  7. 7.

    Differentiate between static and dynamic storage allocation.

  8. 8.

    Define flowgraph.

  9. 9.

    Identify the causes of redundancy.

  10. 10.

    Write the principal sources of optimization.

PART B — (5 × 13 = 65 marks)

  1. 11.
    (a)

    Draw the phases of compiler and describe each phase of it.

  2. Or
  3. (b)

    Define finite automata. Explain the two types of finite automata with suitable example.

  4. 12.
    (a)

    Construct a parse tree for the input string starting from the root and creating the nodes of the parse tree in preorder using top-down parsing.

  5. Or
  6. (b)

    Write the error handling process and recovery in syntax analyzer.

  7. 13.
    (a)

    Summarize how to construct syntax trees for simple expressions.

  8. Or
  9. (b)

    Discuss about the things behind type checking in intermediate code generation.

  10. 14.
    (a)

    With neat diagram illustrate typical subdivision of run-time memory into code and data areas.

  11. Or
  12. (b)

    Elaborate the issues in the designing of a code generator.

  13. 15.
    (a)

    State and explain peephole optimization as an effective technique to improve the locally target code.

  14. Or
  15. (b)

    Write short notes on optimization of basic blocks using Directed Acyclic Graph (DAG).

PART C — (1 × 15 = 15 marks)

  1. 16.
    (a)

    "A Syntax-Directed Definition (SDD) is a context-free grammar together with attributes and rules". - Justify the statement.

  2. Or
  3. (b)

    Write a review on the "recent trends in compiler design".


Other CS3501 papers