Вы находитесь на странице: 1из 20

Index

S.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Responsibility of Faculty Faculty Objective Academic Calendar (2011 2012) Course Syllabus Lecture Delivery Plan (Blowup) Progress Review of LDP Time Table Student List Previous Year Paper Tutorial Sheets/Assignment Sheets Class Test Papers with solutions Identification of week students (monthly) Lecture Notes CD of course file Topics

FACULTY OBJECTIVE

I look forward to a challenging career to contribute the best of my knowledge, skill and ability in the uplifting of institution and my students. My objectives for current academic session are: To complete the entire syllabus in time. Giving personal attention and extra time to weak students to improve their performance and attain good result. Creating an environment in which students can ask questions freely and make their concepts clear. To obtain 100% result. To give tips to students for their personality development also. To arrange presentation on the subject topics. To have interaction with every student and discuss their problems.

Responsibilities of faculty
1. Presession
To take charge after subject allocation. To analyze and modify the lesson plan and teaching schedule. To collect necessary materials required for the subject allocation and inform PC about the requirement. If any. To convey the forthcoming requirements of concerned lab to PC. Preparation of academic of the coming session that is quizzes, assignments, tutorial sheets.

2. During session
To follow the lesson plan and teaching schedule. To adopt a suitable methodology and well prepare for the lecture. To follow the academic schedule and guidelines provided by the academic council and the university To inform the class advisor periodically about the student's performance and attendance etc. To promote curricular, extra curricular and co-curricular activities. To maintain and periodic display of student's performance records whenever required.

3. Post session
To compile the academic records & attendance and inform the concerned Class advisor. To take appropriate actions for that students whose attendance is not compiled due to any reasons.

4. General
To be mentally alert emotionally sound & socially effective. He should follow teacher's code of conduct.

SYLLABUS COMPILER DESIGN (ECS-603)


Unit-I Introduction to Compiler, Phases and passes, Bootstrapping, Finite state machines and regular expressions and their applications to lexical analysis, Implementation of lexical analyzers, lexical-analyzer generator, LEX-compiler, Formal grammars and their application to syntax analysis, BNF notation, ambiguity, YACC. The syntactic specification of programming languages: Context free grammars, derivation and parse trees, capabilities of CFG. Unit-II Basic Parsing Techniques: Parsers, Shift reduce parsing, operator precedence parsing, top down parsing, predictive parsers Automatic Construction of efficient Parsers: LR parsers, the canonical Collection of LR(0) items, constructing SLR parsing tables, constructing Canonical LR parsing tables, Constructing LALR parsing tables, using ambiguous grammars, an automatic parser generator, implementation of LR parsing tables, constructing LALR sets of items. Unit-III Syntax-directed Translation: Syntax-directed Translation schemes, Implementation of Syntaxdirected Translators, Intermediate code, postfix notation, Parse trees & syntax trees, three address code, quadruple & triples, translation of assignment statements, Boolean expressions, statements that alter the flow of control, postfix translation, translation with a top down parser. More about translation: Array references in arithmetic expressions, procedures call, declarations, case statements. Unit-IV Symbol Tables: Data structure for symbols tables, representing scope information. RunTime Administration: Implementation of simple stack allocation scheme, storage allocation in block structured language. Error Detection & Recovery: Lexical Phase errors, syntactic phase errors semantic errors. Unit-V Introduction to code optimization: Loop optimization, the DAG representation of basic blocks, value numbers and algebraic laws, Global Data-Flow analysis. References: Aho, Sethi & Ullman, "Compiler Design", Addision Wesley.

LECTURE WISE SCHEDULE (BLOW UP)

COURSE: B.Tech. YEAR: 3rd SEM : VI SUBJECT NAME & CODE: Compiler Design (ECS-603) NAME OF FACULTY: Jyoti Bajpai

Session : 2011-2012 L T P 4 1 1

Lect. No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Unit

Topic

Unit-1

Introduction to Compiler, Phases and passes. Bootstrapping, Finite state machines . Regular expressions and their applications to lexical analysis. Implementation of lexical analyzers. Lexical-analyzer generator, LEX-compiler. Formal grammars and their application to syntax. analysis. BNF notation, ambiguity. YACC. The syntactic specification of programming languages: Context free grammars. Derivation and parse trees, capabilities of CFG. Basic Parsing Techniques: Parsers. Shift reduce parsing. Operator precedence parsing. Top down parsing. Predictive parsers. Automatic Construction of efficient Parsers: LR parsers. The canonical Collection of LR(0) items. Constructing SLR parsing tables. Constructing Canonical LR parsing tables. Constructing LALR parsing tables. Using ambiguous grammars, an automatic parser generator. Implementation of LR parsing tables. Constructing LALR sets of items. Syntax-directed Translation: Syntax-directed Translation schemes. Implementation of Syntaxdirected Translators. Intermediate code, postfix notation. Parse trees & syntax trees Three address code, quadruple & triples. Translation of assignment statements, Boolean expressions. Statements that alter the flow of control Postfix translation, translation with a top down parser. About translation: Array references in arithmetic

References 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Unit-2

24 25 26 27 28 29 30 31 32

Unit-3

1 1 1 1 1 1 1 1 1

33 34 35 36 37 Unit-4 38 39 40 41 42 43 44 45 46

expressions. Procedures call, declarations. Case statements. Symbol Tables: Data structure for symbols tables. Representing scope information. Run-Time Administration: Implementation of simple stack allocation scheme Storage allocation in block structured language. Error Detection & Recovery: Lexical Phase errors. Syntactic phase errors semantic errors. Introduction to code optimization Loop optimization. The DAG representation of basic blocks. Value numbers. Algebraic laws. Global Data-Flow analysis.

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Unit-5

Progress Review Lecture Delivery


Course : B.Tech Semester : 6th Session : 2011-2012 Subject Name & Code: Compiler Design (ECS-603) Name of Faculty: Jyoti Bajpai
Lect. No. Date Topic Sub Topic Remarks

Time Table

Name of Faculty: Jyoti Bajpai Subject: Compiler Design (ECS-603)

GLA Group of Institutions


Time Table : Odd Semester,
Day/Time MON TUE WED THU FRI SAT 1 8:209:15 2 9:1510:10

(w.e.f. 01.08.2009) Teacher- Ms.Deepali Singh


3 10:1011:05 4 11:0512:00 5 12:0012:55 6 12:5501:50 3B/3L6 3B1/2T2 3A/3L5 3A/3L5 3B/3L7 3A1/CSLab3 3B2/CSLab4 3A/3L6 3B/3L6 7 01:5002:45 8 02:453:40 3A/3L5

3A2/MCALab1 3B1/MCALab1 Test 3A2/T3 3B2/T3 Test 3B/3L5 3A1/MT1

LIST OF STUDENTS

GLA INSTITUTE OF TECHNOLOGY & MANAGEMENT


SUBJECT: COMPILER DESIGN
R No. Student Name R No.

SECTION: B
Student Name

LIST OF STUDENTS
GLA INSTITUTE OF TECHNOLOGY & MANAGEMENT
SUBJECT: COMPILER DESIGN
R No. Student Name R No.

SECTION: A
Student Name

1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22

Abhishek Agrawal Afroj Ahmad Ajay Kumar Soni Akanksha Mishra Akanksha Singh Amarendra Swaroop Amit Agrawal Amit Kumar Singh Amit Kumar Amit Yadav Annand Sarat Ananya Pandey Ankit Bansal Ankit Yadav Anurag Singhal Anusha Tripathi Apurva Kumar Aarjun singh kachhwah Arun Kaushik Ashish Kumar Ashutosh Yadav

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

Bhumika Wadhwa Bhupendra Pratap Singh Deepti Chaudhary Dharmendra Singh Dhirendra Kumar Tiwari Divya Sharma Durgesh Kumar Singh Gajendra Singh Rajput Gaurav Agrawal Gaurav Sharma Gaurav Yadav Gitika Harshit Agarwal Hemang Goyal Ishwar Khandelwal Jai Prakash Singh Kapil Sharma Kaptan Singh Kaushik Dimpal Anchal Dwivedi Kuldeep Varshney

Tutorial Sheets

Tutorial sheet-1
Department: Computer Science Semester: 6th Subject: Compiler Design Course: B.Tech. Session:2011-2012 Code: ECS-603

Ques1: What are phases of compiler? Explain the function of each in brief? Ques2: Construct NFA to DFA for the regular expression (a|b)*ab*a. Ques3: Give Thompsons construction algorithm. Using this algorithm, convert the following regular expression into NFA : (a|b)*a(a|b) Ques4: Discuss how YACC can be used to generate a parser. Also. Explain the formate of its input specification file. Ques5: Discuss the action taken by every phase of the compiler on the following string: A: = B * C + D / E Ques6: Explain cross compiler. Suppose you have a working C compiler on machine A. Discuss the steps you would take to create a working compiler for another language C on machine B. Ques7: Write short note on : Context free grammar. Ques8: Explain Bootstrapping in detail. Ques9: Describe the technique used for reducing the number of passes. Ques10: How is finite automata useful for lexical analysis? Show that the following regular expression are same by construction optimized DFA: (i) (a/b)* (ii) (a*/b)* (iii) (a/b*)*

Tutorial sheet-2
Department: Computer Science Semester: 6th Subject: Compiler Design Course: B.Tech. Session:2011-2012 Code: ECS-603

Ques1: State the problem associated with TOP-DOWN parsing. State and eliminate the problem associated with following grammar for Top-Down parsing. EE+T|T TT*F|F F(E)|id

Ques2: Define CLOSURE(I) and GOTO(I,X) functions. Construct the sets of LR(0) items for the following grammar: EE+E| E*E| (E)| id

Ques3: Construct LALR(1) parsing table for the following grammar: DL:T LL,id / id Tnum

Ques4: Explain shift reduce parsing and operator precedence parsing.

Ques5: What do you understand by left factoring and how it is eliminated?

Ques6: Find FIRST and FOLLOW of the following grammar: ETE E+TE TFT T*TE F(E)/id

Ques7: Give the algorithm for computing precedence function.

Ques8: Discuss the algorithm for computation of the sets of LR(1) items.

Ques9: Write short note on: recursive decent parsing.

Ques10: What is the difference between SLR parser and CLR parser.

Tutorial sheet-3
Department: Computer Science Semester: 6th Subject: Compiler Design Course: B.Tech. Session:2011-2012 Code: ECS-603

Ques1: Explain the following categories of intermediate codes: (i) Three-address codes (ii) Quadruples (iii) Triples Ques2: Translate the expression: A:= -B*(C+D)|E into Quadruples and Triples representation. Ques3: Consider the following code fragment generate three address code for it. for(i=1;i<=10;i++) if(a<b) then x=y+z Ques4: Discuss in details about Syntax directed translation schemes, parse tree and syntax trees. Ques5: Explain the Backpatching. Also generate three-address code for the following program segment: While (a<c and b<d) do If a=1 then c=c+1; Else While a<=d do a=a+3; Ques6: What do you mean by Translation? Explain its types also.

Tutorial sheet-4
Department: Computer Science Semester: 6th Subject: Compiler Design Course: B.Tech. Session:2011-2012 Code: ECS-603

Ques1: What are the various storage management techniques available? What are their importance in compiler design? Ques2: What are the various types of errors that may appear in compilation process? Explain the function of Error Handling phase of a complier? Ques3: Discuss the following parameter passing techniques with suitable examples: (i) Call by value (ii) Call by reference (iii) Call by value Ques4: Discuss the following storage-allocation strategies: (i) Stack allocation (ii) Heap allocation Ques5: Discuss the important data structures which are used in implementing symbol table. Ques6: What do you understand by Lexical phase errors and syntactic phase error. Also suggest methods for recovery of errors.

Tutorial sheet-5
Department: Computer Science Semester: 6th Subject: Compiler Design Course: B.Tech. Session:2011-2012 Code: ECS-603

Ques1: What is a Basic block? How can a sequence of three-address statements be transformed into a list of Basic blocks? Show it with examples. Ques2: Explain the need of code optimization. With example, illustrate loop optimization. Ques3: What is global data flow analysis? What is its use in code optimization? Ques4: What is DAG? What are its advantages in context of optimization? Ques5: Write short note on : Principle sources of optimization. Ques6: Discuss the role of data flow analysis.

Class Test Papers with solution

Students having Less than 40% Marks Test - ______ Held on: ____________

Identification of week students (monthly)

S. No
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Name

Marks obtained

S. No
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Name

Marks obtained

Action Taken:

Date:

Sign of Subject teacher:

Sign of CA:

Sign of HOD:

Course File
COMPILER DESIGN
(ECS-603)

SESSION-2011-12
JYOTI BAJPAI Department of Computer Engineering & Applications GLA Institute of Technology and Management, Mathura

Вам также может понравиться