Download presentation
Presentation is loading. Please wait.
1
January 12, 2004 1 Compiler Design Hongwei Xi Comp. Sci. Dept. Boston University
2
January 12, 2004BU CAS CS525 2 Welcome! Compiler Design – Introduction to some basics in the compiler design and implementation The theory behind various components of a compiler The programming techniques involved to put the theory into practice The interfaces used to modularize the compiler
3
January 12, 2004BU CAS CS525 3 Programming Language (I) Standard ML (SML) is chosen as the implementation language – This allows students to learn first-handedly as to how the module system of SML can be used effectively in constructing (relatively) large programs.
4
January 12, 2004BU CAS CS525 4 Programming Language (II) Standard ML (SML) – http://cm.bell-labs.com/cm/cs/what/smlnj http://cm.bell-labs.com/cm/cs/what/smlnj If you know little or nothing about SML, please learn it now!
5
January 12, 2004BU CAS CS525 5 Course Overview Lexical Analysis – Lexical tokens – Regular expressions – Finite automata: DFA and NFA Parsing – Context-free grammars – LL parsing Parsing combinators – LR parsing
6
January 12, 2004BU CAS CS525 6 Course Overview Abstract Syntax – Semantic actions – Abstract parse trees Semantic Analysis – Symbol tables – Bindings – Type-checking Expressions Declarations
7
January 12, 2004BU CAS CS525 7 Course Overview Activation Records – Stack frames Translation to Intermediate Code – Intermediate representation trees – Translation into trees – Declarations Basic Block and Traces – Canonical trees – Conditional Branches
8
January 12, 2004BU CAS CS525 8 Course Overview Instruction Selection – Algorithm for instruction selection Liveness Analysis Register Allocation – Coloring by simplification – Coalescing – Precolored nodes – Graph coloring implementation – Register allocation for trees Putting all together
9
January 12, 2004BU CAS CS525 9 What is this course like? It proceeds in a fast pace – You are expected to read the text that we may not have time to cover in class – You are expected to try programming examples that we may not have time to explain in class – You may need to take notes on the materials we cover that are not in the textbook, though I will minimize the need for note-taking by providing you with as many notes as possible
10
January 12, 2004BU CAS CS525 10 What is this course like? You are to have a rapid exposure to many concepts in programming languages You are expected to gain a great deal more understanding of programming, which can be really helpful for you to pursue other subjects in computer science Above all, I hope that you will find a great deal more fun in programming
11
January 12, 2004BU CAS CS525 11 Homework There are approximately 8 assignments – Individual work only unless specified otherwise! Clarity and elegance count – It is not enough to just “work” on test data
12
January 12, 2004BU CAS CS525 12 Warnings This is likely a challenging course for you as many new and unfamiliar concepts in programming languages are to be introduced rapidly – You may need to give some time for certain concepts to “sink in” – You may find that some programming assignments are difficult and demanding – Please ask for help if you need it: ask it sooner rather than later
13
January 12, 2004BU CAS CS525 13 Pleas This is the first time for me to teach such a course at Boston University – I am likely to be a bit overly ambitious, and – I am certain to make (quite a few) mistakes, but – I will do my best to make the course run as smoothly as possible – Please be patient and ask (a lot of) questions!
14
January 12, 2004BU CAS CS525 14 Academic Integrity Strict adherence to the university guidelines – All work you turn in must be solely your own unless specified otherwise – You are allowed to discuss problems with your classmates but you must write your own code and solutions – Please always remember that every student deserves a chance to achieve a fair grade
15
January 12, 2004BU CAS CS525 15 Important Course Information Lecture Times: 2-3PM MWF Classroom: KCB 103 @ 565 Commonwealth Ave Course Homepage: http://www.cs.bu.edu/~hwxi/academic/courses/CS525.html Instructor: Hongwei Xi Office Hours: Tuesday 1:00-3:00 PM, Friday 3:00-4:00 PM Final Letter Grade Calculation: 50% (homework) + 20% (midterm) + 30% (final) A: 80% or above B: 70% or above C: 60% or above D: 50% or above (curving may be applied if necessary)
16
January 12, 2004BU CAS CS525 16 The End Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.