UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Final Lecture of the Semester Spring 2010 Marco.

Slides:



Advertisements
Similar presentations
Course Outline Presentation Term: F09 Faculty Name : Asma Sanam Larik Course Name :INTRO TO COMPUTING Course Code : CSE145 Section :1 Semester : 1.
Advertisements

Synopsys University Courseware Copyright © 2012 Synopsys, Inc. All rights reserved. Compiler Optimization and Code Generation Lecture - 3 Developed By:
Course Outline Traditional Static Program Analysis Software Testing
CMPUT Compiler Design and Optimization1 CMPUT680 - Winter 2006 Topic 5: Peep Hole Optimization José Nelson Amaral
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Chapter 10 Code Optimization. A main goal is to achieve a better performance Front End Code Gen Intermediate Code source Code target Code user Machine-
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Compiler Construction by Muhammad Bilal Zafar (AP)
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Ch. 3: Compilation Spring 2007 Marco Valtorta.
Goran Šuković, University of Montenegro 1/21 Compiler Construction Course at University of Montenegro 7 th Workshop on “Software Engineering Education.
Interpreter for ZOOM-I Andrew Deren Initial Presentation - SE690 5/30/03
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Ch.8: Interpretation Spring 2008 Marco Valtorta.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Program 1 Fall 2008 Marco Valtorta
CS 536 Spring Intermediate Code. Local Optimizations. Lecture 22.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.12 [P]: Individuals and Relations Proofs.
4/23/09Prof. Hilfinger CS 164 Lecture 261 IL for Arrays & Local Optimizations Lecture 26 (Adapted from notes by R. Bodik and G. Necula)
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Ch.2: Language Processors Spring 2010 Marco.
Programming Languages Structure
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Introduction Spring 2007 Marco Valtorta
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Ch.2 Spring 2007 Marco Valtorta
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Ch.1 Spring 2010 Marco Valtorta
DATA LOCALITY & ITS OPTIMIZATION TECHNIQUES Presented by Preethi Rajaram CSS 548 Introduction to Compilers Professor Carol Zander Fall 2012.
CPSC 388 – Compiler Design and Construction Lecture: MWF 11:00am-12:20pm, Room 106 Colton.
5.3 Machine-Independent Compiler Features
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Introduction For some compiler, the intermediate code is a pseudo code of a virtual machine. Interpreter of the virtual machine is invoked to execute the.
Programming Languages Summer
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
February 25, ICE 1341 – Programming Languages (Lecture #1) In-Young Ko Programming Languages (ICE 1341) Lecture #1 Programming Languages (ICE 1341)
Array Dependence Analysis COMP 621 Special Topics By Nurudeen Lameed
Compiler course 1. Introduction. Outline Scope of the course Disciplines involved in it Abstract view for a compiler Front-end and back-end tasks Modules.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
Some issues in teaching compiler course in Polytechnic University Tirana Prof.Asoc.Dr Elinda Kajo Mece Polytechnic University of Tirana.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Chih-Hung Wang Chapter 0: Introduction 參考書目 Leland L. Beck, System Software: An Introduction to Systems Programming (3rd), Addison-Wesley,
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
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Course Overview for Compilers J. H. Wang Sep. 14, 2015.
1 CS308 Compiler Theory. 2 Course Information Instructor : –Prof. Minyi Guo –Yao Shen Course.
Course Overview for Compilers J. H. Wang Sep. 20, 2011.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
1 February 23, February 23, 2016February 23, 2016February 23, 2016 Azusa, CA Sheldon X. Liang Ph. D. Computer Science at Azusa Pacific University.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Operational Semantics (Slides mainly.
7. Symbol Table Chih-Hung Wang Compilers References 1. C. N. Fischer and R. J. LeBlanc. Crafting a Compiler with C. Pearson Education Inc., D.
CSCE 343 – Programming Language Concepts Welcome!.
COMP 3002: Compiler Construction Pat Morin School of Computer Science.
Chapter 1. Introduction.
COMP Compilers Lecture 1: Introduction
Compiler Design (40-414) Main Text Book:
Code Optimization.
Concepts of Programming Languages
Topic: Programming Languages and their Evolution + Intro to Scratch
Why study programming languages?
SYSTEM SOFTWARE & COMPILER DESIGN
PROGRAMMING LANGUAGES
8. Symbol Table Chih-Hung Wang
Chapter 1 Reasons to study concepts of PLs Programming Domains
课程名 编译原理 Compiling Techniques
1.1 Reasons to study concepts of PLs
CISC 7120X Programming Languages and Compilers
Course supervisor: Lubna Siddiqui
COMP Compilers Lecture 1: Introduction
CSCE 531 Compiler Construction Ch.2
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
CSCE 390 Professional Issues in Computer Science and Engineering Ch
Optimization 薛智文 (textbook ch# 9) 薛智文 96 Spring.
CISC 7120X Programming Languages and Compilers
Reasons To Study Programming Languages
Presentation transcript:

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Final Lecture of the Semester Spring 2010 Marco Valtorta

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Acknowledgment The slides are based on the textbook and other sources, including slides from Bent Thomsen’s course at the University of Aalborg in Denmark and several other fine textbooks The three main other compiler textbooks I considered are: –Aho, Alfred V., Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, & Tools, 2 nd ed. Addison-Welsey, (The “dragon book”) First edition, without the second author, was published in 1988 –Appel, Andrew W. Modern Compiler Implementation in Java, 2 nd ed. Cambridge, (Editions in ML and C also available; the “tiger books”) –Grune, Dick, Henri E. Bal, Ceriel J.H. Jacobs, and Koen G. Langendoen. Modern Compiler Design. Wiley, 2000

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Efficiency Efficiency is especially an issue for register machines –Example 9.5 –Hand-developed assembly code is faster Code transformations (“optimizations”) –Constant folding, including address folding for arrays and records (ex. 9.6) –Common expression elimination (ex. 9.7) –Code movement (ex. 9.8)

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Blocks and Data Flow Analysis Handout (dragon books: 9.4 [1988]) Partition into basic blocks Transformation on basic blocks –Common subexpression elimination –Dead code elimination –Renaming of temporary variables –Interchange of two independent adjacent statements Basic blocks form a flow graph

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Live Variable Analysis Handout (dragon book: [2007]) Could variable x at point p be used along some path in the flow graph starting at p?

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Language Lifecycle Language processors do not exist in a vacuum Waterfall, Iterative Development, RUDE Support for programming in the large and programming in the small is necessary –This goes beyond compiler design Waterfall requires support for design-by-contract Iterative development requires support for prototyping RUDE may be better supported by weaker typing

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Interpreters are everywhere on the web Web-Client Web-Server DBMS Database Output SQL commands PHP Script HTML-Form (+JavaScript) Reply WWW Submit Data Call PHP interpreter Response LAN Web-Browser Database Server

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Parallel Programming People still we do not know how to do parallel programming in an imperative style, and the machines are catching up! Solution 1: use a functional or logical style Solution 2: concentrate on numerical computation Solution 3: support specific computer architectures

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Compilers, Language Design, and Specifications It is hard to write informal specifications that are unambiguous –Example: repeat … until exercise It seems impossible to teach a compiler course without also teaching language design –Example: recursive data types

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Why Study PL Concepts? 1.Increased capacity to express ideas 2.Improved background for choosing appropriate languages 3.Increased ability to learn new languages 4.Better understanding of the significance of implementation 5.Increased ability to design new languages 6.Background for compiler writing 7.Overall advancement of computing 8.Distinguish essential from accidental features