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 for Modern Architectures Course Syllabus, Spring 2015

CS 241 Data Organization using C

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

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

ECE : Fundamentals of Wireless Networking - Spring 2007

Operating Systems, Spring 2015 Course Syllabus

ECE573 Introduction to Compilers & Translators

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

CS 241 Data Organization. August 21, 2018

CS 245: Database System Principles

Principles of Compiler Construction ( )

Principles of Compiler Construction ( )

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

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

CSC 111 Introduction to Computer Science (Section C)

Compilers and Interpreters

CS/SE 153 Concepts of Compiler Design

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

CS535: Interactive Computer Graphics

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

ESET 349 Microcontroller Architecture, Fall 2018

Introduction to Computer Systems

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

CMPE 152 Compiler Design

CSE 504: Compiler Design

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

Introduction to Computer Systems

ESET 369 Embedded Systems Software, Fall 2017

Runtime Support for Algol-Like Languages Comp 412

CMSC 341. Shawn Lupoli (substituting for Nilanjan Banerjee) UMBC CMSC 341 Intro 1

CS 4317: Human-Computer Interaction

ECE Introduction to Compilers and Translation Engineering

CS/SE 153 Concepts of Compiler Design

Operating Systems (ECS 150) Spring 2011

CMPE 152 Compiler Design

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

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

General course information

CMPE 152 Compiler Design

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

CS157a Fall 2018 Sec3 Home Page/Syllabus

Course and Contact Information. Course Description. Course Objectives

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

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

CS 553: Algorithmic Language Compilers (PLDI) Graduate Students and Super Undergraduates... Logistics. Plan for Today

CSC 443: Web Programming

INFS 2150 (Section A) Fall 2018

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

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

EECE.2160: ECE Application Programming Spring 2017

Fall Principles of Knowledge Discovery in Databases. University of Alberta

Web Programming Spring 2010

Lexical Analysis. Introduction

Course and Contact Information. Course Description. Course Objectives

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Fall 2017

Menu. Class 1: Introduction. Staff. Course Structure and Expectations. Contacting Us. Contacting You

CSC116: Introduction to Computing - Java

Intermediate Representations

Object-Oriented Programming CSCI-UA

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

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

ESET 369 Embedded Systems Software, Spring 2018

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

Spring 2016 :: CSE 502 Computer Architecture. Introduction. Nima Honarmand

Computer Science Technology Department

CMPS 182: Introduction to Database Management Systems. Instructor: David Martin TA: Avi Kaushik. Syllabus

CSCI455: Introduction to Programming System Design

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

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

CSC116: Introduction to Computing - Java

Time and Location: T 6:30 PM to 9:20 PM SAL 127 (Section 1, 28758) Th 6:30 PM to 9:20 PM SAL 127 (Section 2, 28759)

CSCD18: Computer Graphics. Instructor: Leonid Sigal

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

Undergraduate Compilers in a Day

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

Advanced Programming Concepts. CIS 15 : Spring 2007

CS240: Programming in C

General Course Information. Catalogue Description. Objectives

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

Tutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment

More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6

CSc 2310 Principles of Programming (Java) Jyoti Islam

Web Programming Fall 2011

Database Systems Management

Linear Algebra Math 203 section 003 Fall 2018

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

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

Computer Science Technology Department

Internet Web Technologies ITP 104 (2 Units)

CS61C Machine Structures. Lecture 1 Introduction. 8/27/2006 John Wawrzynek (Warzneck)

CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy) August 29 December 12, 2017 Lecture 1-29

Transcription:

Overview of the Class Copyright 2015, 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: Friday, 1.00 4.20 PM, TTH 208 Textbook: Enginering a Compiler by Cooper and Torczon Web Site: http://www.isi.edu/~pedro/teaching/csci565-fall15 Projects, homework, slides, sample solved exercises I will not have handouts in class; get them from the web in electronic format 2 1

Basics of Grading Exams Midterm (aka first test, in class) 15% Final (aka second test, in class) 20% Homeworks (4) 20% Programming Projects Developing Your Compiler Analyses and Passes in LLVM Control-Flow Analysis 10% Code Generation & Register Allocation 25% Website has a lot of info and code! How to Get Started. Links to LLVM Basic Data Structures (linked-list, arrays, graphs, ) 3 Homeworks Homeworks & Projects Individual Designed to prepare you for the Midterm and Final exams Projects Use the LLVM infrastructure to perform simple scalar analysis. Code generation for a simplified set of constructs targeting the MIPS architecture (or another ISA you suggest) and preforming some limited register allocation. Use of an existing MIPS software simulator for validation of your outputs. Individual effort Some programming but plenty of support from TA. Plenty of auxiliary code basis so that you can focus on the concepts You can develop it on your machine but need to demo on UNIX @ USC Increasing difficulty at Grade Weight First project focus is simpler hence less weight Second project focus on code generation. You can use a simulator we provide to validate your compilation. 4 2

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 3

On-line Material for the Class Class Web Site http://www.isi.edu/~pedro/teaching/csci565-fall15 Spring 2015 Class Forum on Piazza 7 Schedule of the Class USC Spring)2010 Monday Tuesday Wednesday Thursday Friday 8:00$%$8:30 8:30$%$9:00 9:00$%$9:30 9:30$%$10:00 0:00$%$10:30 0:30$%$11:00 1:00$%$11:30 1:30$%$12:00 2:00$%$12:30 2:30$%$13:00 3:00$%$13:30 3:30$%$14:00 Lectures 4:00$%$14:30 4:30$%$15:00 TTH 5:00$%$15:30 208 5:30$%$16:00 6:00$%$16:30 Office Hours 6:30$%$17:00 PHE 514 7:00$%$17:30 7:30$%$18:00 8:00$%$18:30 8:30$%$19:00 9:00$%$19:30 9:30$%$20:00 0:00$%$20:30 Lectures Office Hours 8 4

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 5

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 6

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 7

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 8

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 9

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/verify Program Behavior High-Performance, Reconfigurable and Configuration Computing Resilience Computing 20 10