COMP 3351 Programming Languages, Fall 2008

General Information

Prerequisites

The prerequisites for this class is a good understanding of imperative languages and object-oriented programming, as well as computer organization. You must be able to write and debug non-trivial programs in either C/C++ or Java. You must have a good understanding of basic data structures such as lists, stacks, trees and hashtables.

This is a class on concepts of programming languages. There will be programming assignments designed to make you use and implement various concepts. Programming assignments may involve writing code in C, C++, Java, ML, Prolog and other languages. You do not need to know these languages already; however, you will be expected to pick up some Java quickly on your own.

Lecture Hours and Location

The lectures will be held Tuesdays and Thursdays from 2-4pm in John Greene Hall 316.
The Debian GNU/Linux lab is in John Greene Hall 216. In order to get a door code for the Computer Lab please visit the labcode webpage (after signing up for an account). The code is updated on weekly basis.

Office Hours

Christian Grothoff - JGH 108
Tuesday, Wednesday, Thursday 4-6pm and by appointment. Wednesday office hours may feature a baby.
Craig Ritzdorf - CS Annex, Office 2
Monday, Wednesday 11am-1pm and by appointment, phone extension x17907

Textbook and Syllabus

"Modern Programming Languages: A Practical Introduction", by Adam Brooks Webber, Franklin, Beedle & Associates. This will be the main textbook for the class covering most of the material. The textbook also contains various suggested excercises.
"Version Control with Subversion", on-line book (no need to buy a copy). You must know how to use subversion as a developer (not as an administrator) in order to submit your assignments. Use this book as a reference if you encounter problems. Basic knowledge of chapters 1-3 should be sufficient.

Specific topics that will be covered:

Assignments and Grading

Midterm and final exam will consist of questions where you will need to answer some specific questions in prose or with small fragments of code. In parallel to the course you will develop a growing large programming project in Java on your own. Each of the stages of the project must be turned in for grading by a certain deadline. For some of the larger assignments, a subset of the testcases used for grading will be provided. You are encouraged to write additional testcases and are specifically allowed to exchange those tests with other students.
Students will also be expected to research and present a programming language in class towards the end of the term. Details about these student presentations will be announced in class. The basic expectation is that you will learn enough about a less common language to give a presentation (with slides, examples and demonstration) on the advantages and disadvantages of that particular language.
Students are encouraged to discuss the materials, homework, and projects together. However, all exams and programs must be done individually without consultation of other students (including students from previous years). Academic dishonesty includes, but is not limited to: plagiarism, cheating in exams, unauthorized collaboration and falsifying academic records. Violation of any of these may result in a grade penalty on assignments, an "F" in the course, dismissal from an academic unit, revocation of admission, suspension from the University as well as being roasted over a slow fire.
The textbook contains a large number of smaller exercises. You are encouraged to do those assignments on your own or with other students. Understanding of all of the textbook as well as additional content presented during the lectures will be required for good results on midterm and final exams.
Generally, all assignments are due before class on the date specified with the assignment. Exceptions to this rule (allowing later submission) may be announced in class.

The different kinds of assignments are weighted as follows:

Programming assignments55 Pts
Midterm15 Pts
Final15 Pts
Presentation15 Pts

There are theoretically a total of 100 Pts possible Grades will be given as follows:

GradePoints
A> 90 Pts
A-> 85 Pts
B+> 80 Pts
B> 75 Pts
B-> 70 Pts
C+> 65 Pts
C> 60 Pts
C-> 55 Pts
D≥ 50 Pts
F< 50 Pts

Software

You will need various applications for the class, all of which are freely available for various operating systems. Personally, I'm using Debian GNU/Linux unstable. If you have any problems installing the software, you can always use the department's Debian GNU/Linux machines which have most of the necessary software installed (in order to get the rest, copy the provided JTB and JavaCC scripts and JAR files into your home directory, edit the shell scripts to contain the correct absolute path to the JAR file and make them executable. Finally, add the directory with the shell scripts to your PATH).
Here is a list of the software programs that you will need if you want to use your own system:

Java 6.0
I recommend using the Sun JDK 5.0 or 6.0
JTB
Do NOT download JTB from the page above. Instead, use either the version installed in the lab or the binaries provided here and here.
JavaCC 4.0
Again, please use the version provided here and here.
SML/NJ
Any version should do.
SWI-Prolog
Any version should do.
Subversion
Any version greater than 1.4 should do.
Compilers and tools for C, C++
I recommend installing gcc 4.x from GNU.

Submission of Assignments

Each student will get access to a subversion repository. Assignments must be committed to that repository by the respective deadline. Students are encouraged to use the repository for version control while still working on the assignment. Only the last version commited before the deadline will be used for grading.
In order to access your subversion repository, you must first request an account. For this, you first need to generate an encrypted password. On any GNU/Linux or UNIX machine (or even a Microsoft system with Apache) enter

    $ htpasswd -nb $USER PASSWORD
    
where PASSWORD is your desired password. You will not be able to change the password later. Send the output of the command to grothoff@cs.du.edu to request an account. Once your account has been created, you should do an initial check out:
    $ svn checkout https://svn.cs.du.edu/courses/comp3351/f2008/$USER
    $ cd $USER
    
You should then proceed to create a directory for the first project and commit it:
    $ mkdir P1
    $ svn add P1
    $ svn commit -m "comment"
    
Afterwards, you can add the files to submit just like you added the directory. Make sure to commit the final version with all files (hint: svn status) before the deadline. It is also a good idea to do a seperate checkout and verify that the result works.
If you already have a subversion account from a different class, you still must request a new account for this quarter. You can use the same username and password. Furthermore, when doing the checkout, make sure that the directory $USER does not already exist. You can rename the directory afterwards, for example using:
    $ mv $USER comp3351
    

Schedule

Note that existing assignments may still be corrected. Feel free to look at the other assignments if you want to know what the plan looks like. Feedback is welcome.

Class 1: Introduction (9/9/8)

Material from the textbook
Chapter 1 and Chapter 4
Useful links
Subversion, Slides
Quiz
Quiz 1
Assignments
  1. Hello World! (due: Class 2, 1 Pt), P1/driver_p1.sh

Class 2: Syntax (9/11/8)

Material from the textbook
Chapter 2 and Ramki Thurimella's notes on Regular Expressions
Useful links
JTB, JavaCC, jtb.jar (mirror), jtb shell script, javacc.jar (mirror), javacc shell script
Assignments
  1. Expression parser (due: Class 5, 9 Pts), PrettyPrinter template, Grammar template, Makefile, test.tar.gz, gradehw2.sh

Class 3: Interpretation (9/16/8)

Material from the textbook
Chapter 3
Useful links
Visitor pattern

Class 4: ML (9/18/8)

Material from the textbook
Chapter 5
Assignments
  1. Interpreter for Operator Language (due: Class 8, 9 Pts), expressions.jj, expressions.html, tests.tgz, gradehw3.sh, Makefile

Class 5: Higher-order Functions (9/23/8)

Material from the textbook
Chapter 9
Useful links
Why Functional Programming Matters

Class 6: Types (9/25/8)

Material from the textbook
Chapter 6 and Chapter 8
Useful links
Types

Class 7: Patterns (9/30/8)

Material from the textbook
Chapter 7

Class 8: Scope (10/2/8)

Material from the textbook
Chapter 10 and Chapter 12
Assignments
  1. Extended Interpreter (due: Class 11, 9 Pts), statements.jj, statements.html, Makefile, gradehw4.sh, tests.tgz

Class 9: Calls (10/7/8)

Material from the textbook
Chapter 18

Class 10: Midterm (10/9/8)

Class 11: References and Pointers (10/14/8)

Material from the textbook
Chapter 13 and Chapter 14
Useful links
Introduction to memory management
Assignments
  1. Imperative Interpreter (due: Class 14, 9 Pts), functions.jj, functions.html, tests.tgz, gradehw5.sh, Makefile

Class 12: Classes (10/16/8)

Material from the textbook
Chapter 15, Chapter 16 and Chapter 17
Assignments
  1. Object-oriented Interpreter (due: Class 17, 9 Pts), objects.jj, objects.html, gradehw6.sh, Makefile, tests.tgz

Class 13: Prolog (10/21/8)

Material from the textbook
Chapter 19 and Chapter 20
Useful links
Prolog Tutorial, Unification Theory

Class 14: Cost Models (10/23/8)

Material from the textbook
Chapter 21

Class 15: Formal Semantics (10/28/8)

Material from the textbook
Chapter 23

Class 16: Type Systems (10/30/8)

Slides
Type Soundness
Useful links
Featherweight Java
Assignments
  1. Java Type Checker (due: Class 20, 9 Pts), objects.jj (from P6), objects.html (from P6), gradehw7.sh, Makefile, tests.tgz

Class 17: Prolog Exercise (11/4/8)

Jeff Keene
DUP

Class 18: Presentations (11/6/8)

Taylor Phillips
Lisp
Porter Schutz
Python

Class 19: Presentations (11/11/8)

Jeff Keene
Sed & Awk
Josh Baldwin
TeX
Justin Boshoven
Make

Class 20: Review (11/13/8)

Material from the textbook
Chapter 24

Final Exam (11/18/2008)

The final exam will be at 2pm in JGH 316.

Grades

Grades will be e-mailed to the e-mail address given with the request for creating the subversion account. For how to interpret the e-mailed grades please contact the TA.


Christian Grothoff
Last modified: Thu Nov 13 17:12:35 MST 2008