List out the various tasks to be performed by the Assembler in contrast to the Compiler.
Short DescriptionIT7501 – Compiler Engineering
Anna University
Question Paper Details
| University | Anna University |
|---|---|
| Degree | B.Tech. Information and Technology |
| Department | Information and Technology |
| Regulation | Regulation 2015 |
| Semester | 5 |
| Subject Code | IT7501 |
| Subject Name | Compiler Engineering |
| Exam Session | November / December 2021 |
| Duration | 3 Hours |
| Maximum Marks | 100 |
View Question Paper PDF
Access the previous year question paper for your examination preparation.
View / Download PDFHow to Use This Question Paper
- Understand the examination pattern.
- Practise questions within the allotted time.
- Identify topics that require further revision.
- Compare with other previous year papers.
More Question Papers
Browse other previous year question papers for this subject.
View All Subject Question PapersQuestion Paper Intelligence
Automatically extracted historical question data. Academic accuracy and examination rules require verification.
Part-wise extracted questions
Question type candidates
Section marks — arithmetic candidates
Examination marks pattern
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 5 | 13 | 65 |
| C | 1 | 15 | 15 |
Estimated time allocation
Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.
Section time budget
Optional-choice evidence
Detected alternatives only. Confirm the actual choice rules in the original question paper.
Question navigator
Extracted questions
Write a Lex program to count the total number of alphabets and numbers in the given input.
Other Or UnclassifiedIllustrate with an example how do you eliminate Left factoring and Left Recursion in a given grammar.
DiagramIdentify whether the following grammar is LL(1) or not: S-> iEtSS1|a S1-> eS|ε E-> b
Other Or UnclassifiedSource quality review required
Write down the rules behind type checking of compilers.
Other Or UnclassifiedConstruct a DAG for the expression : a+b+(a+b+(a+a+b+(a+b+a+b)))
DesignList out the parameters stored in the Symbol table for compilation process.
Short DescriptionCompare and contrast static versus dynamic storage allocation.
ComparisonDefine the term Usage Counts.
DefinitionWrite down the algorithm involved in partitioning the three address instructions into basic blocks.
Other Or Unclassifieda) i) Construct Epsilon NFA for the following regular expression and convert it into DFA using Subset Construction algorithm. (8) (aa*|bb*)abb ii) For the DFA constructed above, minimize the total number of states obtained. (5)
Other Or UnclassifiedSource quality review required
b) i) Construct Finite Automata for the following expression using Syntax Tree approach. (a|ε )*aab*(b|c)* (8) ii) Illustrate the various phases of the Compiler with a suitable example. (5)
Other Or UnclassifiedSource quality review required
a) Construct a Predictive parser and draw a parsing table for the following grammar: (13) S-> b|(T) T-> R R->S Check whether the given string (b(b(b))) belongs to the above grammar using Stack Implementation.
Other Or UnclassifiedSource quality review required
b) Construct CLR and LALR set of items for the following grammar: (13) SSS+|SS*|a Parse the String aa*aa*+ using CLR parsing table.
Other Or UnclassifiedSource quality review required
a) i) Write down the SDD for simple type declarations such as basic type and an array type. Draw suitable annotated parse tree and dependency graph for the following expressions. (9) a) double a, b, c, d b) int [ x ][y ] ii) Represent the following expression using Quadruples, Triples and Indirect Triples. a = b[i] + c[j] (4)
Other Or UnclassifiedSource quality review required
b) i) Write down the translation scheme (semantic rules) used to generate code for expressions and generate three address code for the following expression by drawing an annotated parse tree. (9) a=b*-c+d*e+f ii) Compare L-attributed definition with S-attributed definition with a suitable example. (4)
Other Or UnclassifiedSource quality review required
a) i) What is an Activation Record? Write a recursive code for Factorial computation and illustrate the possible activations that may happen for the code with an activation tree, illustrating each and every recursive call. Draw the growing stack of activation records where each activation record consists of local variables, parameters and control link. (8) ii) How access to Non local data takes place on the Stack? Details your views on it.(5)
Other Or UnclassifiedSource quality review required
b) i) Explain the functionality of Mark and Sweep Garbage collector with its algorithm in detail. (8) ii) Discuss about the working of Memory manager in Heap Management. (5)
Other Or UnclassifiedSource quality review required
a) i) What is the role of Instruction Selection and Register allocation in code generation. Illustrate the policies of allocating registers with an example. (8) ii) Write down the three address code for matrix multiplication. Construct a flow graph for your code and identify the loops in the graph appropriately. (5)
Other Or UnclassifiedSource quality review required
b) i) Explain how Peephole optimization can be applied to improve the code with an example. (5) ii) Generate the target code for the following three address statements assuming a and b are arrays and whose elements are 4-byte values. Also determine the cost of the final target code generated. (8) x = a[i] y = b[j] a[i] = y b[j] = x
Other Or UnclassifiedSource quality review required
Optimize the following three address code step by step locally as well as globally by eliminating common sub expressions, dead code, performing reduction in strength on induction variables and Copy Propagation. p = 0 j = 0 LL: t1 = i*4 t2 = A[t1] t3 = i*4 t4 = B[t3] t5 = t2*t4 t6 = t2 + t4 p = p+t5 + t6 j = j+1 if j<n goto LL *********************
Other Or UnclassifiedSource quality review required
Advanced Examination Analysis
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.