Skip to content

// Dr. A.P.J. Abdul Kalam Technical University, Uttar Pradesh / 2022

AKTU B.Tech — Compiler Design (KCS502), Semester 6, 2022

Compiler Design · KCS502 · B.Tech Computer Science and Engineering · Semester 6

Work through the questions

25 questions

No verified answers are available for this paper.

  1. Question 1(a)

    Descriptive2 marks

    Compilers

    What is the difference between parse tree and abstract syntax tree?

    No verified answer or solution is available for this question.

  2. Question 1(b)

    Descriptive2 marks

    Compilers

    Explain the problems associated with top-down Parser.

    No verified answer or solution is available for this question.

  3. Question 1(c)

    Descriptive2 marks

    Compilers

    What are the various errors that may appear in compilation process?

    No verified answer or solution is available for this question.

  4. Question 1(d)

    Descriptive2 marks

    Compilers

    What are the two types of attributes that are associated with a grammar symbol?

    No verified answer or solution is available for this question.

  5. Question 1(e)

    Descriptive2 marks

    Compilers

    Define the terms Language Translator and compiler.

    No verified answer or solution is available for this question.

  6. Question 1(f)

    Descriptive2 marks

    Compilers

    What is hashing? Explain.

    No verified answer or solution is available for this question.

  7. Question 1(g)

    Descriptive2 marks

    Compilers

    What is do you mean by left factoring the grammars? Explain.

    No verified answer or solution is available for this question.

  8. Question 1(h)

    Descriptive2 marks

    Compilers

    Define left recursion. Is the following grammar left recursive? E → E+E | E*E| a| b

    No verified answer or solution is available for this question.

  9. Question 1(i)

    Descriptive2 marks

    Compilers

    What is an ambiguous grammar? Give example.

    No verified answer or solution is available for this question.

  10. Question 1(j)

    Descriptive2 marks

    Compilers

    List down the conflicts during shift-reduce parsing.

    No verified answer or solution is available for this question.

  11. Question 2(a)

    Descriptive10 marks

    Compilers

    Construct the LALR parsing table for the given grammar S →BB B→ aB / b

    No verified answer or solution is available for this question.

  12. Question 2(c)

    Descriptive10 marks

    Compilers

    Write the quadruple, triple, indirect triple for the following expression (x + y)*(y + z) + (x + y + z)

    No verified answer or solution is available for this question.

  13. Question 2(d)

    Descriptive10 marks

    Compilers

    Discuss the following terms:

    No verified answer or solution is available for this question.

  14. Question 2(i)

    Descriptive10 marks

    Compilers

    Basic block ii. Next use information iii. Flow graph

    No verified answer or solution is available for this question.

  15. Question 2(e)

    Descriptive10 marks

    Compilers

    Construct predictive parse table for the following grammar. E → E + T/T T →T *F/F F →F /a/b

    No verified answer or solution is available for this question.

  16. Question 3(a)

    Descriptive10 marks

    Compilers

    Construct the SLR parse table for the following Grammar E→E+E E→E*E E→id

    No verified answer or solution is available for this question.

  17. Question 3(b)

    Descriptive10 marks

    Compilers

    Differentiate between stack allocation and heap allocation. 0 0

    No verified answer or solution is available for this question.

  18. Question 4(a)

    Descriptive10 marks

    Compilers

    Write syntax directed definition for a given assignment statement: S → id=E E → E+E E →E*E E→-E E → (E) E→id

    No verified answer or solution is available for this question.

  19. Question 4(b)

    Descriptive10 marks

    Compilers

    What are the advantages of DAG? Explain the peephole optimization.

    No verified answer or solution is available for this question.

  20. Question 5(a)

    Descriptive10 marks

    Compilers

    What do you understand by lexical phase error and syntactic error? Also suggest methods for recovery of errors.

    No verified answer or solution is available for this question.

  21. Question 5(b)

    Descriptive10 marks

    Compilers

    Discuss how induction variables can be detected and eliminated from the given intermediate code B2: i:= i+1 t1:=4*j t2:=a[t1] if t2<10 goto B2

    No verified answer or solution is available for this question.

  22. Question 6(a)

    Descriptive10 marks

    Compilers

    Test whether the grammar is LL(1) or not, and construct parsing table for it. S1AB / ε A1AC/0C B0S C1

    No verified answer or solution is available for this question.

  23. Question 6(b)

    Descriptive10 marks

    Compilers

    Distinguish between static scope and dynamic scope. Briefly explain access to non local names in static scope.

    No verified answer or solution is available for this question.

  24. Question 7(a)

    Descriptive10 marks

    Compilers

    What are the various issues in design of code generator & code loop optimization?

    No verified answer or solution is available for this question.

  25. Question 7(b)

    Descriptive10 marks

    Compilers

    Generate the three address code for the following code fragment. while(a>b) { if(c<d) x=y+z; else x=y-z; }

    No verified answer or solution is available for this question.

Keep preparing

Revisit another year or explore a different paper in the library.

More from this exam