1 / 7

Introduction & Overview CS4533 from Cooper & Torczon

Introduction & Overview CS4533 from Cooper & Torczon. Syllabus. Overview Lexical Analysis (Scanning) Syntactic Analysis (Parsing) Context-Sensitive (Semantic) Analysis Intermediate Representations Symbol Tables Instruction Selection Register Allocation Instruction Scheduling.

Download Presentation

Introduction & Overview CS4533 from Cooper & Torczon

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction & OverviewCS4533from Cooper & Torczon

  2. Syllabus Overview Lexical Analysis (Scanning) Syntactic Analysis (Parsing) Context-Sensitive (Semantic) Analysis Intermediate Representations Symbol Tables Instruction Selection Register Allocation Instruction Scheduling from Cooper & Torczon

  3. 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, which are then interpreted This course deals mainly with compilers Many of the same issues arise with interpreters Classic qualifying examination question from Cooper & Torczon

  4. Why study compilation? Success Stories Application of theory to practice Scanning, parsing, static analysis, instruction selection Many practical applications have embedded languages Commands, macros, formatting tags … Humbling failures Problems that are truly hard Can’t check automatically if a grammar describes the language Can’t check automatically if a grammar is ambiguous Requires ad hoc handling of some issues Practical algorithmic & engineering issues Approximating hard problems Emphasis on efficiency & scalability Small issues can become important (as in real life) from Cooper & Torczon

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

  6. Experience You have used several compilers. What qualities do you want in a compiler that you buy ? from Cooper & Torczon

  7. Experience You have used several compilers. What qualities do you want in a compiler that you buy ? 1. Correct Code 2. Output runs fast 3. Compiler runs fast 4. Compile time proportional to program size 5. Support for separate compilation 6. Good diagnostics for syntax errors 7. Works well with debugger 8. Good diagnostics for flow anomalies 9. Good diagnostics for storage leaks 10. Consistent, predictable optimization from Cooper & Torczon

More Related