Lecture plan: S.No Topic No. of lectures Lecture date 1 Overview of Compilation 1 26-12-2011 2 Phases of Compilation – Lexical Analysis 1 28-12-2011 3 Regular Grammar and regular expression for common programming language features 1 29-12-2011 4 pass and Phases of translation 1 31-12-2011 5 interpretation, 1 02-01-2012 6 bootstrapping 1 02-01-2012 7 data structures in compilation 1 04-01-2012 8 LEX lexical analyzer generator. 1 05-01-2012 Revision of previous topics 1 07-01-2012 9 Important Questions : 1. Design a DFA that accepts the language over the alphabet, _ = {0, 1, 2} Where the decimal equivalent of the language is divisible by 3. [Sup.Feb 2008, Set1] 2. Compare compiler and an interpreter with the help of suitable examples. [Sup.Feb 2008, Set1] 3. Obtain the Kleen Closure and Positive Closure of the language {ba, bb}, Where the alphabet _ = {a, b}. [Sup.Feb 2008, Set2] 4. Give a finite state diagram that accepts all the floating-point numbers. [Sup.Feb 2008, Set2] 5. Explain Regular Expressions with suitable examples. [Sup.Feb 2008, Set3]
E ! T + E|T T ! V_T|V V ! id Write down the procedures for the nonterminals of the grammar to make a recursive descent parser. [Apr/May 2008,Set3] 4. What is ambiguous grammar? Eliminate ambiguities for the grammar: E ! E + E|E_E|(E)|id. [Apr/May 2008,Set2] UNIT –III Syllabus: Bottom up parsing : Shift Reduce parsing, LR and LALR parsing, Error recovery in parsing , handling ambiguous grammar, YACC – automatic parser generator. Objectives : To know about shift reduce parsing To understand the LR and LALR parsing Lecture Plan: S.No Topic No. of lectures Lecture date 1 Shift Reduce parsing 1 23-01-2012 2 Shift Reduce parsing 1 25-01-2012 3 LR parsing 1 27-01-2012 4 LALR parsing 1 28-01-2012 5 Error recovery in parsing 1 30-01-2012 6 handling ambiguous grammar 1 01-02-2012 7 YACC – automatic parser generator 1 02-02-2012
S.No Topic No. of lectures Lecture date 1 Intermediate forms of source Programs 1 08-02-2012 2 abstract syntax tree 1 09-02-2012 3 polish notation and three address codes 1 13-02-2012 4 Attributed grammars 1 15-02-2012 5 Syntax directed translation 1 16-02-2012 6 Conversion of popular Programming languages Constructs into Intermediate code forms 1 18-02-2012 7 Type checker 1 21-02-2012 8 Review 1 22-02-2012 8 Important Questions: Compare Inherited attributes and Synthesized attributes with an example. [Sup.Feb 2008, Set1] 2. Construct triples of an expression: a * - (b + c). [Sup.Feb 2008, Set1] 3. Let synthesized attribute, Val give the value of the binary number generated by S in the following grammar. For example, on 101.101, S.Val = 5.625. S ! L • L |L L ! LB|B B ! 0 |1 Write synthesized attribute values corresponding to each of the productions to determine the S.Val.[Sup.Feb 2008, Set2] 4. Generate the three-address code for the following ?C? program fragment: [16] while(a > b) {
S.No Topic No. of lectures Lecture date 1 Consideration for Optimization 1 14-03-2012 2 Scope of Optimization 1 14-03-2012 3 local optimization 1 17-03-2012 4 loop optimization 1 19-03-2012 5 frequency reduction 1 21-03-2012 6 folding, 1 22-03-2012 7 DAG representation 1 24-03-2012 8 DAG representation 1 26-03-2012 8 Important Questions: Write a notes on the static storage allocation strategy with example and dis-cuss its limitations? [Sup.Feb 2008, Set1] 2. Discuss about the stack allocation strategy of runtime environment with an example? [Sup.Feb 2008, Set1] 3. Explain the concept of implicit deallocation of memory. [Sup.Feb 2008, Set2] 4. Give an example of creating dangling references and explain how garbage is created[Sup.Feb 2008, Set2] 5. Write a notes on the static storage allocation strategy with example and dis- cuss its limitations? [Sup.Feb 2008, Set3] 6. Explain how scope information is represented in the symbol table for block structured language? [Sup.Feb 2008, Set4] 7. Write and explain about activation record? [Sup.Feb 2008, Set4] 8. Explain different principal sources of optimization technique with suitable exam-ples. [Apr/May 2008,Set1] 10. What is code optimization? What are its advantages? [Apr/May 2008,Set2]