Compilers compilers www.ramkumarsjava.com.  Q1>A translator converts _____________into______________. www.ramkumarsjava.com.

Slides:



Advertisements
Similar presentations
COMPILER CONSTRUCTION
Advertisements

UNIT-III By Mr. M. V. Nikum (B.E.I.T). Programming Language Lexical and Syntactic features of a programming Language are specified by its grammar Language:-
1 Pass Compiler 1. 1.Introduction 1.1 Types of compilers 2.Stages of 1 Pass Compiler 2.1 Lexical analysis 2.2. syntactical analyzer 2.3. Code generation.
CPSC Compiler Tutorial 9 Review of Compiler.
By Neng-Fa Zhou Compiler Construction CIS 707 Prof. Neng-Fa Zhou
Compiler Construction1 A Compulsory Module for Students in Computer Science Department Faculty of IT / Al – Al Bayt University First Semester 2009/2010.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Compiled by Benjamin Muganzi 3.2 Functions and Purposes of Translators Computing 9691 Paper 3 1.
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
Chapter 17 Programming Tools The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
INTRODUCTION TO COMPUTING CHAPTER NO. 06. Compilers and Language Translation Introduction The Compilation Process Phase 1 – Lexical Analysis Phase 2 –
COP4020 Programming Languages
Chapter 1. Introduction.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
Chapter 10: Compilers and Language Translation Invitation to Computer Science, Java Version, Third Edition.
CSC 338: Compiler design and implementation
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Joey Paquet, 2000, 2002, 2007, Concordia University Department of Computer Science COMP 442/6421 Compiler Design.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
1.  10% Assignments/ class participation  10% Pop Quizzes  05% Attendance  25% Mid Term  50% Final Term 2.
Compiler design Lecture 1: Compiler Overview Sulaimany University 2 Oct
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Daisy Arias Math 382/Lab November 16, 2010 Fall 2010.
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
Topic #1: Introduction EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Overview of Previous Lesson(s) Over View  A program must be translated into a form in which it can be executed by a computer.  The software systems.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Compilers: Overview/1 1 Compiler Structures Objective – –what are the main features (structures) in a compiler? , Semester 1,
Introduction CPSC 388 Ellen Walker Hiram College.
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Chapter 1: Introduction 1 Compiler Designs and Constructions Chapter 1: Introduction Objectives: Course Objectives Introduction Dr. Mohsen Chitsaz.
Compiler Construction By: Muhammad Nadeem Edited By: M. Bilal Qureshi.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
1.3 Analysis And Synthesis OF LP Language Processor = Analysis of Source Program + Synthesis of Target Program. 1.
Introduction to Language Programming Hierarchy of programming lang. Based on machine independences: 1. Machine language 2. Assembly language 3. Higher.
What is a compiler? –A program that reads a program written in one language (source language) and translates it into an equivalent program in another language.
CSC 4181 Compiler Construction
©SoftMoore ConsultingSlide 1 Structure of Compilers.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
ICS312 Introduction to Compilers Set 23. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
CSC 8505 Compiler Construction
COP4020 Programming Languages Introduction Prof. Robert van Engelen (modified by Prof. Em. Chris Lacher)
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
Objective of the course Understanding the fundamentals of the compilation technique Assist you in writing you own compiler (or any part of compiler)
Chapter 1. Introduction.
Advanced Computer Systems
Component 1.6.
Introduction Chapter : Introduction.
PRINCIPLES OF COMPILER DESIGN
Chapter 1 Introduction.
Introduction to Compiler Construction
Component 1.6.
Introduction to programming
CS 3304 Comparative Languages
Introduction.
Chapter 1 Introduction.
课程名 编译原理 Compiling Techniques
Compiler Lecture 1 CS510.
Lesson Objectives Aims Key Words Compiler, interpreter, assembler
Compilers B V Sai Aravind (11CS10008).
Chapter 1 Introduction.
Chapter 10: Compilers and Language Translation
Introduction Chapter : Introduction.
Compiler Structures 1. Overview Objective
Presentation transcript:

compilers compilers

 Q1>A translator converts _____________into______________.

 Source program to object or target program

 Q2>The time of conversion from source program into object program is called ________time.  a)runtime  b)boot time  c)fresh time  d)compile time

 compile time

 Q3>The program execution is done in compiler in_________________.

 Runtime

Q4>_______________________+______ ______________=compilation.  a)Analysis +Synthesis  b)Analysis +Compile  c)Compile +Synthesis  d)Analysis +Execute

 Analysis and Synthesis

 Q5>The analysis phase is often called the _______________ of a compiler.

 Front end

 Q6>What are the 3 phases of analysis phase?

 a)Lexical Analysis  b)Synthesis Analysis  c)Semantic Analysis

 Q7>Syntax of any programming language is specified in terms of units called __________________.

 Tokens or terminals

Q8>Syntax Analyzer is otherwise known as _____________.  a)Scanner  b)Parser  c)Lexeme  d) Sub scripter

 Parser

 Q9>What are the work of a semantic analyzer?

 a)Type Checking  b)Type Conversions

 Q10>The synthesis phase is the ____________of a program.

 Back end

 Q11>What are the stages of synthesis of target program?

 Memory allocation  Code generation and optimization

 Q12>Code optimization is done for-

 faster and shorter code

 Q13>_____________ is a data structure that is used by the compiler to hold the information about source program constructs.

 Symbol table

 Q14>What are the role of a compiler?

 -Lexical Analyzer  -Syntactic Analyzer  -Semantic Analyzer  -Code generator  -Code optimizer  -Error reporter

Q17>Code generation and optimization is not a part of synthesis phase  a)True  b)False

 false

Q18>The first compiler was written by _____________ in ________for A-0 system language

 Grace Hopper,1952

 Q19>Who invented first complete compiler?

 The FORTRAN team led by John W.Backus at IBM in

 Q20>___________ was one of the early commercial computers that used vacuum tubes.

 Z22

Q21>The first known demonstrated cross platform high level language was_____________.  a)FORTRAN  b)COBOL  c)BASIC  d)ALGOL

 COBOL

 Q22>A compiler that can be written in the programming language it compiles-

 Self hosted

 Q23>The first self hosting compiler was written for LISP by_______________and ______________ in

 Tim Hart and Mike Levin

 Q24>Structure of a compiler depends on 3 factors. What are they?

 Nature of the source language  Machine architecture and configuration  Aims of compiler

 Q25>Different types of compiler structure are-

 Single pass compiler  Multipass compiler  Conventional compiler  Compilers for permissive language  Incremental compiler

Q26>Strike the one out which doesn’t match for single pass compilers.  -All the stages executed in single flow  -Memory requirement is small  -Code generated is inefficient  -Faster execution

 memory requirement is small

 Q27>Pascal and FORTRAN are example of ______________compiler.

 single pass

 Q28>____________is an example of multipass compiler.

 java

Q29>A clear cut distinction between analysis and synthesis phase is brought is _________________  a)conventional  b)Incremental  c)Singlepass  d)Multipass

 conventional

 Q30>C is a _________________ type of compilers.

 conventional

 Q31>___________________is a language that allows declarations to be placed anywhere in a program.

 Permissive language

 Q32>Incremental compilers are invented by ______________ and __________________ in 1973 that combine the main advantages of compilers and interpreters.

 Berthaud and Griffiths

Q33>IBM visual age c++ compiler is a ______________ compiler.

 Incremental

Q34>IBM/360 FORTRAN H compiler is _______________ compilers.

 Optimization

Q35>A concept of developing a compiler for a language by using subsets of the same language is called_______________.  a)Bootstrapping  b)Cross-compilation  c)Incremental Compilation  d)None of the above

 Boot strapping

Q36>A compiler which runs on one machine and generates code for another machine is called as ______________.  a)Bootstrapping  b)Cross-compilation  c)Incremental Compilation  d)None of the above

 Cross compilation

Q37>A cross compiler is a compiler which runs on one machine and generates code for another machine  a)True  b)False

 True

Q38>Process of generating code on one machine for executing on another is called ________________.

 Cross Compilation