Review 1.Structure of the course Lexical Analysis Syntax Analysis Grammar & Language RG & DFA Top-down LL(1) Parsing Bottom-Up LR Layered Automation Semantic.

Slides:



Advertisements
Similar presentations
CPSC 388 – Compiler Design and Construction
Advertisements

Course Outline Traditional Static Program Analysis Software Testing
Mooly Sagiv and Roman Manevich School of Computer Science
Goran Šuković, University of Montenegro 1/21 Compiler Construction Course at University of Montenegro 7 th Workshop on “Software Engineering Education.
Cpeg421-08S/final-review1 Course Review Tom St. John.
1 Semantic Processing. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
1 Intermediate representation Goals: –encode knowledge about the program –facilitate analysis –facilitate retargeting –facilitate optimization scanning.
FE.1 CSE4100 Final Exam Advice and Hints Prof. Steven A. Demurjian, Sr. Computer Science & Engineering Department The University of Connecticut 191 Auditorium.
BİL744 Derleyici Gerçekleştirimi (Compiler Design)1.
1 Chapter 3 Context-Free Grammars and Parsing. 2 Parsing: Syntax Analysis decides which part of the incoming token stream should be grouped together.
Parsing Wrap-up. from Cooper and Torczon2 Filling in the A CTION and G OTO Tables The algorithm Many items generate no table entry  Closure( ) instantiates.
Compiling Principles & Compiler Construction Zhai Yuqing ource/compiler/
Compiling Principles & Compiler Construction
2.2 A Simple Syntax-Directed Translator Syntax-Directed Translation 2.4 Parsing 2.5 A Translator for Simple Expressions 2.6 Lexical Analysis.
Chapter 5 Syntax-Directed Translation Section 0 Approaches to implement Syntax-Directed Translation 1、Basic idea Guided by context-free grammar (Translating.
1 October 2, October 2, 2015October 2, 2015October 2, 2015 Azusa, CA Sheldon X. Liang Ph. D. Computer Science at Azusa Pacific University Azusa.
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.
10/13/2015IT 3271 Tow kinds of predictive parsers: Bottom-Up: The syntax tree is built up from the leaves Example: LR(1) parser Top-Down The syntax tree.
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style COMPILER DESIGN Review Joey Paquet,
Syntax Directed Translation. Tokens Parser Semantic checking TAC Peephole, pipeline, …… TAC  assembly code/mc Cmm subexpression,……
Lesson 3 CDT301 – Compiler Theory, Spring 2011 Teacher: Linus Källberg.
Introduction Fan Wu Department of Computer Science and Engineering
Joey Paquet, Lecture 12 Review. Joey Paquet, Course Review Compiler architecture –Lexical analysis, syntactic analysis, semantic.
Topic #2: Infix to Postfix EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Overview of Previous Lesson(s) Over View  An ambiguous grammar which fails to be LR and thus is not in any of the classes of grammars i.e SLR, LALR.
Syntax and Semantics Structure of programming languages.
# 1 CMPS 450 Syntax-Directed Translations CMPS 450 J. Moloney.
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
Bernd Fischer RW713: Compiler and Software Language Engineering.
Compiler Principles Fall Compiler Principles Lecture 0: Local Optimizations Roman Manevich Ben-Gurion University.
CS412/413 Introduction to Compilers and Translators Spring ’99 Lecture 3: Introduction to Syntactic Analysis.
. n COMPILERS n n AND n n INTERPRETERS. -Compilers nA compiler is a program thatt reads a program written in one language - the source language- and translates.
Introduction to Compiling
Compiler Principles Fall Compiler Principles Lecture 6: Parsing part 5 Roman Manevich Ben-Gurion University.
Overview of Previous Lesson(s) Over View  In syntax-directed translation 1 st we construct a parse tree or a syntax tree then compute the values of.
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.
1 A Simple Syntax-Directed Translator CS308 Compiler Theory.
1 CS308 Compiler Theory. 2 Course Information Instructor : –Prof. Minyi Guo –Yao Shen Course.
Course Revision.. Contents  Lexical Analysis  Our Compiler Structure  Tokens, Lexemes & Patterns  RE’s & Regular Definitions  Transition Diagrams.
Bottom Up Parsing CS 671 January 31, CS 671 – Spring Where Are We? Finished Top-Down Parsing Starting Bottom-Up Parsing Lexical Analysis.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
Mid-Terms Exam Scope and Introduction. Format Grades: 100 points -> 20% in the final grade Multiple Choice Questions –8 questions, 7 points each Short.
CS416 Compiler Design1. 2 Course Information Instructor : Dr. Ilyas Cicekli –Office: EA504, –Phone: , – Course Web.
CS510 Compiler Lecture 1. Sources Lecture Notes Book 1 : “Compiler construction principles and practice”, Kenneth C. Louden. Book 2 : “Compilers Principles,
1 Compiler Construction Overview. 2 Today’s Goals Summary of the subjects we’ve covered Perspectives and final remarks.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture Ahmed Ezzat.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 12–Compilers.
2016/7/9Page 1 Lecture 11: Semester Review COMP3100 Dept. Computer Science and Technology United International College.
Compiler Summary Lexical analysis—scanner – String of characters  token – Finite automata. Syntactical analysis – parser – Sequence of tokens –> language.
CHAPTER 1 INTRODUCTION TO COMPILER SUNG-DONG KIM, DEPT. OF COMPUTER ENGINEERING, HANSUNG UNIVERSITY.
System Software Theory (5KS03).
Constructing Precedence Table
Programming Languages Translator
50/50 rule You need to get 50% from tests, AND
Review: Chapter 5: Syntax directed translation
Compiler Lecture 1 CS510.
CS416 Compiler Design lec00-outline September 19, 2018
Introduction CI612 Compiler Design CI612 Compiler Design.
CPSC 388 – Compiler Design and Construction
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Subject: Language Processor
Exam Topics Hal Perkins Autumn 2009
CS416 Compiler Design lec00-outline February 23, 2019
SYNTAX DIRECTED DEFINITION
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Review for the Midterm. Overview (Chapter 1):
Exam Topics Hal Perkins Winter 2008
Compiler design Review COMP 442/6421 – Compiler Design
Presentation transcript:

Review 1.Structure of the course Lexical Analysis Syntax Analysis Grammar & Language RG & DFA Top-down LL(1) Parsing Bottom-Up LR Layered Automation Semantic Analysis Attribute Grammar Type Checking Intermediate Code generation TAC Quadruple(Backpatching) Code Optimization Control-flow Analysis Data-flow Analysis Run-time Environment Stack Allocations

Review 2.Scope of reviewing From Chapter 2-Chapter 9

Review 3.Methods of reviewing Understanding basic concept, principles deeply Being able to do exercises Understanding the process by drawing the graph or the flow Remembering after understanding

Review 4.Forms of problems in the examination paper Similar to the exercises finished by you Without any the form of choosing answers or judgment

Review 5.Form of examination Isolated (Cannot refer to any other materials)

Review 6.Important knowledge points Chapter 2 –Chomsky Grammar and related Automation –Construct a context-free grammar without  - production from a language All strings of a’s and b’s with an even number of a’s and an odd number of b’s Strings of a’s and b’s with an equal number of a’s and b’s Embedded grammar Combination of regular grammar and embedded grammar

Review 6.Important knowledge points Chapter 3 –Conversion from NFA to DFA Subset Method –Minimizing of DFA Top-down partition of equivalent class –Conversion from Regular expression to NFA and inverse conversion –Conversion from Regular Grammar to NFA and inverse conversion –Construct a minimum-state DFA for a regular expression

Review 6.Important knowledge points Chapter 4 –Top-down Parsing Recursive descent parsing Predictive parsing –LL(1) LL(1) Parsing table construction –Elimination of left recursion »First direct, Next indirect recursion –Factoring –First &Follow –Show a CFG grammar is whether a LL(1) grammar by constructing the related parsing table

Review 6.Important knowledge points Chapter 4 –Bottom-up Parsing LR parsing –SLR(1) -- Follow –LR(1) – Predictive symbol –LALR –Merging states with the same core –Show a CFG grammar is whether a LR grammar by constructing the related parsing table

Review 6.Important knowledge points Chapter 4 –Ambiguous Grammar parsing Additional conditions –Associated law and precedence –Dangle rules –Parsing an ambiguous grammar in LR parsing method with additional conditions

Review 6.Important knowledge points Chapter 5 –Attribute –Annotated parsing tree Construct an annotated parsing tree for an expression (S-attribute) –Syntax-directed definition –S-attribute Grammar and evaluation of S-attribute Construct semantic rules for a S-attribute grammar

Review 6.Important knowledge points Chapter 6 –Type –Type expression Construct a type expression for a declaration

Review 6.Important knowledge points Chapter 7 –Stack-based storage allocation Activation Record Form C language program –Recursive function Construct a maximum stack map for a C recursive program

Review 6.Important knowledge points Chapter 8 –TAC –Bottom-up Syntax-directed Program Translation Assignment statement with array If and While statement Translate a program fragment into TAC/quadruple using bottom-up syntax- directed program translation method

Review 6.Important knowledge points Chapter 9 –Block Division Construct a flow graph from TAC statements sequence –Optimization in a Block Constant folding Common sub-expression Copy-propagation DAG Code rewriting Optimize a block in DAG method and rewrite the code

Review 6.Important knowledge points Chapter 9 –Loop seeking Back edge Code Motion Reduction of strength Find out the loop in a flow graph using dominators and back edge –Data flow analysis Why should we analyze the data-flow of a program? How should we analyze the data-flow of a program?