Compiler Design (AL-703 (A)) - Important Questions
-
Unit 57 Marks High Priority Asked: 2024, 2025
Construct a Directed Acyclic Graph (DAG) for the following expression and show how common subexpressions are eliminated. Derive the optimized three-address code.
$a + a\times\left( b - c \right) + \left( b - c \right) \times d$
Core DAG and common-subexpression elimination question appearing repeatedly; representative of standard RGPV pattern (construct DAG and produce optimized three-address code).
-
Unit 57 Marks High Priority Asked: 2024
Define Directed Acyclic Graph (DAG). Construct a DAG for the following expression and indicate any opportunities for common-subexpression elimination and code reduction:
$p + p\times\left( q - r \right) + \left( q - r \right) \times s$
Representative DAG construction question asking definition plus construction for a given arithmetic expression; variant of the DAG pattern seen in past papers.
-
Unit 57 Marks High Priority Asked: 2024, 2025
Explain in detail loop optimization techniques. Illustrate with a clear example how loop-invariant code motion and induction variable elimination reduce execution cost.
Loop optimization is repeatedly examined; students should be ready to explain techniques and demonstrate transformations with an example.
-
Unit 55 Marks Medium Priority Asked: 2024
Discuss in brief about Constant Folding. Give a small example showing how constant folding transforms intermediate code.
Common local optimization frequently asked in short-answer form; expects definition, purpose and simple example.
-
Unit 57 Marks Medium Priority Asked: 2025
Explain in detail about storage allocation strategies used by compilers (static, stack-dynamic, heap-dynamic). Discuss advantages and disadvantages of each strategy.
Core topic in Unit 5 on storage and runtime organization; directly asked in recent papers (JUN 2025).
-
Unit 57 Marks High Priority Asked: 2024, 2025
Explain Activation Records (stack frames) and run-time storage organization. Describe different parameter passing methods and show the sequence of actions during a procedure call and return.
Activation records and procedure-call mechanism are central to run-time organization and recur in exam analytics; expect questions on parameter passing and call sequence.
-
Unit 57 Marks High Priority Asked: 2024, 2025
Explain peephole optimization and dead-code elimination with examples. Show how a small sequence of three-address code can be simplified by peephole rules.
Local code-improvement techniques (peephole, dead-code elimination, three-address code optimization) are standard and often combined in questions.
-
Unit 57 Marks Medium Priority Asked: 2025
Write a short note on procedure calls. Discuss calling conventions, parameter passing, return values and compiler support for nested/procedural scopes.
Direct past-paper short question style: procedure-call focused short note asked in JUN 2025; useful as a 7-mark conceptual question.
Quick Add to Notes
Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.
Create free accountHave an account? Log in
Notes Panel