Princeton University
|
Computer Science 441
|
|
This advanced course is for
graduate students and advanced undergraduates with a keen interest in
how to design, describe and reason about programming languages. The only
requirement for the course is some mathematical maturity including, for
instance, familiarity with proof techniques such as induction. Topics include: Theory and design of programming languages. How languages support abstraction, modularity and concurrency through functional programming and other mechanisms. Operational semantics of programming languages. Denotational semantics of programming languages. Type systems including polymorphism and subtyping. The relation between programming languages and logic. |
As the term proceeds, you will be able to find course notes, assignments and the general schedule here.
Professor: David Walker
Teaching Assistant: Chris Monsanto
All students in COS 441 are required to sign up for the class mailing list. If you have questions about assignments or other information you can send email to cos441 "atsign" lists.cs.princeton.edu.
To subscribe to the list go to https://lists.cs.princeton.edu/mailman/listinfo/cos441.
Some of the assignments will be programmed in Haskell, a very cool modern functional programming language.
Downloading and installing Haskell on your machine is easy. We are using the latest stable release of the Haskell Platform. Follow directions here.
To create and edit Haskell programs, you can use emacs. Here is information about installing Haskell mode for emacs. If you like Vim, see here. I have also heard that Leksah is a nice visual haskell editor but I've never used it.
If you are using windows, instead of typing "ghci" you may want to type "ghcii.sh" to use the interpreter (apparently this deals with shut down/killing jobs better). I use the Cygwin shell on my windows machine. In my .bashrc file, I created an alias:
alias ghci='ghcii.sh'
The Haskell home page is teaming with resources for learning Haskell and communicating with other Haskell lovers. See here. To get started, I recommend taking a look at the online book "Learn You a Haskell for Great Good". In particular, for assignment #2, you should read through the Introduction and the Starting Out Chapter. You can read online or order a book.
Learn You a Haskell for Great Good is not a great reference book. Try these sources as well:
You will also need to download and install SOE and graphics libraries as follows.
"cabal" is a program that comes with the Haskell platform that is helpful in installing new Haskell packages. On a windows machine, after downloading and installing the Haskell platform, at a shell (I use cygwin) execute:
$ cabal install GLFW
If you get an error the first time, try doing cabal update and then cabal install again:
$ cabal update
$ cabal install GLFW
On Ubuntu 10.04 linux you may have to do this:
$ sudo apt-get install libghc6-opengl-dev
$ sudo apt-get install libxrandr-dev
$ cabal install GLFW
Download the SOE libraries from here. You might put the library in a directory for your COS 441 homework (say cos441). Change to this directory and unpack the SOE libraries:
$ gunzip SOE.tar.gz
$ tar -xf SOE.tar
Change in to the SOE/src directory. Run ghci on Draw.lhs. In the ghci interpreter, type main0 at the prompt. You should see a window with some images appear.
$ cd SOE/src
$ ghci Draw.lhs
*Draw> main0
At the top of your .hs file, use an import statement:
import SOE
When running the Haskell compiler, you must put the SOE libraries in your search path. Assuming the current directory contains the SOE directory, you can do this by involking ghc (or ghci) as follows.
$ ghc -i./SOE/src mycode.hs
$ ghci -i./SOE/src
AssignmentsThere will be one assignment every one or two weeks. Lateness policy. Programming assignments are due at 1pm on the date specified, with a 3-hour grace period. Late assignments are assessed a 20% penalty per day or partial day: 0-3 hours late (grace period -- no penalty), 3-24 hours late (20%), 24-48 hours late (40%), and so forth. Your penalties for the first 4 late days during the course are automatically waived. No additional lateness penalties will be waived without the recommendation of a Dean or a letter from McCosh Health Center. Collaboration policy. Some assignments will be individual assignments. If you cannot come up with an answer after trying an individual assignment for a while then you may discuss the material or the problem with a friend. If you talk about how to solve a problem with someone then acknowledge them at the top of your homework (name and which parts you worked on together). After any discussions with friends, you should write up the assignment on your own. In particular, any programs, proofs, or written explanations should be written up by the homework author themselves. Copying code or proofs from someone else or allowing another individual to copy your code or proofs is a violation of Princeton's code of academic integrity. Other assignments will be done in pairs. Again, it is ok for multiple pairs to discuss solutions. Each pair should write up solutions themselves. The midterm and final must be done completely independently. Testing & EvaluationThere will be an in-class mid-term and a take-home final exam. Grades will be determined by weighting homeworks, tests and exams as follows:
|