G.PULLAIH COLLEGE OF ENGINEERING & TECHNOLOGY

Similar documents
INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

G. PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY Pasupula, Nandikotkur Road, Kurnool

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad INFORMATION TECHNOLOGY COURSE DESCRIPTION FORM

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS) Dundigal, Hyderabad

MLR Institute of Technology

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTER SCIENCE AND ENGINEERING COURSE PLAN

COURSE DESCRIPTION FORM. Level Credits Periods/ Week Prerequisites

LECTURE NOTES ON COMPILER DESIGN P a g e 2

INSTITUTE OF AERONAUTICAL ENGINEERING

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY

KALASALINGAM UNIVERSITY ANAND NAGAR, KRISHNAN KOIL DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING ODD SEMESTER COURSE PLAN

INSTITUTE OF AERONAUTICAL ENGINEERING

University of Asia Pacific (UAP) Department of Computer Science and Engineering (CSE)

INSTITUTE OF AERONAUTICAL ENGINEERING Autonomous Dundigal, Hyderabad

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division

Evaluation Scheme L T P Total Credit Theory Mid Sem Exam

DEPARTMENT OF INFORMATION TECHNOLOGY AUTOMATA AND COMPILER DESIGN. B.Tech-IT, III Year -I Sem

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

SYED AMMAL ENGINEERING COLLEGE (An ISO 9001:2008 Certified Institution) Dr. E.M. Abdullah Campus, Ramanathapuram

HOLY ANGEL UNIVERSITY COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY COMPILER THEORY COURSE SYLLABUS

GUJARAT TECHNOLOGICAL UNIVERSITY

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Subject Name: CS2352 Principles of Compiler Design Year/Sem : III/VI

University of Asia Pacific (UAP) Department of Computer Science and Engineering (CSE)

INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS)

CST-402(T): Language Processors

VALLIAMMAI ENGINEERING COLLEGE

SYLLABUS UNIT - I UNIT - II UNIT - III UNIT - IV CHAPTER - 1 : INTRODUCTION CHAPTER - 4 : SYNTAX AX-DIRECTED TRANSLATION TION CHAPTER - 7 : STORA

University of Asia Pacific (UAP) Department of Computer Science and Engineering (CSE) Course Outline

CSCI 565 Compiler Design and Implementation Spring 2014

University of Asia Pacific (UAP) Department of Electrical and Electronics Engineering (EEE) Course Outline

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous)

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

Gujarat Technological University Sankalchand Patel College of Engineering, Visnagar B.E. Semester VII (CE) July-Nov Compiler Design (170701)

CS 406/534 Compiler Construction Putting It All Together

B.E Civil Engineering Program Outcomes (POs) At the end of the B.E program, students are expected to have developed the following outcomes.

INSTITUTE OF AERONAUTICAL ENGINEERING

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

St. MARTIN s ENGINERING COLLEGE Dhulapally,Secunderabad

Philadelphia University Faculty of Information Technology Department of Computer Science --- Semester, 2007/2008. Course Syllabus

G COURSE PLAN ASSISTANT PROFESSOR Regulation: R13 FACULTY DETAILS: Department::

G.PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY

Question Bank. 10CS63:Compiler Design

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / EVEN SEMESTER

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

DEPARTMENT OF INFORMATION TECHNOLOGY / COMPUTER SCIENCE AND ENGINEERING UNIT -1-INTRODUCTION TO COMPILERS 2 MARK QUESTIONS

2068 (I) Attempt all questions.

Principles of Programming Languages [PLP-2015] Detailed Syllabus

Compilers for Modern Architectures Course Syllabus, Spring 2015

Undergraduate Program for Specialty of Software Engineering

Compiler Design Overview. Compiler Design 1

Compiler Design (40-414)

Name of chapter & details

1. (a) What are the closure properties of Regular sets? Explain. (b) Briefly explain the logical phases of a compiler model. [8+8]

CS Compiler Construction West Virginia fall semester 2014 August 18, 2014 syllabus 1.0

CHALAPATHI INSTITUTE OF ENGINEERING & TECHNOLOGY

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

DEPARTMENT OF INSTRUMENTATION AND CONTROL ENGINEERING VISION

GUJARAT TECHNOLOGICAL UNIVERSITY

CS606- compiler instruction Solved MCQS From Midterm Papers

Roll No. :... Invigilator's Signature :. CS/B.Tech(CSE)/SEM-7/CS-701/ LANGUAGE PROCESSOR. Time Allotted : 3 Hours Full Marks : 70

Part A: Course Outline

CS131: Programming Languages and Compilers. Spring 2017

COURSE OUTCOMES AND PROGRAM OUTCOMES

CS 2210 Sample Midterm. 1. Determine if each of the following claims is true (T) or false (F).

QUESTIONS RELATED TO UNIT I, II And III

1. Explain the input buffer scheme for scanning the source program. How the use of sentinels can improve its performance? Describe in detail.

Compiler Design Aug 1996

3.4.3 Bachelor of Technology (Electronics Engineering)

CJT^jL rafting Cm ompiler

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Compiler Construction LECTURE # 1

INSTITUTE OF AERONAUTICAL ENGINEERING

Compilers. Computer Science 431

Torben./Egidius Mogensen. Introduction. to Compiler Design. ^ Springer

List of Figures. About the Authors. Acknowledgments

Formal Languages and Compilers Lecture I: Introduction to Compilers

Academic Course Description

Working of the Compilers

Academic Course Description

CMPE 152 Compiler Design

Academic Course Description

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) DUNDIGAL, HYDERABAD

ECE573 Introduction to Compilers & Translators

CSCI Compiler Design

CS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CMPE 152 Compiler Design

Let us construct the LR(1) items for the grammar given below to construct the LALR parsing table.

CS5363 Final Review. cs5363 1

Compiler Construction Using

Formal Languages and Compilers Lecture VII Part 3: Syntactic A

Introduction to Compiler Construction

CALIFORNIA STATE POLYTECHNIC UNIVERSITY, POMONA ACADEMIC SENATE ACADEMIC PROGRAMS COMMITTEE REPORT TO THE ACADEMIC SENATE AP

COURSE PLAN Regulation: R11 FACULTY DETAILS: Department::

Academic Course Description

MLR Institute of Technology

Transcription:

G.PULLAI COLLEGE OF ENGINEERING & TECNOLOGY Nandikotkur Road, Kurnool 518002 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Semester VI (2017-2018) COURSE DESCRIPTION Course Code : 15A05601 Course Title : COMPILER DESIGN Course Structure : Lectures Tutorials Practical Credits 3 1-3 Course Coordinator : R.Sandeep Kumar,Asst Professor Team of Instructors : N.Poorna Chandra Rao I. Course Overview: The main objective of this course is to introduce the major concept areas of language translation and compiler design and to develop an awareness of the function and complexity of modern compilers. This course is a study of the theory and practice required for the design and implementation of interpreters and compilers for programming languages. II.Prerequisite(s) Level Credits Periods/ Week Prerequisites UG 4 5 Formal languages and automata, comparative languages(experience with programming in imperative languages such as C/C++ III. Marks Distribution:

Sessional Marks University End Exam Marks Total Marks For theory subjects, during the semester, there shall be two midterm examinations and for first year there shall be three midterm examinations. Each midterm examination consists of objective paper for 10 marks and subjective paper for 20 marks with duration of 1hour 50 minutes (20 minutes for objective and 90 minutes for subjective paper). Objective paper shall be for 10 marks. Subjective paper shall contain 5 questions of which student has to answer 3 questions evaluated* for 20 marks. 70 100 IV. Evaluation Scheme: S.No I 2 3 Component I MID EXAMINATION II MID EXAMINATION EXTERNAL EXAMINATION Duration (hours) Marks 1hr 50 min 30 1hr 50 min 30 3hrs 70 V. Course Educational Objectives: 1. To learn the process of translating a modern high-level language to executable code. 2. To provide a student with an understanding of the fundamental principles in compiler design and to provide the skills needed for building compilers for various situations that one may encounter in a career in Computer Science. 3. To develop an awareness of the function and complexity of modern compilers. 4. To apply the code generation algorithms to get the machine code for the optimized code. 5. To represent the target code in any one of the code formats 6. To understand the machine dependent code 7. To draw the flow graph for the intermediate codes. 8. To apply the optimization techniques to have a better code for code generation VI. Course Outcomes:

By the end of the course, the successful student will be able to do: To realize basics of compiler design and apply for real time applications. To introduce different translation languages To understand the importance of code optimization To know about compiler generation tools and techniques To learn working of compiler and non compiler applications Design a compiler for a simple programming language VII. ow Course Outcomes are assessed: By the end of this course the student should be capable of Able to convert any instruction of a program to convert from source language to target language and should be recognize what happens at each and every phase of a compiler. Student should be in a position to understand the different types of parsing techniques and should be in a position to solve the problem. Student should analyze the program and minimize the code by using optimizing techniques which helps in reducing the no. of instructions in a program and also utilization of registers in an effective way. Able to write the code by using YACC and lex. VII. ow Course Outcomes are assessed: A B C D Outcome Engineering Knowledge: Apply the knowledge of mathematics, science, engineering Fundamentals and an engineering specialization to the solution of complex engineering problems. Problem analysis: Identify, formulate, review research literature, and analyze complex Engineering problems reaching substantiated conclusions using first principles of mathematics, natural sciences, and engineering sciences Design / development of solutions: Design solutions for complex engineering problems and design system components or processes that meet the specified needs with appropriate consideration for the public health and safety, and the cultural, societal, and Environmental considerations. Conduct investigations of complex problems: use research-based knowledge and research methods including design of experiments, analysis and interpretation of data, and synthesis of the information to provide valid Level -- -- Proficiency assessed by Tests and assignments

E F G I J K L conclusions. Modern tool usage: create, select, and apply appropriate techniques, resources, and modern engineering and IT tools including prediction and modeling to complex engineering activities with an understanding of the limitations. The engineer and society: apply reasoning informed by the contextual knowledge to assess Societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional engineering practice. Environment and sustainability: Understand the impact of the professional engineering solutions in societal and environmental contexts, and demonstrate the knowledge of and need for sustainable development Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the engineering practice. Individual and team work: Function effectively as an individual, and as a member or leader in diverse teams, and in multidisciplinary settings. Communications: Communicate effectively on complex engineering activities with the engineering community and with society at large, such as, being able to comprehend and write effective reports and design documentation, make effective presentations, and give receive clear instructions. Project management and finance: Demonstrate knowledge and understanding of the engineering and management principles and apply these to one s own work, as a member and leader in a team, to manage projects and in multidisciplinary environments. Life-long learning: Recognize the need for, and have the preparation and ability to engage in independent and life-long learning in the broadest context of technological change. -- Tests and assignments Tests and assignments N = None S = Supportive = ighly Related VIII. Syllabus: UNIT I Introduction: Language processors, Phases of a compiler, Pass and phase, Bootstrapping, Compiler construction tools, Applications of compiler technology, Programming language basics Lexical Analysis: Role and Responsibility, Input buffering, Specification of tokens, Recognition of tokens, LEX tool, Design of a Lexical Analyzer generator

UNIT II Syntax Analysis: Role of the parser, Context Free Grammars - Definition, Derivations, Parse trees, Ambiguity, Eliminating ambiguity, Left recursion, Left faltering. TOP Down Parsing: Recursive descent parsing, Non-recursive predictive parsing, LL(1) grammars, Error recovery in predictive parsing. Bottom Up Parsing: andle pruning, Shift-Reduce parsing, Conflicts during shifts- reduce parsing, SLR Parsing, Canonical LR(1) parsers, LALR parsers, Using ambiguous grammars, YACC tool. UNIT III Syntax Directed Translation: Syntax Directed Definitions, Evaluation orders for SDD s, Application of SDT, SDT schemes, Implementing L-attribute SDD s. Intermediated Code Generation: Need for intermediate code, Types of intermediate code, Three address code, Quadruples, Triples, Type expressions, Type equivalence, Type checking, Translation of expressions, control flow statements, switch statement, procedures, back patching. UNIT IV Run Time Storage Organization: Scope and Life time of variable, Information associated with symbols in symbol table, Data Structures for symbol Table, Static vs dynamic storage allocation, Stack allocation of space, Access to non-local data on stack, eap management, Introduction to garbage collection Optimization: Need and objective of optimization, Places of optimization, Optimization at user level, Construction of Basic blocks and Processing, Data Flow analysis using flow graph, Data flow equations for blocks with back ward flow control, Principles source of optimization and transformations, Alias, Loops in flow graphs, Procedural optimization, Loop optimization UNIT V Code Generation: Issues in code Generation, Target machine architecture, Subsequent Use Information, Simple code generator, Register allocation, DAG representation of basic blocks, Code Generation from intermediate code, Peephole optimization, Code scheduling Text Books : 1. Compilers Principles, Techniques and Tools, Second Edition, Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman., Pearson. 2. Compiler Design, K. Muneeswaran., Oxford University Press, 2012 Reference Books : 1. Compiler Construction, K.V.N Sunitha, Pearson, 2013 2. Engineering a Compiler, Second Edition, Keith D. Cooper & Linda Torczon., Morgan Kaufmann, Elsevier. 3. Compilers Principles and Practice, Parag. Dave, imanshu B. Dave., Pearson

4. Compiler Design, Sandeep Saxena, Rajkumar Singh Rathore., S.Chand publications 5. Compiler Design, Santanu Chattopadhyay 6. Principals of Compiler Design, Nadhni Prasad, Elsevier. VIII. Course Plan: Lect. No Learning Objective Topics to be covered Reference 1-2 To convert an instruction to machine code Phases of a compilation :1.3 3-4 Identifying the tokens in Lexical Analysis :2.6 the first phase 5-6 Identifying the grammar is in CFG or not and Conversions from NFA to Regular Grammar,Regualr T2 DFA Expressions 7 Knowing the difference between and pass and a Pass and phases of a :1.5 phase translation 8 Knowing the types of a compiler Bootstapping :11.2 9 ow the LEX identifies the tokens in a program LEX analyzer generator :3.8 10 11-12 13-16 Each and every grammar should be in an unique format by Removing useless productions, useless Symbols, removing epsilon productions A program written for any Context free grammars & Top-down Parsing LMD,RMD given grammar Recursive descent parsing :4.4 Finding FIRST AND FOLLOW functions :4.4 17-18 To generate a parsing table and check whether the given string is accepted or not To determine whether the 19 string should be push or pop from the stack To solve how the parsing is 20-23 done in bottom up parsers Predictive parsing Preprocessing steps required for predictive parsing Shift Reduce parsing SLR, LALR and CALR parsing :4.4 :4.5 24 Removing the conflicts occurred in LR parsers andling ambiguous grammar :4.8 25-26 To write parsing program using YACC(it is a parser generator) 27 To Know the intermediate forms that has generated from parsers YACC automatic generation parsing algorithm Intermediate forms of source program :4.9 :8.1

28 Generating the tree by using Abstract syntax tree intermediate forms :5.2 29-30 To draw the tree diagram for a given expression in Polish notation and three address codes :8.1 specific format 31-32 To know about synthesized Attributed grammars and Inherited attribute :5.1 33-34 An augmented CFG can be generated Syntax directed translation :5.5 Conversions from Conversions from 35-36 programming language into programming language :5.2 intermediate code forms into intermediate code forms 37-38 To check the types of a variables Type checker :6.2 46 To know how the data is Symbol table format stored in symbol table To know how the data table Organization for block 47 entries are formed in the structures language different types of block formats 48 ashing A tree diagram for a 49 variables located either for global or local To determine how the data 50 is stored in block or non block structure storage allocation 51 To know how the data is allocated dynamically To know the various types 52-53 of data will be allocated in symbol table 54-55 To minimize the code based on whether the scope lies in static or dynamic 56-57 To know the various techniques or steps in reducing the code 58 Different techniques of reduction methods 59-60 To minimize the code if any code is repeated in an expression 61-62 To know about how the control flow of information is added to blocks 63 The way of representing the expressions in flow graph Optimization that can be applied to procedures or 64 functions which is not possible in local Tree structure representation of scope information Block structure and non block structure storage allocation Static,Run time storage heap allocation memory Storage allocation for arrays and strings and records Scope of optimization Local Optimization Frequency reduction Folding representation Flow graph Data Flow Equation Global Optimization,DAG

optimization 65 Reducing the code by using some common techniques Understanding how to 66 compute the data flow equations A flow graph which contains 67 68 Redundant sub expression evaluation Live variable analysis ud chains in blocks Copy propagation To know the different forms of object code whether it is in absolute or relocatable Object code forms machine code or assembler code 69-70 To know the different techniques how register is allocated for the expression DAG for register allocation VIII. Mapping of course objectives to the achievements of course outcomes: Course Program Outcomes Objectives a b c D e f g h i j k L m I S S S II III IV S V VI S IX. Mapping of course outcomes leading to the achievement of the program outcomes: Course Outcomes Program Outcomes a b c D e f g h i j k L m 1 S 2 S 3 S S 4 S 5 S 6 S 7 S Prepared By : R.Sandeep Kumar Date : 07-01-2014