B.TechSemester 62024-25Compilar DesignBCS602

Compilar Design (BCS602) - AKTU Question Paper 2024-25

B.Tech · Semester 6 · Free PDF Download

This is the official AKTU Compilar Design Previous Year Question Paper for B.Tech Semester 6, academic session 2024-25. Published by Dr. A.P.J. Abdul Kalam Technical University (AKTU/UPTU), Lucknow. Free PDF download — no login required.

Course:B.Tech
Semester:Semester 6
Session:2024-25
University:AKTU / UPTU

Rate this paper

Questions Asked in 2024-25

Compilar Design (BCS602) — extracted question text · 70 marks · 3 Hours

Section AAttempt all questions in brief. 02 x 7 = 14
  • a
    Differentiate between phases and passes of a compiler
  • b
    State any two differences between top-down and bottom-up pars ing
  • c
    Mention the difference between inherited and synthesized attr ibutes
  • d
    Explain the role of a hash table in implementing a symbol tab le
  • e
    What is the Finite S tate Machines (FSM)? Design a FSM that accepts all strings of a and b containing even number of a’s and odd number of b’s
  • f
    Write a note on Lexical and Syn tactic structure of a programming language
  • g
    What is machine-independ ent code optimization?
Section BAttempt any three of the following: 07 x 3 = 21
  • a
    Explain in detail the process of compilation. Illustrate the ou tput of each phase of compilation of the input “a = (b + c)*(b + c)* 2”
  • b
    Using rightmost derivations o r the derivation trees show that the grammar with following production rules is ambiguous S aSbS | bSaS | ε
  • c
    Analyze the role of symbol tab les in different phases of compilation. How does symbol table interact with lexical, syntax, and semantic analyzers?
  • d
    Given the grammar: S → Aa | bAc | Bc | bBa Construct the SLR parsing table and determine whether any conflicts occur
  • e
    Semantic errors are often difficult to detect. Explain diffe rent types of semantic errors with examples and how a compiler detects them during semantic analysis
Section CAttempt any one part of the following: 07 x 1 = 07
  • a
    Construct LL(1) parsing table for the following grammar B bBc | f
  • b
    Explain the major design issues in code generation. How do t hese issues impact the performance of a compiler?
  • a
    Parse the input string (a,(a, a)) using shift reduce parser
  • b
    Discuss the optimization techniques used at the basic block level. Explain with an example how a basic block can be optimized
  • a
    Write Quadruple, Triple, and t hree address code for the expression
  • b
    Give various types of three address statements used for diff erent programming language constructs such as assignment, jump, procedure calls, array statements etc
  • a
    What are Static and Dynamic Scope Rules? How are the activat ion records used in implementation of recursive calls of a procedure/function
  • b
    Generate a three address code for the following code segment
  • c
    = 0;
    while (c<5)
      {
        if (a < b) then
          x++;
       else
         goto p;
       c++;
       }
    p: printf(”Not Done”)
  • a
    What are the principle sources of optimization of code? How the DAG is used in common sub-expression elimination? Discuss in details
  • b
    Give a classification of various errors and discuss each cla ss of errors with examples

Question text is extracted from the official AKTU question paper PDF above. Check the original PDF for equations, diagrams and complete wording. Extracted: 2026-08-23.