Programming languages determine what programs we can write. Languages with nice abstractions allow us to write elegant, concise, and readable programs.
In this class, we’ll start from scratch, and build a programming language by adding only what’s necessary. What we’ll discover is that this simplistic approach leads to some really powerful abstractions. You can do more with less!
At the end of the course, you should be a better programmer. You should also have a clearer picture of a given language as a choice in a larger design space, and be better able to understand new programming languages and the similarities between them. Finally, you may develop some taste for what you like in a programming language.
This course will involve lots of programming in Racket. I choose Racket for several reasons. First, “functional” programming languages make this kind of course feasible. Writing a series of interpreters in another language would probably involve a whole lot more code. Secondly, Racket is a simple language for you to learn, without complex syntactic rules or a confusing type system. Thirdly, the simplicity of Racket makes it an ideal “blank slate” for adding features. If these reasons don’t make sense to you, then... perhaps you need to take the course!
Students taking this course must be able to design and implement small programs (~ 1 KLOC) efficiently. Students must have a basic understanding of mathematics.
John Clements, aoeuclements @ brinckerhoff.org
Lecture: 09:00-10:00, MWF, room 186-C203
Lab: 10:00-11:00, MWF, room 14-303
Lecture: 14:00-15:00, MWF, room 14-253
Lab: 15:00-16:00, MWF, room 14-301
See my Contact Info page for my calendar. You can add it to your calendar, if that makes your life easier.
This is the course web page, its link is http://www.brinckerhoff.org/clements/csc430-wi12.
You will be required to complete the assignments in this class using PLT Racket, version 5.2 (or a newer version). It is freely available for all major platforms, including Mac OS, Windows, and UNIX. It is pre-installed on the lab machines, available by running
from the command-line.
In order to hand in your work, you’ll need the "handin" plugin for the course.
The course handin plugin is available at
That’s not a clickable link. That’s because the easiest way to install the plugin is to choose File|Install PLT File... in DrRacket and to paste this link into the resulting ("URL") text box.
Installing this extension should take well under a minute. After installing it, you’ll need to restart DrRacket.
The majority of the readings in this course will be from Programming Languages: Application and Interpretation, by Shriram Krishnamurthi. This book is available free, online, including a downloadable PDF.
The first two weeks will also include readings from How To Design Programs and the updated version, How To Design Programs 2e, also available free online (though there’s no downloadable PDF for these ones).
This class will use Piazza. This will be the principal means that I’ll use to notify you of deadlines, organizational updates, and changes to assignments. If you’re not keeping up with the group, you’re going to be missing important information.
It’s also the best way for you to direct questions to me and/or the class. Feel free to e-mail me with personal questions, but use the Piazza group as your main means of communications. It’s possible to post anonymously, if you like.
You should already have received an invitation to the Piazza group; let me know if you need an invite.
Don’t post your code or test cases to the group; anything else is fair game.
Also, please keep in mind that I (and everyone else) judge you based in part on your written communication. Spelling, complete sentences, and evidence of forethought are important in all of your posts & e-mails. One easy rule of thumb: just read over what you’ve written before clicking post or send, and imagine others in the class reading it.
Labs in this course take the form of simple exercises to be completed in a single lab period, designed to help you understand the lecture material and to lead you toward solutions for the larger assignments.
I’ll be checking these labs off in lab; you’re responsible for demo-ing your lab solutions in lab. Your marks on these labs will be simple credit/no-credit. After demoing, be sure to submit as well using the handin server, so that I have a record of your submission.
In labs, you are heartily encouraged to collaborate like crazy. Look at everyone else’s code, copy and paste, type on your neighbor’s keyboard, whatever. Labs need not be entirely your work.
Programming assignments will be due at 11:00 PM. You must submit homework assignments using the Handin button. Late assignments will not be accepted.
Typically, the handin server will be configured to run tests on your code as it is submitted. Code that does not pass the tests will generally not be accepted. These tests will generally check whether you’ve defined the things you’re supposed to define. These tests will also generally check coverage. That is, you will not be able to submit code unless it includes test cases that completely cover your code.
Your submissions should be anonymized. That is, they should not contain your name.
Part of your grade may include a score given by your fellow students on your code. In particular, in some weeks you may be given two (anonymous) submissions from other members of the class, and required to assign legibility and design points.
From time to time, we may examine student code, in lecture. Try to ensure that the code you submit is something you’d be proud to show to the others in the class.
I will be grading your code repeatedly in this class. On most assignments, your score will consist of a part (usually 20 points) based on your performance on a set of test cases automatically administered by the Handin server, and a part (usually 6 points) based on my opinion of your code’s clarity, organization, and adherence to rules about purpose statements and contracts (in short: you’ve got to have them). As a rule, my "eyeball" score rubric runs something like this:
6 points – I simply can’t find anything wrong with your code.
5 points – some inelegant parts, or one or two purpose statements or contracts missing
4 points – an actual misunderstanding, or a widespread lack of purpose statements and contracts
3 points – a serious misunderstanding–you didn’t understand some major part of the assignment
2 points – your program is seriously incomplete, doesn’t compile, or has widespread major problems
1 point – you didn’t make any apparent progress on the program at all.
I reserve the right to assign bad scores to programs that work correctly; if I don’t think you’re doing a good job of programming, then you won’t receive a good score. "It works" isn’t a defense for bad code.
As a rule, I like to read code in a "top-down" way. This means that the definition of the top-level, important functions should come first, and the supporting functions should come later. I want to have a good understanding of the big picture before getting into the details. My experience is that if interp makes sense, then add-to-env will probably not present any difficulty.
Racket has a Style Guide; I do not require you to read or follow these constraints, but if you have any questions, this document may well answer them, and I won’t argue with you if you can refer to something in the style guide :).
You will be handing in your work in this class using a plugin for DrRacket that communicates with a handin server running remotely. From past experience, there are several things that may not be obvious about your interactions with this server.
I disregard earlier submissions when later ones are improvements. So, for instance, if you get a dialog that offers you a chance to save with a penalty, you need not worry that this penalty will affect you if you resubmit later (as long as it’s before the deadline)
The handin server stores the last five submissions on your account. So, if you’re unsure as to whether the deadline has passed, go ahead and submit; if I decide to disregard the final one, I can take the prior one instead.
On the other hand, you should be aware that the handin server’s automatic testing does not limit your liability for incorrect code; if I discover errors in the code that the handin server didn’t catch, I will deduct points for them, and I may add tests to the handin server to recompute everyone’s correctness.
In the programming assignments, you may not copy another student’s code (including test cases). You may not share code with other students in the class. That is, you may not allow another student to see the code you write for the class, deliberately or through obvious negligence.
I will use an automated tool to compare student submissions and identify dishonesty.
Students believed to be cheating–that is, both parties involved in the transfer of code–will receive a failing grade in the class.
My experience suggests that frequent quizzes are a good way to ensure that you’re understanding what I’m teaching, and that I’m teaching things that you understand.
This class will have quizzes on Wednesday of weeks 2, 4, and 8. These quizzes will probably be twenty minutes long, and will probably take place during lab.
There will be a midterm on Wednesday of week 6. It will be fifty minutes long.
There will be a final exam. The final exam for section 1 is scheduled for 7-10 AM on Monday of exam week. The final exam for section 3 is scheduled for 1-4 PM on Friday of exam week.
The quizzes and exams will be closed-note. Some quizzes may require the use of DrRacket in labs for test-taking and submission. No other devices will be permitted, including calculators and phones.
Grades will be determined by performance on programming projects, the exams, and class interaction. A small fraction of the grade is determined by the labs, and by the instructor’s whim. The breakdown of the grade is as follows:
Assignments : 40%
Quizzes : 15%
Midterm : 15%
Final : 20%
Labs : 5%
Instructor’s Whim: 5%