91.301 (our undergraduate programming languages course) or the equivalent.
A course in Discrete Mathematics.
91.502 (our graduate course in automata theory and formal languages) shows as a prerequisite in some places online, but not in others, and was never enforced.
Another way of considering the prerequisites is to think of what we take from the contents:
From 91.301 we need take formal models of programs (substitution model, environment model. See Structure and Interpretation of Computer Programs sections 1.1, 3.2, or Schematics of Computation sections 1.??, 5.??).
You should have the ability to "single step through a program in your head". These models formalize that ability. You need both the ability to single step in your head, and the ability to use a formal system to keep track of all the details involved in this mental activity.
From 91.301 or its equivalent, you should also have some experience with modifying interpreters: (SICP section 4.1, or Schematics section 7.??).
From 91.301, its equivalent, or real-world experience, you should have some familiarity with imperative, functional, and object-oriented models of programming.
From Discrete Math, you are expected to know the basic techniques of proof: induction, strong induction, dividing a proof into cases, use of DeMorgan's laws. Some formal experience with using propositional logic will improve your ability to perform formal proofs.
Also from Discrete Math: some familiarity with recursive definitions, with set comprehension notation, and with partial orderings would be useful.
The usual presentations of this material are done for the Scheme programming language. One of the easiest Scheme tutorials for learning the basics of the language is "Teach Yourself Scheme in Fixnum Days by Dorai Sitaram. Chapters 1 through 6 introduce pretty much all of of the Scheme keywords used in the 91.301. Another useful quick introduction is the page at Cal Tech on "Scheme for C Programmers.
With the knowledge of basic Scheme from these documents, you could probably read a Scheme-oriented description of the Substitution model such as the one found here, or the two nodes of the online version of SICP starting here.
The same basic knowledge of Scheme allows you to read on The Environment Model. There is short tutorial from Cal Tech here, or the five nodes of the online version of SICP starting here.
If you happen to know the language Dylan, you can find notes on the substitution model for Dylan from Dartmouth here.
If you know a little bit of ML (very handy since we use ML later in 91.531) you could find notes on the substitution model in ML from Cornell: lecture7.htm and lecture8.htm. You can find Lecture and recitation notes on The Environment Model in ML from Cornell: lecture21-22.pdf, rec20.html, and rec21.html,
If you have to learn one of Scheme or ML to read the material on Substitution and Environment Models, you might considering learning ML early to save yourself time during the semester. In class we use Ullman's book "Elements of ML Programming" and assign sections 2, 3.1-3.5, 4.1, 5.1-5.6, and 7.1 (the readings page may have a more up-to-date list).
Any ideas?
Imperative programming: We assume that by the time you enter this course you can program in C or a related language (from what is usually called the "Algol family" of languages).
Functional programming. If this was not included in your undergraduate programming languages course, you should consider a simple tutorial. If your language of choice is Scheme, I would recommend "The Little Schemer" and "The Seasoned Schemer" by Dan Friedman & and Matthias Felleisen. If your language of choice is ML I would recommend "The Little ML'er" by the same authors.
These books are very easy to read, but get across the basic ideas of using recursion instead of loops, using functions that take functions as arguments and/or return functions as results, and discuss some other interesting particular to the languages that they present.
These books are in print and not available on the web.
Object-oriented programming (more technically class-based object-oriented programming: there are models of OO programming that don't involve classes, but we won't be studying them). If you have background in Scheme, then you can look at the following handout on OO programming in Scheme. The idea here is that since Scheme does not have built-in support for object-oriented programming, all of the features that make a program object-oriented have to be explicitly represented (message dispatch, passing self as an implicit argument to each method, inheritance, use of super, multiple inheritance). The original research paper that inspired these notes can be found here.
Once again Dan Friedman & and Matthias Felleisen provide a readable introduction to the concepts of OO programming, but in the context of teaching the concepts and Java simultaneously. You can learn a fair bit from reading Felleisen & Friedman's "A Little Java, A Few Patterns"
Unfortunately, there is a great deal written on object-oriented programming styles, languages, applications, ... and very little written on what makes a language object-oriented for the general reader - I could recommend several monographs principles of object-oriented programming but they are better read after 91.531 than before it.
Any ideas?
Craig Silverstein (now CTO of Google) wrote up some good notes on the basics of mathematical proof when he was an undergraduate, and has revised them slightly since. Here is the latest version that I could find. It is a bit terse in places, but reasonably comprehensible. Look especially at his section on structural induction.
Your ability to do basic proofs can be greatly enhanced by knowing a bit about propositional logic. Thomas LeBlanc of the university of Rochester wrote some succinct notes on propositional logic: basics, truth tables, and tautologies, laws for rewriting logical expressions (which tells you what proofs are equivalent), and using propositional logic to do formal proofs.
Or look in any Discrete Math textbook.
These topics are also covered in most Discrete Math textbooks.
For regular expressions, a concise definition can be found in James Power's notes on Formal Language Theory and Parsing . The Wikipedia entry has some useful basic information before it gets into describing various implementations.
The first few subsections of Lars Marius Garshol's description of BNF and EBNF grammars could prove useful, but beware different authors have slightly different conventions: Garshol wraps non-terminal symbols with single quotes, while other authors may not wrap non-terminals but may wrap terminals with < and >. Similarly, Garshol represents "the empty string" with the @ sign, while other authors may use the Greek lowercase epsilon. Garshol separates the left and right sides of the grammar rules with :- where other authors may use ::- or ->. The discrepancies between different authors' notations are even worse when it comes to EBNF grammars. See also James Powers' writeup. You may need to reference Powers' page on regular grammars to get a running start at this page. You can find Wikipedia entries on BNF, and Formal Grammars
This course, like the other core courses in our curriculum involves regular, substantial homework assignments. Good study habits are an essential prerequisite!
If you can not work a substantial portion of the homework problems after attending lecture, reviewing the lecture notes, and reading the relevant assigned material then there is a problem. One problem endemic to students with jobs, relationships, children, or heavy academic loads is finding time to study.
Some standard advice for good study is: (1) Make sure you understand the lecture and reading as soon as possible after the lecture. (2) Make sure that you look over the homework assignments at least 5 days before they are due. (3) Allocate time for reading and homework using a few hours per day over many days. (4) If you find that someone who you ask for advice just gives you the answer, do not use that person for help in the future: you can not pass the course just be answering all the homework problems and you need to assimilate the material covered by the homework problems in order to pass the quizzes and final.
The Advising Center, part of the Centers for Learning and Academic Support offers frequent workshops on study skills, time management strategies, exam prep strategies, and more.