INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS)

Similar documents
INSTITUTE OF AERONAUTICAL ENGINEERING

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

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

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

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

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

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

VALLIAMMAI ENGINEERING COLLEGE

2068 (I) Attempt all questions.

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

Compiler Design Aug 1996

MLR Institute of Technology Dundigal, Quthbullapur (M), Hyderabad

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

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

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY

GUJARAT TECHNOLOGICAL UNIVERSITY

INSTITUTE OF AERONAUTICAL ENGINEERING

Question Bank. 10CS63:Compiler Design

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

G.PULLAIH COLLEGE OF ENGINEERING & TECHNOLOGY

INSTITUTE OF AERONAUTICAL ENGINEERING

QUESTIONS RELATED TO UNIT I, II And III

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

The analysis part breaks up the source program into constituent pieces and creates an intermediate representation of the source program.

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

VIVA QUESTIONS WITH ANSWERS

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

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

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Time : 1 Hour Max Marks : 30

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

PRINCIPLES OF COMPILER DESIGN

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

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

4. An interpreter is a program that

CST-402(T): Language Processors

PSD3A Principles of Compiler Design Unit : I-V. PSD3A- Principles of Compiler Design

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

University of Technology Department of Computer Sciences. Final Examination st Term. Subject:Compilers Design

LECTURE NOTES ON COMPILER DESIGN P a g e 2

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

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

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

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

VALLIAMMAI ENGINEERING COLLEGE

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

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

DADI INSTITUTE OF ENGINEERING & TECHNOLOGY (Approved by A.I.C.T.E., New Delhi & Affiliated to JNTUK, Kakinada)

Principles of Programming Languages [PLP-2015] Detailed Syllabus

Name of chapter & details

CJT^jL rafting Cm ompiler

COMPILER DESIGN LEXICAL ANALYSIS, PARSING

VETRI VINAYAHA COLLEGE OF ENGINEERING AND TECHNOLOGY

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 20th May 2016 Time: 14:00-16:00

Compiler Design Overview. Compiler Design 1

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD QUESTION BANK

Compiler Code Generation COMP360

General Overview of Compiler

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

Appendix A The DL Language


CS5363 Final Review. cs5363 1

Group B Assignment 9. Code generation using DAG. Title of Assignment: Problem Definition: Code generation using DAG / labeled tree.

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

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

MIDTERM EXAM (Solutions)

CS 406/534 Compiler Construction Putting It All Together

Section A. A grammar that produces more than one parse tree for some sentences is said to be ambiguous.

Formal Languages and Compilers Lecture VII Part 3: Syntactic A

List of Figures. About the Authors. Acknowledgments

Evaluation Scheme L T P Total Credit Theory Mid Sem Exam

Downloaded from Page 1. LR Parsing

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Alternatives for semantic processing

MODEL ANSWERS COMP36512, May 2016

Class Information ANNOUCEMENTS

Context-free grammars

Structure of a compiler. More detailed overview of compiler front end. Today we ll take a quick look at typical parts of a compiler.

Syntax Analysis: Context-free Grammars, Pushdown Automata and Parsing Part - 4. Y.N. Srikant

CSCI 565 Compiler Design and Implementation Spring 2014

Compiler Optimization

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS

QUESTION BANK CHAPTER 1 : OVERVIEW OF SYSTEM SOFTWARE. CHAPTER 2: Overview of Language Processors. CHAPTER 3: Assemblers

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology

CSCI Compiler Design

Life Cycle of Source Program - Compiler Design

COMPILER DESIGN

CS 132 Compiler Construction

3. Syntax Analysis. Andrea Polini. Formal Languages and Compilers Master in Computer Science University of Camerino

11. a b c d e. 12. a b c d e. 13. a b c d e. 14. a b c d e. 15. a b c d e

RYERSON POLYTECHNIC UNIVERSITY DEPARTMENT OF MATH, PHYSICS, AND COMPUTER SCIENCE CPS 710 FINAL EXAM FALL 96 INSTRUCTIONS

Compilers. Computer Science 431

Compiler Construction

EDAN65: Compilers, Lecture 06 A LR parsing. Görel Hedin Revised:

TUTORIAL QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING Autonomous Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING

Transcription:

Name Code Class Branch INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS) Dundigal, Hyderabad - 500 043 Year 0-0 INFORMATION TECHNOLOGY ASSIGNMENT QUESTIONS AUTOMATA AND COMPILER DESIGN A50513 III B. Tech I Semester Information Technology Coordinator Faculty Mr. D Rahul, Assistant Professor Mr. D Rahul, Assistant Professor OBJECTIVES To meet the challenge of ensuring excellence in engineering education, the issue of quality needs to be addressed, debated and taken forward in a systematic manner. Accreditation is the principal means of quality assurance in higher education. The major emphasis of accreditation process is to measure the outcomes of the program that is being accredited. In line with this, Faculty of Institute of Aeronautical Engineering, Hyderabad has taken a lead in incorporating philosophy of outcome based education in the process of problem solving and career development. So, all students of the institute should understand the depth and approach of course to be taught through this question bank, which will enhance learner s learning process. ASSIGNMENT-I UNIT I 1 Convert 01*+1 regular expression to finite automata? Remember 1 Explain phases of a compiler. Also write down the output for the following Understand 1 3 Explain expression the general after each format phase of x= a LEX y*z+? program with example? 4 Define regular expression? State the rules, which define regular 5 expression? Explain the role lexical analyzer and issues of lexical analyzer? Understand 1 6 Explain the specification of tokens? 7 Define Symbol table? 8 Explain lexeme? Define a regular set? Remember 1 Explain the differences between pass and phase in detail and explain Boot strapping? Understand 1 Consider the grammar 0A 1S Construct left most derivations for parse trees for the sentence.

11 1 13 Write FIRST & FOLLOW, construct predictive parsing table for the following grammar E T E' E' +TE' / Ɛ T FT ' T ' *FT ' /Ɛ F (E) / id Check the following grammar is LL(1) or not and construct parsing table. S->AaAb/BbBa Explain elimination of left recursion in the grammar E->E+T/T T->T*F/F F->(E) /id 14 Explain top down parsing methods with example? Understand 1 Analyze whether the following grammar is LL(1) or not. Explain your answer with reasons. 16 1 0 S L, R S R L * R L id R L For the operators given below, calculate the operator-precedence relations and operator precedence function. id, +, *, $ Check whether the following grammar is a LL(1)grammar S iets ietses a E b Also define the FIRST and FOLLOW procedures. Define the necessary conditions to be carried out before the construction of predictive parser? Prepare the predictive parser for the following grammar: S a b (T) T T, S S Write down the necessary algorithms and define FIRST and FOLLOW. Show the behavior of the parser in the sentences, i. (a,(a,a)) ii. (((a,a),a,(a),a) Consider the following fragment of C code: float i, j; i = i*70+j+; Write the output at all phases of the compiler for above C code. UNIT II Remember 1 1 Construct SLR parsing table for S CC C ac/b Knowledge

Construct SLR parsing table for S CC C ac / b Knowledge 3 Explain Bottom up parsing method Understand 4 Illustrate Brute-Force technique through a suitable example? Knowledge 5 Explain the error recovery in parsing. Understand 6 State shift-reduce parsing? Explain in detail the conflicts that may occur Understand 7 during Prepare shift-reduce a canonical parsing. table for the grammar given below S CC C cc d Knowledge For the grammar given below, calculate the operator precedence 8 relation and the precedence functions Consider the grammar - E E * E E given / E E below..e (E) -E id E E + T E T Understand T T * F T F Knowledge F (E) F id Prepare LR parsing table for the above grammar.give the moves of LR parser on id * id + id. Analyze whether the following grammar is SLR(1) or not. Explain your answer with reasons. S L,R S R L * R L id R L 1 UNIT III Knowledge State L attributed grammars and S- attributed grammars with an example? Knowledge 3 Define triple, Indirect triple, quadruples with examples? Remember 3 3 Explain Intermediate code representations? 4 Brief about Syntax Directed Translator? Knowledge 3 5 Explain Abstract syntax trees with an example? Define type expression? Explain the equivalence of type expressions 6 with an appropriate example? Knowledge 3 7 8 Generate the three-address code for the following C program fragment while(a > b) { if (c < d) x = y + z; else x = y - z; } Explain Intermediate code generation for Basic block, Control Flow and Boolean Expressions? Knowledge 3

Explain how declaration is done in a procedure using syntax directed translation? Knowledge 3 List the various ways of calling the procedures? Explain in detail? Knowledge 3 11 Explain type expression, type system, simple type checker? 1 List different data structures used for symbol table? Remember 3 13 State general activation record? 14 Explain type checking for different expressions? a. Explain static and stack storage allocations? b. Explain the limitations of static allocation? 16 Write short notes on the specification of a simple type checker? a. Compare three different storage allocation strategies? b. Explain symbol table organization using hashing? a. b. List the various attributes of a symbol table? Explain symbol table organization using trees? 1 Describe various forms of target programs? Remember 3 0 Explain heap storage allocation and static storage allocation? UNIT IV 1 Describe 3 areas of code optimization? Define constant folding? 3 List the advantages of the organization of code optimizer? 11 4 Explain Local optimization and loop optimization in detail. 5 Define Reduction in strength? 6 Define Common Sub expressions? 7 Explain runtime memory divisions? 8 Explain peephole optimization? Explain in the DAG representation of the basic block with example. a. Explain copy propagation and Dead code elimination? b. What is live variable? a. Explain local and global common sub expression elimination? b. Define a flow graph. Explain how flow graph can be constructed for a given program? Remember 4 Remember 4 1 13 14 a. Explain code hoisting and elimination of loop invariant statements? b. Explain how? Redundant sub expression elimination? can be done at global level in a given program? a. Describe local optimization? b. Explain any three principal sources of code optimization? a. Explain strength reduction and code movement? b. Define basic block? Write an algorithm for partitioning into blocks? a. Describe peephole optimizations? b. Explain about loops in flow graphs?

16 1 a. Explain loop optimizations? b. Describe elimination of common sub expression and elimination of dead Code? a. Explain natural loops and inner loops of a flow graph with an example. b. State purpose of data flow analysis? Explain available expression and reaching definition? a. Explain strength reduction and code movement? b. Define basic block? Write an algorithm for partitioning into blocks? a. Describe peephole optimizations? b. Explain about loops in flow graphs? 0 Explain in detail the optimization technique Strength Reduction? UNIT V 1 Explain register allocation and assignment? Knowledge 5 Show the code sequence generated by the simple code generation algorithm u := a c v := t + u d := v + u//d live at the end Understand 5 3 Explain object code forms, generic code algorithm? Understand 5 4 Explain machine dependent and machine independent optimization? Understand 5 5 List different data flow properties? Define get reg( ) function? Knowledge 5 6 Explain about code generation? Understand 5 7 List various machine dependent code optimization techniques? Understand 5 8 Explain the different issues in the design of a code generator? Understand 5 a. Describe various register allocation optimization techniques with an example. b. generate code sequence for the following expression using code generation algorithm K :=( a-b) + (a-c) + (a-c) Knowledge 5 a. Explain about directed acyclic graph (DAG) for register allocation? b. Discuss various forms of object code? Knowledge 5 Prepared by: Mr. D Rahul, Assistant Professor Date: 07/07/0 HOD, IT