CSE 450

Translation of Programming Languages
Spring Semester, 2012
Dr. Bill Punch
Mon,Wed: 10:20-11:40, 1225 EB

Description

Theory and practice of programming language translation. Languages, grammars and parsing. Lexical, syntactic and semantic analysis. Compile-time error handling. Code optimization and code generation.

Objectives

This course will study the theory, algorithms, and mathematics necessary for translation of computer programming languages. We will examine the structure of compilers including lexical analysis, syntax and semantic analysis, code generation and optimization, and general compiler design. We will learn how these methods can be used for compiler design as well as other applications such as networking and multimedia file formats. Students completing this course are expected to be able to:

Instructor

Bill Punch
3147 Engineering Building
Office Hours: Tu, Th after class or by appointment
Phone: 517-353-3541
email:punch@msu.edu email is by far the best way to contact me

Teaching Assistant

Joseph Roth
Office Hours:
TBD
Location: 1320 Engineering Building
email: rothjos1@msu.edu

Course Web Site

Information related to the course is available on the Internet at: http://www.cse.msu.edu/~cse450. Information is also distributed to the class through the angel web site, see http://www.angel.msu.edu

Course Textbooks

Compilers: Principles Techniques, and Tools by Aho, Lam, and Ullman
Addison-Wesley; 2nd edition, ISBN: 0321486811
Required - Main Textbook
The Definitive ANTLR Refernce by Parr
Online Optional, but useful
Flex and Bison by John Levine
O'Reilly; SBN: 0321486811; Avaliable on itunes
Optional, but very useful

Lecture

Lectures will be conducted in 151 Comm Arts on Tue and Thur from 3:00 to 4:20. Regular attendance at lecture is critical to success in this course.

Laboratory Sessions

There are no scheduled labs for this course. However, there will be significant project work.

Course Grades

Each student's course grade will be based on the sum of the points earned in the following categories:

Examinations (30% of total course points)
Computer Projects (60% of total course points)
In Class Exercises ( 10% of total course points)

The following table gives the scale for course grades:

4.0 90% of points available
3.5 85% of points available
3.0 80% of points available
2.5 75% of points available
2.0 70% of points available
1.5 65% of points available
1.0 60% of points available


As always, the instructor reserves the right to adjust the scale for course grades, if necessary . This is not anticipated!

Important Dates

See: Academic Calendar Spring 12 for complete dates, but note that:

Exams

One midterm examination (in class) and a final examination will be conducted during the semester, and will constitute 30% of the total course points. Midterm will be in class exams held during the regular class times in Engineering 1225 Final Exam Schedule link: All issues related to the final examination will follow the policies and schedule of the University: MSU Final Exam Schedule

In-Class Exercises

Periodically, which is to say very often, there will be unannounced in-class worksheets. In sum they constitute 10% of the course points. This assignment will be completed during the lecture period. Notice: these exercises are to be done only in class and cannot be made up! If you miss class, you miss it. The two lowest-scores are discarded in the grading process. This is provided to allow for some legitimate missing of classes. If you must miss more than two classes for university excused absences, missed exercies then and only then can be made up.

Readings

Reading assignments will be posted on the website during the semester.  Please check back regularly for updates.

Laptops in Class

This is an interesting topic. On the one hand, it seems only natural that CS students bring their gear to a lecture where they can try things out during lecture. On the other, we are all painfully clear that is not how they are used during class. For the most part, I really don't care. You are big girls and big boys and you can come to class or not, pay attention or not. Your call. However, I also know that it can be terribly distracting to others. So we'll see how it goes. If it is a problem, I'll ban them or restrict their usage. Please be respectful of others!

Computer Projects

Computer projects in sum will constitute 60% of the total course points. It is expected that there will be five or six such projects but will have to see how that goes. Projects will normally be due on Tuesdays of the semester. Project solutions are submitted electronically to Handin. A copy must be saved on CSE disks (the H drive from the lab computers) where they are archived in case of problems with electronic submission -- that is the only acceptable evidence of completion.

Teams

Some computer projects may be assigned to be done collaboratively. You and your partners form a team for that project and will normally receive the same grade on that project.

Cheating

I assume that this is an upperclass course with students who know better. Don't cheat. Don't copy code, don't share code. You should know now how to discuss broadly the issues without providing specific code.

Each project solution is electronically compared to all other solutions to identify similar solutions. Teams or individuals that submit solutions that are essentially identical will receive a score of zero for that assignment. A student who is involved in a second such incident of academic dishonesty will receive a grade of zero in the course. Since the comparison is done off campus, to protect your privacy do not include your name or PID in your project solution.

Notes

The instructor reserves the right to modify course policies, the course calendar, and assignment specifications.

Any extenuating circumstances which impact on your participation in the course should be discussed with your lecture instructor as soon as those circumstances are known (such as absences due to illness, religious observances, or other required school activities).

All students are expected to be responsible users of the computer system provided for this course. Account usage guidelines published by the Department of Computer Science and Engineering are posted under: Account Usage Guidelines

You are responsible for familiarity with the course policies printed in the course pack and posted under: Course Policies

Here are some brief comments about several of those policies:
  1. Make-ups for examinations may be arranged, if your absence is caused by documented illness or personal emergency. A written explanation (including supporting documentation) must be submitted to your lecture instructor; if the explanation is acceptable, an alternative to the examination will be arranged. When possible, make-up arrangements should be completed in advance.
  2. A student who is unable to complete a computer project by the specified due date because of illness or personal emergency should contact his or her lecture instructor. If the student's explanation is acceptable, the assignment due date will be extended (or his or her lecture instructor will make other appropriate arrangements).
  3. To be eligible for credit, each solution to a computer project must fulfill the published requirements, must be submitted by the published due date, and must be your own work.
  4. The Department of Computer Science and Engineering expects all students to adhere to MSU's policy on Integrity of Scholarship and Grades, which includes the statement, ".... all academic work will be done by the student to whom it is assigned, without unauthorized aid of any kind". The complete text of the University policy is posted under: University Policy on Scholarship and Grades . Students who violate this policy may receive a failing grade in the course.
  5. Students requiring accommodation under the Americans with Disabilities Act (ADA) with MSU's Resource Centers for Disabilities (RCPD) should bring their Verified Individualized Services and Accommodations (VISA) form to the instructor as near the beginning of the term as possible.
  6. Teaching Assistant help is provided for this course, but if you should desire tutoring, the Diversity Programs Office (1108 EB) (http://www.egr.msu.edu/egr/departments/dpo) coordinates volunteer and paid tutoring assistance available to all students, for many common classes.
  7. Accommodations will be made for religious observances, if requests are made well in advance. Since religious observances are usually known at the beginning of class and assignment due dates are in this syllabus we expect students to request accommodation at the beginning of the semester. See MSU's policy on Religious Observance for more details.

Topics

  • Overview - Chapter 2 (Dragon book)
  • Lexical Analysis - Chapter 3 (Dragon book)
  • Parsing
    • Syntax Analysis - Chapter 4 (Dragon book)
    • Top Down
    • Bottom Up
  • Abstract Syntax Trees - Chapter 5 (Dragon book)
  • Symbol Tables
  • Semantic Analysis
  • X86 assembly code
  • Optimization
  • build systems (Make)
  • version control systems (git)
  • documentation systems (doxygen)
  • lexical analysis and parsing (ANTLR)