1 / 15

Compiler Design

Compiler Design. Hongwei Xi Comp. Sci. Dept. Boston University. 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

raquel
Télécharger la présentation

Compiler Design

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. Compiler Design Hongwei Xi Comp. Sci. Dept. Boston University

  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 BU CAS CS525

  3. Programming Language • Java is chosen as the implementation language • This allows students to learn first-handedly as to how the object-oriented programming can be used effectively in constructing (relatively) large programs. BU CAS CS525

  4. Course Overview • Lexical Analysis • Lexical tokens • Regular expressions • Finite automata: DFA and NFA • Parsing • Context-free grammars • LL parsing • Parsing combinators • LR parsing BU CAS CS525

  5. Course Overview • Abstract Syntax • Semantic actions • Abstract parse trees • Semantic Analysis • Symbol tables • Bindings • Type-checking • Expressions • Declarations BU CAS CS525

  6. 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 BU CAS CS525

  7. 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 BU CAS CS525

  8. 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 BU CAS CS525

  9. 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 BU CAS CS525

  10. Homework • There are approximately 8 assignments • Individualwork only unless specified otherwise! • Clarity and elegance count • It is not enough to just “work” on test data BU CAS CS525

  11. 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 BU CAS CS525

  12. Pleas • 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! BU CAS CS525

  13. 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 BU CAS CS525

  14. Important Course Information • Lecture Times: 3-4PM MWF • Classroom: BRB 122 @ 565 Commonwealth Ave • Course Homepage:http://www.cs.bu.edu/~hwxi/academic/courses/CS525.html • Instructor: Hongwei Xi • Office Hours: Monday 4:00-6:00 PM, Thursday 5:00-6: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) BU CAS CS525

  15. The End Questions? BU CAS CS525

More Related