Home | Lectures | Written Assignments | Programming Assignments | Compilers Assignments | Exams | Cool | Piazza Forum

CS 4610 — Programming Languages

and

CS 4501 — Compilers Practicum

Lectures and Details

  • Meetings:
    • Programming Languages: Mondays and Wednesdays, 2:00 to 3:15 in Thornton E303.
    • Compilers Practicum: Thursdays, 2:00 to 3:00 in Olsson 005.
  • Instructor: Wes Weimer.
    • Office Hours: Mondays, Noon-1:30pm, or by appointment (just send email). 423 Rice Hall.
  • Compilers Practicum Instructor: Kevin Leach
    • Compilers Office Hours: Fridays, 2:30-3:30pm. 434 Rice Hall.
  • Teaching Assistants:
    • Wil Thomason: Mondays 6:15pm - 8:15pm, Thornton Stacks
    • Rolph Recto: Tuesdays 5:30pm - 8:00pm, Thornton Stacks
    • Jim Roberts: Wednesdays 8:00pm - 10:00pm, Rice 414
    • Hunter Leath: Fridays Noon - 2pm, Rice 514
  • Textbook: Michael L. Scott's Programming Language Pragmatics (third edition)
  • Prerequisites:
    • CS 2150 with a grade of C- or above.
    • CS 3330 (Architecture) is not a requirement for this course. It is particularly helpful for the Compilers Practicum, however.
    • You should be prepared to learn new languages and write non-trivial programs.
    • CS 4610 is a co-requisite or pre-requisite for the Compilers Practicum.
Wes Weimer

Wes Weimer

Wil Thomason

Wil Thomason

Jim Roberts

Jim Roberts
Kevin Leach

Kevin Leach

Rolph Recto

Rolph Recto

Hunter Leath

Hunter Leath

Overview

Programming Languages (CS 4610) will acquaint you with the fundamental ideas surrounding the design and implementation of high-level programming languages. The course will stress underlying theoretical concepts as well as a significant, practical course project. Students will write Ruby, JavaScript, Python, Haskell and Objective CAML code and gain experience with functional and object-oriented programming. Students will also write a small number of C and almost-Java programs. The programming assignments and final project in this course lead to the construction of an interpreter for a subset of Java. This involves stages of scanning, parsing, type-checking and interpreting code. You will master concepts such as context-free grammars, variable bindings, control flow, types, subtyping, and method invocation.

Compilers Practicum (CS 4501) will acquaint you with the fundamentals of compiler construction: you will produce a program that accepts as input source code in a high-level language and produces as output low-level assembly code representing an executable program. You will master fundamental concepts of dataflow analysis, optimization, code generation, calling conventions, as well as code generation for object-oriented programming.

Because Programming Languages and the Compilers Practicum share a number of core concepts (e.g., intermediate representations, type checking, formal language semantics, etc.), to take the Compilers course you must also take the Programming Languages course. Thus, you have two options:

  1. Take only Programming Languages (CS 4610).
  2. Take both Programming Languages (CS 4610) and also Compilers Practicum (CS 4501).
All descriptions and assignments on this webpage refer to Programming Languages only unless otherwise noted. That is, any assignments related to the Compilers Practicum course will be cleared marked as such and are not required for students not taking the Compilers Practicum.

Written Assignments

Most weeks there will be a written assignment for Programming Languages covering material presented in lecture and the readings. The written assignments are to be completed individually. Written assignments will be graded on a simple 0-5 scale and will not be weighted heavily; the purpose of the assignments is to give you practice with the theoretical material of the course. Spending time on the written assignments pays off on the exams.

Written assignments are due by 5:00pm on the date in the course schedule. Print your name and University email address (e.g., wrw6y) in block letters on each page of your assignment. Assignments may be turned in either in class (before the lecture) or in the CS 4610 Homework Drop Box outside 423 Rice Hall. To ensure that we know where assignments are, use only these two locations to hand in assignments. Notably, putting an assignment under my office door or my faculty mailbox will result in that assignment being ignored. Please do not bring assignments to staff offices.

There are no written assignments for the Compilers Practicum.

Project and Programming Assignments

The Programming Languages course project consists of five programming assignments. Taken together, the assignments form a complete interpreter for Cool, the Classroom Object-Oriented Language. The project components are assigned in roughly increasing order of size and difficulty; proportionately more time is allotted for the later assignments. Later assignments will be weighted more heavily in the final grade.

The Compilers Practicum course project consists of five programming assignments (called "Compilers Assignments" for clarity). These assignments culminate in an optimizing compiler for Cool. Students make work alone or in teams of two (as above).

For both courses, programs will be evaluated for correctness, organization, and documentation.

Programming assignments may be done individually or in teams of two. The first Programming Languages programming assignment must be done individually, however. Teamwork imposes burdens of communication and coordination, but has the benefits of more thoughtful designs and cleaner programs. Team programming is also the norm in the professional world.

Students on a team are expected to participate equally in the effort and to be thoroughly familiar with all aspects of the joint work. Both members bear full responsibility for the completion of assignments. Partners turn in one solution for each programming assignment; each member receives the same grade for the assignment. If a partnership is not going well, the teaching assistants will help to negotiate new partnerships. Teams may not be dissolved in the middle of an assignment without instructor permission.

Programming assignments are due at 11:50pm on the date in the course schedule. Programming assignments will be turned in electronically; the exact method will be announced with the first assignment.

Examinations

Programming Languages will contain two midterm examinations and may contain a final examination. The midterms will be held in class.

The Compilers Practicum may contain a final examination, held concurrently with the Programming Languages final examination.

For both courses, the exams are open-note by default (one piece of paper, front and back, prepared by you). The exams are not open-book. No electronic devices are allowed. No cellphones, PDAs, palmtops, laptops, etc. No early, late or make-up exams will be given. Please plan accordingly.

Grading

It is impossible to pass the course without doing the programming assignments. For Programming Languages, the relative weight of the components of your grade will be approximately:

Programming Languages
Written assignments 8%
Project Programming Assignment I 5%
Project Programming Assignment II 6%
Project Programming Assignment III       6%
Project Programming Assignment IV 10%
Project Programming Assignment V 10%
Midterm Examination I 15%
Midterm Examination II 15%
Final Examination 25%
Note: Poor performance on reading quizzes will result in a lowered score on the corresponding Midterm of Final examination covering the same material.

For the Compilers Practicum, the relative weight of the components of your grade will be approximately:

Compilers Praticum
Compilers Programming Assignment I 5%
Compilers Programming Assignment II     10%
Compilers Programming Assignment III     15%
Compilers Programming Assignment IV     20%
Compilers Programming Assignment V     25%
Final Examination 25%

For both courses, the grades will follow a standard curve: once the final numerical grade has been computed according to the above formula, the average grade will be somewhere in the B range. Doing significantly better than the average will yield an A. Doing significantly worse than the average will yield a C, D or F.

We follow the Honor System. You should know that fairly sophisticated plagiarism detection software will be used on the programming assignments; cheating on an assignment or exam will result in a score of 0 for it as well as a score of 0 for the entire course.

Late Assignment and Regrade Policy

An assignment turned in h hours late has its point value reduced by h%. Thus if you turn in a programming assignment at 8am the next day (i.e., 8 hours late) your grade for that assignment will be multiplied by 0.92.

Regrades for exams, programming assignments, or written assignments must be received within one week of you receiving your score. All regrade requests should be made to the TA. When we regrade an assignment we will look over it very carefully for correctness: it is possible that after a regrade you will end up with fewer points than before the regrade. Regrades should be treated with caution and used only when the graders have made a clear mistake evaluating your work.

All course materials submitted for a grade must be turned in by TBA (usually 11:50pm on Monday, May 5th).

Research

Your class work might be used for research purposes. For example, we may use anonymized student assignments to design algorithms or build tools to help programmers. Any student who wishes to opt out can contact the instructor or TA to do so after final grades have been issued. This has no impact on your grade in any manner.

Students interested in considering undergraduate research should make an appointment to talk about it. I am happy to discuss independent study projects, SEAS STS senior theses, CLAS Distinguished Major theses, paid research work over the summer, research work for credit, and graduate school.

Optional References

You may find the following additional resources helpful: