Mid-Terms Exam Scope and Introduction. Format Grades: 100 points -> 20% in the final grade Multiple Choice Questions –8 questions, 7 points each Short.

Slides:



Advertisements
Similar presentations
Chapter 5: Languages and Grammar 1 Compiler Designs and Constructions ( Page ) Chapter 5: Languages and Grammar Objectives: Definition of Languages.
Advertisements

CPSC Compiler Tutorial 4 Midterm Review. Deterministic Finite Automata (DFA) Q: finite set of states Σ: finite set of “letters” (input alphabet)
CFGs and PDAs Sipser 2 (pages ). Long long ago…
Compiler Construction Sohail Aslam Lecture Finite Automaton of Items Then for every item A →  X  we must add an  -transition for every production.
ISBN Chapter 3 Describing Syntax and Semantics.
CFGs and PDAs Sipser 2 (pages ). Last time…
Bottom-Up Syntax Analysis Mooly Sagiv Textbook:Modern Compiler Design Chapter (modified)
PZ02A - Language translation
1 Languages and Finite Automata or how to talk to machines...
COP4020 Programming Languages
(2.1) Grammars  Definitions  Grammars  Backus-Naur Form  Derivation – terminology – trees  Grammars and ambiguity  Simple example  Grammar hierarchies.
1 214 review. 2 What we have learnt Generate scanner and parser –We do not program directly –Instead we write the specifications for the scanner and parser.
CISC 471 First Exam Review Game Questions. Overview 1 Draw the standard phases of a compiler for compiling a high level language to machine code, showing.
Grammars CPSC 5135.
1 Context-Free Languages. 2 Regular Languages 3 Context-Free Languages.
Lecture # 9 Chap 4: Ambiguous Grammar. 2 Chomsky Hierarchy: Language Classification A grammar G is said to be – Regular if it is right linear where each.
ISBN Chapter 3 Describing Syntax and Semantics.
1 November 1, November 1, 2015November 1, 2015November 1, 2015 Azusa, CA Sheldon X. Liang Ph. D. Computer Science at Azusa Pacific University Azusa.
Bernd Fischer RW713: Compiler and Software Language Engineering.
Exam 1 Review EECS 483 – Lecture 15 University of Michigan Monday, October 30, 2006.
Saeid Pashzadeh Jan 2009 Theory of Computation 1.
A Programming Languages Syntax Analysis (1)
1 Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Compiler Introduction 1 Kavita Patel. Outlines 2  1.1 What Do Compilers Do?  1.2 The Structure of a Compiler  1.3 Compilation Process  1.4 Phases.
Review for final pm. 2 Review for Midterm Induction – On integer: HW1, Ex 2.2.9b p54 – On length of string: Ex p53, HW2, HW3.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Grammar Set of variables Set of terminal symbols Start variable Set of Production rules.
CH4.1 CSE244 Midterm Subjects Aggelos Kiayias Computer Science & Engineering Department The University of Connecticut 371 Fairfield Road, Box U-155 Storrs,
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
Theory of Computation. Introduction to The Course Lectures: Room ( Sun. & Tue.: 8 am – 9:30 am) Instructor: Dr. Ayman Srour (Ph.D. in Computer Science).
Chapter 3 – Describing Syntax
CS 326 Programming Languages, Concepts and Implementation
Programming Languages Translator
CS510 Compiler Lecture 4.
50/50 rule You need to get 50% from tests, AND
Lexical and Syntax Analysis
Context-free grammars, derivation trees, and ambiguity
Parsing and Parser Parsing methods: top-down & bottom-up
Table-driven parsing Parsing performed by a finite state machine.
Natural Language Processing - Formal Language -
CSCE 355 Foundations of Computation
Lecture 22 Pumping Lemma for Context Free Languages
Syntax Analysis Chapter 4.
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
CS314 – Section 5 Recitation 3
Formal Language Theory
Compiler Lecture 1 CS510.
Bottom-Up Syntax Analysis
Two issues in lexical analysis
Recognizer for a Language
Regular Grammar - Finite Automaton
Lexical and Syntax Analysis
CPSC 388 – Compiler Design and Construction
Non-Deterministic Finite Automata
CS 3304 Comparative Languages
Decidable Problems of Regular Languages
Syntax Analysis - 3 Chapter 4.
CFGs: Formal Definition
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Sub: Theoretical Foundations of Computer Sciences
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Theoretical Foundations of Computer Sciences
Review for the Midterm. Overview (Chapter 1):
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 2, 09/04/2003 Prof. Roy Levow.
Presentation transcript:

Mid-Terms Exam Scope and Introduction

Format Grades: 100 points -> 20% in the final grade Multiple Choice Questions –8 questions, 7 points each Short Answer Questions –4 questions, 44 points total

Ways to read the slides * must be covered in mid-term Other: may be covered in mid-term Not mentioned: Not covered in mid-term

Compiler Introduction Input and Output of a compiler *Difference between interpreters and compilers Structure of a compiler: Basic components Why split to front ends and back ends?

Formal Languages: Basics *Terminology: alphabets, sentence, template sentence, derivations, terminal, non-terminals, productions, … Four-tuple definition of PSG Language of a grammar and inductive proof on the language of a grammar Chomsky hierarchy of languages

Context Free Grammar What is a Derivation Tree Ambiguities in Derivation: identify ambiguity by giving sentence examples Conversion to Chomsky Normal Forms CYK Algorithm Read and understand BNF grammars

Finite State Machines Definition of DFA and NFA *How an input string is processed in a DFA and an NFA, and whether it is accepted or not

Lexical Analysis Type of tokens Attributes of tokens *Create an acceptance model for a given token (represented as a regular expression) Two buffer strategy What are lexical errors

Parsing - LL1 What is recursive descent parsing? Remove Left Recursion and Left Refactoring *Parsing Table Calculation –Calculation of First Sets –Calculation of Follow Sets –Calculation of Parsing Tables *How to perform parsing given a parsing table

Parsing - LR Identification of LR items and calculate closures Draw LR state automatons Fill in LR parsing tables