Links and Useful Resources
The main content of this course is the papers that we will read for most classes. These are linked to in the schedule on the course home page. This page collects several supplementary resources that may be useful for you throughout the term.
Discrete Math
Programming languages is one of the more theoretical disciplines within computer science. As such, PL papers assume a relatively high level of fluency in discrete mathematics. The most important for this class will probably be (ranked very roughly by importance):
- Set theory – Essential!
- Formal languages – Essential!
- Proof methods – The most important “sophisticated” proof technique is structural induction.
- First-order logic
- Algebraic structures – You definitely don’t need to read a book on this, but a basic understanding of terms like signature and carrier set, and familiarity with basic structures.
Fluency with a few mathematical notations is also essential to understand most PL papers:
- Context-free grammars in BNF – Used for defining syntax.
- Inference rules – Used to define operational semantics, type systems, and many other kinds of relations on syntactic terms.
Haskell
Since CS 581 is a prerequisite, Haskell will be our go-to reference point in many situations. We’ll use it as a metalanguage for describing other programming languages, and also frequently use it as an object language when we discuss modular extensibility in functional languages.
Here are a few resources (all free), in case your Haskell skills are a bit rusty.
A Gentle Introduction to Haskell – Famous for being not-so-gentle, but a really great and concise resource for refining your understanding of Haskell, once you get the basics down. If you just want a refresher, read this.
Introduction to Haskell by Brent Yorgey – An excellent, concise introduction to Haskell.
Haskell Wikibook – An easy-to-navigate and thorough resource.
Haskell 2010 Language Report – The latest version of the definitive Haskell reference manual.
Real World Haskell – O’Reilly’s book-length introduction to Haskell focusing on practical applications.
For questions of Haskell style, here are a few resources:
The Haskell wiki contains several pages concerned with style. Start with the general programming guidelines. Answers to more specific questions can be found by perusing the Style category listing.
For low-level questions of layout, I like the pragmatic advice in Johan Tibell’s Haskell style guide.
Standard ML
In the first part of the course, we’ll be studying the Standard ML module system. The good news is, since you already know Haskell, SML shouldn’t be too hard to pick up.
I’ll be using the Poly/ML implementation of SML. For this class, you should be able to use any other popular implementation of the standard, such as SML/NJ or Moscow ML without any problems. Many folks online recommend the MLton compiler since it produces very small and very fast executables, but it doesn’t have a REPL, so is probably less useful for our purposes.
Here are some freely available books that can help you learn SML:
Programming in Standard ML – By Bob Harper, one of the designer’s of the SML module system.
The Definition of Standard ML – SML is famous for being one of the only full-featured, general-purpose programming languages that is formally defined. The language definition isn’t great for learning the language, but is a useful reference.
Other useful resources:
Introduction to ML – A nice, super concise introduction.
A Crash Course on ML Modules – Written for Haskell programmers, so it’s perfect for us!
SML Basis Library – Documentation for SML’s standard library.
rlwrap – A very useful Unix utility that adds readline support to any command-line program. The REPLs for SML/NJ and Poly/ML do not use readline by default, making navigation rather annoying. Install rlwrap using your favorite package manager and then launch your REPL with
rlwrap poly
orrlwrap sml
and you’re good to go!