PREVIOUS YEAR QUESTION PAPER

CS8602 – Compiler Design

Anna University

Regulation 2012 Semester 6 2019

Question Paper Details

University Anna University
Degree B.E. Computer Science and Engineering
Department Computer Science and Engineering
Regulation Regulation 2012
Semester 6
Subject Code CS8602
Subject Name Compiler Design
Exam Session April / May 2019
Duration 3 Hours
Maximum Marks 100

View Question Paper PDF

Access the previous year question paper for your examination preparation.

View / Download PDF

How to Use This Question Paper

More Question Papers

Browse other previous year question papers for this subject.

View All Subject Question Papers

Question Paper Intelligence

Automatically extracted historical question data. Academic accuracy and examination rules require verification.

10Extracted entries
100Maximum marks (metadata)
180Duration (minutes)
3Choice candidates

Part-wise extracted questions

Part A1
Part B9

Question type candidates

Other Or Unclassified9
Definition1

Section marks — arithmetic candidates

Part A20 marks
Part B80 marks

Examination marks pattern

PartRequired answersMarks per answerSection total
A10220
B51680

Estimated time allocation

Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.

Section time budget

Part A36.0 min
Part B144.0 min

Optional-choice evidence

Detected alternatives only. Confirm the actual choice rules in the original question paper.

Part B — Question 12: Option a · Option b
Part B — Question 14: Option a · Option b
Part B — Question 15: Option a · Option b

Question navigator

Extracted questions

Part A — 1

Define lexical analysis . Consider the grammar: S -> aSbS | bSaS | €. Show that the grammar is ambiguous for the sentence abab . What are Inherited and synthesized attributes? . How back patching process is used to avoid the problem of generating code in single pass? . What is register allocation and assignment? . Draw the expression tree labeled with Ershov Numbers for the expression: (a-b)+e*(c+d) . Define basic blocks and flow graph . Comment on Forward flow and backward flow problems . Define Affine Partitioning and blocking 10. What is data dependence? ie) omonrAn uk W

Definition

Source quality review required

Part B — 11a

(a) (i) Construct LALR Parsing Table for the following grammar (10) S > Aa|bAc| Be| bBa Avd Bod (ii) Construct Predictive Parsing Table for the following Grammar:

Other Or Unclassified

Source quality review required

Part B — 12a

(a) (i) Translate the expression - (a+b)*(at+b)-(at+b)*d_ into a sequence of three address statements and explain the representation with Quadruple, triple and Indirect triple (10) (ii) Draw the dependency graph and indicate the order of evaluation from the topological sort of ” real id1,id2,id3” (6)

Other Or Unclassified

Source quality review required

Part B — 12b

(b) Write down the semantic rules and label them using Back patching technique. Assume the address of the first instruction generated is 100. (16) a==b && (c= =d | | e= =f)

Other Or Unclassified

Source quality review required

Part B — 13a

(a) (i) What is tree translation scheme and Generate code by Tree rewriting for Intermediate code : afiJ=b+1 and explain (6) (ii) Generate optimal code using Dynamic Programming technique for the assignment statement x (ஊட * c) and explain. Assume unit instruction cost (10)

Other Or Unclassified

Source quality review required

Part B — 13OR

௫) Draw labeled expression tree for the Expression (a-b)+e * (ct+d) and Generate optimal code from this tree with only two registers available and explain (16)

Other Or Unclassified

Source quality review required

Part B — 14a

(a) (i) Explain constant propagation and partial redundancy elimination with suitabie example (10) (ii) Explain in detail about peephole optimization techniques with suitable example (6)

Other Or Unclassified

Source quality review required

Part B — 14b

(b) For the following flow graph, compute the definitions reaching each and every block (16) and explain the data flow analysis ENTRY வஹி 3 ॥ ॥ pais 1 ல oll உ ப்‌ > (28 டட ம்‌ d:=c-a NG d:=b+d b:=atb “| e:=c-a | d=a+b a= b*d et b: = a-d v EXIT

Other Or Unclassified

Source quality review required

Part B — 15a

(a).(i) Draw and explain about Iteration space, Data space, Processor space and mapping among them for the following program : (16) float z[50]: for(i=03i<5;i++) z[i+5]=z[il;

Other Or Unclassified

Source quality review required

Part B — 15b

(b).(i) Explain Data Re-use with its various types. (10) (6) (ii) What is the need for Parallelism? Explain about loop level parallelism?

Other Or Unclassified

Source quality review required

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.