Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.

Slides:



Advertisements
Similar presentations
1 CIS 461 Compiler Design and Construction Fall 2014 Instructor: Hugh McGuire slides derived from Tevfik Bultan, Keith Cooper, and Linda Torczon Lecture-Module.
Advertisements

Parallel and Distributed Algorithms (CS 6/76501) Spring 2010 Johnnie W. Baker.
The Procedure Abstraction Part I: Basics Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412.
Compiler Construction
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
Wrapping Up Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
Introduction & Overview CS4533 from Cooper & Torczon.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Overview of the Course. Critical Facts Welcome to CISC 672 — Advanced Compiler Construction Instructor: Dr. John Cavazos Office.
Computer Network Fundamentals CNT4007C
The Procedure Abstraction Part I: Basics Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412.
COMPSCI 322: Language and Compilers Class Hour: Hyer Hall 210: TThu 9:30am – 10:15am.
Winter 2015 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University Introduction and Overview.
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.
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
CS461: Principles and Internals of Database Systems Instructor: Ying Cai Department of Computer Science Iowa State University Office:
Lexical Analysis - An Introduction Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at.
Lexical Analysis - An Introduction Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at.
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.
Introduction and Overview Summer 2014 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University.
8/19/2003CS 303 – Administrivia Lecture 0 1 Administrivia Labs Homework Grades Exams Quiz.
1 EECS 6083 Compiler Theory Based on slides from text web site: Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
Introduction to Code Generation Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice.
Compiler Construction (CS-636)
Course Overview for Compilers J. H. Wang Sep. 14, 2015.
Parallel and Distributed Computing Overview and Syllabus Professor Johnnie Baker Guest Lecturer: Robert Walker.
Data Structures and Algorithms in Java AlaaEddin 2012.
Computer Networks CNT5106C
Lecture 02: Compiler Overview Kwangman Man ( SangJi University.
COMP Compilers Lecture 1: Introduction
Computer Network Fundamentals CNT4007C
Advanced Computer Systems
Course Overview - Database Systems
Compiler Design (40-414) Main Text Book:
Chapter 1 Introduction.
Computer Networks CNT5106C
Course Information Mark Stanovich Principles of Operating Systems
Chapter 1 Introduction.
CISC 7120X Programming Languages and Compilers
CS 21a: Intro to Computing I
Computer Science 102 Data Structures CSCI-UA
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
CS416 Compiler Design lec00-outline September 19, 2018
CS190/295 Programming in Python for Life Sciences: Lecture 1
Compiler Construction
Andy Wang Operating Systems COP 4610 / CGS 5765
Lexical Analysis - An Introduction
COMP Compilers Lecture 1: Introduction
Introduction to Code Generation
Wrapping Up Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University have explicit.
Lecture 02: Compiler Overview
Andy Wang Operating Systems COP 4610 / CGS 5765
The Procedure Abstraction Part I: Basics
Organization of Programming Languages
EE422C Software Design and Implementation II
The Last Lecture COMP 512 Rice University Houston, Texas Fall 2003
Andy Wang Operating Systems COP 4610 / CGS 5765
CS416 Compiler Design lec00-outline February 23, 2019
Andy Wang Operating Systems COP 4610 / CGS 5765
Lexical Analysis - An Introduction
CompSci 1: Principles of Computer Science Lecture 1 Course Overview
CISC 7120X Programming Languages and Compilers
Compiler Construction
Dept. of Computer & Information Sciences (Course Introduction)
Andy Wang Operating Systems COP 4610 / CGS 5765
Optimizing Compilers CISC 673 Spring 2009 Course Overview
Lecture 1 Class Overview
Presentation transcript:

Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University have explicit permission to make copies of these materials for their personal use.

Critical Facts Welcome to COMP 412 — Introduction to Compiler Construction Instructor: Dr. Keith D. Cooper (keith@rice.edu) Office Hours: Monday 2 PM to 3 PM, DH 3131 Text: draft of Engineering a Compiler Will appear from Morgan-Kaufmann, next fall Authors appreciate corrections, constructive comments Web Site: http://owlnet.rice.edu/~comp412 Lab handouts, homework, slides (2 per page), practice exams, … I will not have handouts in class; get them from the web Topics in the design of programming language translators, including parsing, run-time storage management, error recovery, code generation, and optimization Labbie data is on the web site

Basis for Grading Exams Homework 10% Projects Midterm 20% Final 20% Register allocator 15% Parser (& scanner) 15% Instruction scheduler 15% This only adds up to 95%. Where is the other 5%? Either in homework or in the final exam. Depends on how much homework I assign. Notice: Any student with a disability requiring accommodations in this class is encouraged to contact me after class or during office hours, and to contact Rice’s Coordinator for Disabled Student Services.

Basis for Grading Exams Homework Projects Midterm Final Register allocator Parser (& scanner) Instruction scheduler Closed-notes, closed-book take home Old exam on web site as an example Reinforce concepts, provide practice Number of assignments t.b.d. High ratio of thought to programming Parser lab might be a team lab Choose your own language (not PERL)

Rough Syllabus Overview § 1 Local Register Allocation § 13.2 Scanning § 2 Parsing § 3 Context Sensitive Analysis § 4 Inner Workings of Compiled Code § 6, 7 Introduction to Optimization § 8 Code Selection § 11 Instruction Scheduling § 12 Register Allocation § 13 More Optimization (time permitting) If it looks like the course follows the text, that’s because the text was written from the course. What about the missing chapters? 5 : We’ll fit it in 9, 10: see CS 512

Class-taking technique for COMP 412 I will use projected material extensively I will moderate my speed, you sometimes need to say “STOP” You should read the book Not all material will be covered in class Book complements the lectures You are responsible for material from class The tests will cover both lecture and reading I will probably hint at good test questions in class COMP 412 is not a programming course Projects are graded on functionality, documentation, and lab reports more than style (results matter) It will take me time to learn your names (please remind me)

Compilers What is a compiler?

Compilers What is a compiler? What is an interpreter? A program that translates an executable program in one language into an executable program in another language The compiler should improve the program, in some way What is an interpreter?

Compilers What is a compiler? What is an interpreter? A program that translates an executable program in one language into an executable program in another language The compiler should improve the program, in some way What is an interpreter? A program that reads an executable program and produces the results of executing that program

Compilers What is a compiler? What is an interpreter? A program that translates an executable program in one language into an executable program in another language The compiler should improve the program, in some way What is an interpreter? A program that reads an executable program and produces the results of executing that program C is typically compiled, Scheme is typically interpreted Java is compiled to bytecodes (code for the Java VM) which are then interpreted Or a hybrid strategy is used Just-in-time compilation

Taking a Broader View Compiler Technology = Off-Line Processing Goals: improved performance and language usability Making it practical to use the full power of the language Trade-off: preprocessing time versus execution time (or space) Rule: performance of both compiler and application must be acceptable to the end user Examples Macro expansion PL/I macro facility — 10x improvement with compilation

Taking a Broader View Compiler Technology = Off-Line Processing Goals: improved performance and language usability Making it practical to use the full power of the language Trade-off: preprocessing time versus execution time (or space) Rule: performance of both compiler and application must be acceptable to the end user Examples Macro expansion PL/I macro facility — 10x improvement with compilation Database query optimization

Taking a Broader View Compiler Technology = Off-Line Processing Goals: improved performance and language usability Making it practical to use the full power of the language Trade-off: preprocessing time versus execution time (or space) Rule: performance of both compiler and application must be acceptable to the end user Examples Macro expansion PL/I macro facility — 10x improvement with compilation Database query optimization Emulation acceleration TransMeta “code morphing”

Why Study Compilation? Compilers are important system software components They are intimately interconnected with architecture, systems, programming methodology, and language design Compilers include many applications of theory to practice Scanning, parsing, static analysis, instruction selection Many practical applications have embedded languages Commands, macros, formatting tags … Many applications have input formats that look like languages, Matlab, Mathematica Writing a compiler exposes practical algorithmic & engineering issues Approximating hard problems; efficiency & scalability

Intrinsic interest Compiler construction involves ideas from many different parts of computer science Artificial intelligence Greedy algorithms Heuristic search techniques Algorithms Graph algorithms, union-find Dynamic programming Theory DFAs & PDAs, pattern matching Fixed-point algorithms Systems Allocation & naming, Synchronization, locality Architecture Pipeline & hierarchy management Instruction set use

Intrinsic merit Compiler construction poses challenging and interesting problems: Compilers must do a lot but also run fast Compilers have primary responsibility for run-time performance Compilers are responsible for making it acceptable to use the full power of the programming language Computer architects perpetually create new challenges for the compiler by building more complex machines Compilers must hide that complexity from the programmer Success requires mastery of complex interactions

Making Languages Usable It was our belief that if FORTRAN, during its first months, were to translate any reasonable “scientific” source program into an object program only half as fast as its hand-coded counterpart, then acceptance of our system would be in serious danger... I believe that had we failed to produce efficient programs, the widespread use of languages like FORTRAN would have been seriously delayed. — John Backus

About the instructor My own research Thus, my interests lie in Compiling for advanced microprocessor systems Optimization for embedded systems (space, power, speed) Interprocedural analysis and optimization Nitty-gritty things that happen in compiler back ends Distributing compiled code in a heterogeneous environment Rethinking the fundamental structure of optimizing compilers Thus, my interests lie in Quality of generated code Interplay between compiler and architecture Static analysis to discern program behavior Run-time performance analysis Replace with your own slide!

Next class The view from 35,000 feet How a compiler works What I think is important What is hard and what is easy