Overview of the Class

Similar documents
Overview of the Class

UG3 Compiling Techniques Overview of the Course

Overview of the Course

Compiling Techniques

CS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Compiler Design. Dr. Chengwei Lei CEECS California State University, Bakersfield

CSCI 565 Compiler Design and Implementation Spring 2014

Compilers. Computer Science 431

Compilers and Interpreters

ECE573 Introduction to Compilers & Translators

Compilers for Modern Architectures Course Syllabus, Spring 2015

CS 432 Fall Mike Lam, Professor. Compilers. Advanced Systems Elective

CS/SE 153 Concepts of Compiler Design

The University of Iowa. 22c181: Formal Methods in Software Engineering. Spring Course Overview

ECE : Fundamentals of Wireless Networking - Spring 2007

Operating Systems, Spring 2015 Course Syllabus

CMPE 152 Compiler Design

Principles of Compiler Construction ( )

Undergraduate Compilers in a Day

Rochester Institute of Technology Golisano College of Computing and Information Sciences Department of Information Sciences and Technologies

CMPE 152 Compiler Design

CMPE 152 Compiler Design

Principles of Compiler Construction ( )

CS202 Compiler Construction. Christian Skalka. Course prerequisites. Solid programming skills a must.

CS/SE 153 Concepts of Compiler Design

CMPUT 391 Database Management Systems. Fall Semester 2006, Section A1, Dr. Jörg Sander. Introduction

Introduction to Compiler Construction

CS 241 Data Organization using C

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

Introduction to Computer Systems

General course information

CS 245: Database System Principles

Introduction to Compiler Construction

CS Compiler Construction West Virginia fall semester 2014 August 18, 2014 syllabus 1.0

CSC 111 Introduction to Computer Science (Section C)

Compiler Design (40-414)

CS 241 Data Organization. August 21, 2018

Lexical Analysis. Introduction

CS 4317: Human-Computer Interaction

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

1/11/11. o Syllabus o Assignments o News o Lecture notes (also on Blackboard)

Course Syllabus - CNT 4703 Design and Implementation of Computer Communication Networks Fall 2011

San José State University Department of Computer Science CS151, Section 04 Object Oriented Design Spring 2018

CSE 504: Compiler Design

Name of chapter & details

Philadelphia University Faculty of Information Technology Department of Computer Science --- Semester, 2007/2008. Course Syllabus

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

College Algebra. Cartesian Coordinates and Graphs. Dr. Nguyen August 22, Department of Mathematics UK

CS131: Programming Languages and Compilers. Spring 2017

ESET 369 Embedded Systems Software, Fall 2017

ECE Introduction to Compilers and Translation Engineering

12048 Compilers II. Computer Science Engineering, 8º semester Mandatory, 2º Cycle. Theoretical credits: 3.0 Lab credits: 1.5. Theory: José Neira

CSCI455: Introduction to Programming System Design

Web Programming Spring 2010

ESET 349 Microcontroller Architecture, Fall 2018

San José State University Department of Computer Science CS049J, Programming in Java, Section 2, Fall, 2016

Runtime Support for Algol-Like Languages Comp 412

Academic Formalities. CS Language Translators. Compilers A Sangam. What, When and Why of Compilers

Introduction to Computer Systems

Fall Principles of Knowledge Discovery in Databases. University of Alberta

INFS 2150 (Section A) Fall 2018

CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers

CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers

CSC 443: Web Programming

PLAGIARISM. Administrivia. Compilers. CS143 11:00-12:15TT B03 Gates. Text. Staff. Instructor. TAs. Office hours, contact info on 143 web site

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

Intermediate Representations

Course and Contact Information. Course Description. Course Objectives

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus

CS 536. Class Meets. Introduction to Programming Languages and Compilers. Instructor. Key Dates. Teaching Assistant. Charles N. Fischer.

Computer Science Technology Department

Compiling Regular Expressions COMP360

Object-Oriented Programming CSCI-UA

Advanced Programming Concepts. CIS 15 : Spring 2007

Translator Design CRN Course Administration CMSC 4173 Spring 2017

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1,2 and 3, Spring 2017

Course and Contact Information. Course Description. Course Objectives

San José State University Computer Science Department CS49J, Section 3, Programming in Java, Fall 2015

Beijing Jiaotong University CS-23: C++ Programming Summer, 2019 Course Syllabus

Compiler Construction

Introduction to Programming System Design CSCI 455x (4 Units)

CSEP 501 Compilers. Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter /8/ Hal Perkins & UW CSE B-1

CS 132 Compiler Construction

San José State University Computer Science Department CS157A: Introduction to Database Management Systems Sections 5 and 6, Fall 2015

CSE 401/M501 Compilers

Evaluation Scheme L T P Total Credit Theory Mid Sem Exam

EECE.2160: ECE Application Programming Spring 2017

GUJARAT TECHNOLOGICAL UNIVERSITY

Syntax Analysis, V Bottom-up Parsing & The Magic of Handles Comp 412

Administrivia. Compilers. CS143 10:30-11:50TT Gates B01. Text. Staff. Instructor. TAs. The Purple Dragon Book. Alex Aiken. Aho, Lam, Sethi & Ullman

CS535: Interactive Computer Graphics

San José State University College of Science/Department of Computer Science CS 152, Programming Language Paradigms, Section 03/04, Fall, 2018

CS157a Fall 2018 Sec3 Home Page/Syllabus

ME451 Kinematics and Dynamics of Machine Systems

DEPARTMENT OF INFORMATION TECHNOLOGY AUTOMATA AND COMPILER DESIGN. B.Tech-IT, III Year -I Sem

CS503 Advanced Programming I CS305 Computer Algorithms I

CS 200, Section 1, Programming I, Fall 2017 College of Arts & Sciences Syllabus

CSCI Compiler Design

Transcription:

Overview of the Class Copyright 2014, Pedro C. Diniz, all rights reserved. Students enrolled in the Compilers class at the University of Southern California (USC) have explicit permission to make copies of these materials for their personal use.

Critical Facts Welcome to Compilers Compiler Design and Implementation Topics in the design of programming language translators, including parsing, run-time storage management, error recovery, code generation, and optimization Instructor: Dr. Pedro C. Diniz () Office Hours: Thursday, 11.00 12.00 (noon), SAL 216 Textbook: Enginering a Compiler by Cooper and Torczon Web Site: http://www.isi.edu/~pedro/teaching/csci565-spring14 Projects, homework, slides, sample solved exercises I will not have handouts in class; get them from the web in electronic format 2

Basics of Grading Exams Midterm (in class) 15% Final (in class) 20% Homeworks (4) 20% Programming Projects Developing Your Own Compiler/Language Syntactic & Semantic Analysis 10% Translation and Code Generation 25% Website has a lot of info and code! How to Get Started. Links to Lex, Yacc. Basic Data Structures (linked-list, arrays, graphs, ) 3

Homeworks Individual Homeworks & Projects Designed to prepare you for the Midterm and Final exams Projects Building a compiler that generate 3-address code for a toy C-like language Individual effort Some programming but not much. Plenty of auxiliary code basis so that you can focus on the concepts Use Lex/Flex and Yacc/Bison tools (you are welcome to use other tools such as JavaCC) You can develop it on your machine but need to demo on UNIX @ USC Increasing difficulty at Grade Weight First project focus on semantic checking (grammar provided) Second project focus on code generation. You can use a simulator we provide to validate your compilation. 4

Tentative Syllabus Introduction & Overview Lexical Analysis: Scanning Syntactic Analysis: Parsing Syntax-Directed Translation & Parse Tree Intermediate Code Generation Control-Flow Analysis Semantic Analysis and Error Checking Run-Time Environment & Storage Organization Data-Flow Analysis Code Generation Instruction Scheduling Register Allocation More Optimizations (time permitting) Lecture 1 Lecture 2 Lecture 3 Lecture 4 Lecture 5 Lecture 6 Lecture 7 Lecture 8 Lecture 9 Lecture 10 HW 1 HW 2 Project 1 HW 2 Project 2 HW 4 5

Class-Taking Technique for Compilers I will use projected material extensively I will moderate my speed, you sometimes need to say STOP You should read the notes before coming to class 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 Compilers is a programming course (but not much) Projects are graded on functionality, documentation, and lab reports more than style (results do matter) 6

On-line Material for the Class Class Web Site http://www.isi.edu/~pedro/teaching/csci565-spring14 Class Forum on DEN 7

Schedule of the Class USC Spring 2010 Monday Tuesday Wednesday Thursday Friday 8:00-8:30 8:30-9:00 Lectures 9:00-9:30 9:30-10:00 RTH 10:00-10:30 217 10:30-11:00 11:00-11:30 Office Hours 11:30-12:00 SAL 216 12:00-12:30 12:30-13:00 13:00-13:30 13:30-14:00 14:00-14:30 14:30-15:00 15:00-15:30 15:30-16:00 16:00-16:30 16:30-17:00 17:00-17:30 17:30-18:00 18:00-18:30 18:30-19:00 19:00-19:30 19:30-20:00 20:00-20:30 Lectures Office Hours 8

Unsolicited Advise This is a tough Class Structured in packets of material Study regularly each subject We are here to Help Just drop by the office during any of my office hours Whenever I m around Do not Cheat! I get upset (that is not good!) Later you might need a letter of reference from me 9

Compilers What is a Compiler? 10

Compilers What is a Compiler? 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? 11

Compilers What is a Compiler? 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 12

Compilers What is a Compiler? 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 13

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 14

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 15

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 16

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 17

Intrinsic Interest Compiler Construction involves Ideas from many different parts of Computer Science Artificial intelligence Algorithms Theory Systems Architecture Greedy algorithms Heuristic search techniques Graph algorithms, union-find Dynamic programming DFAs & PDAs, pattern matching Fixed-point algorithms Allocation & naming, Synchronization, locality Pipeline & hierarchy management Instruction set use 18

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 19

About the Instructor My own Research Compiling for Advanced Architectures Systems Optimization for Embedded Systems (space, power, speed) Program Analysis and Optimization Reliability and Distributed Embedded Systems Rethinking the fundamental structure of optimizing compilers Thus, my Interests lie in Interplay between Compiler and Architecture Static Analysis to discern Program Behavior Run-time Performance Analysis 20