A vast majority of computer programs must deal with textual input of some form or another. This input can range from simple configuration languages to data description languages (e.g., XML) to scripting languages to full-blown programming languages. In this course, we cover the tools and techniques used to process the full range of computer languages (i.e., languages that specify programs and data on computers). Topics include scanning and parsing, tree representations of structured input, simple typechecking, translation between intermediate forms, code generation and optimization, and some run-time system issues. This course is a project oriented course in which students will construct a fully working compiler for a small programming language. We use Standard ML (SML) as the primary implementation language for the programming projects.
It is expected that you have had some experience with functional programming (from either CMSC 15100 or 16100) and that you have taken CMSC 15400 (Introduction to Computer Systems).
This term, the course will be taught online with asynchronous lectures and synchronous recitation sections.
As mentioned above, we use the Standard ML language for the programming projects in this course. Standard ML (usually refered to as SML) is a strict functional programming language with a long history an a number of implementations. For this course, we use Version 110.98.1 of the Standard ML of New Jersey (SML/NJ) system. This software is open source and supports Intel/AMD processors running Linux (32 and 64-bit), macOS (32 and 64-bit), and Windows (32-bit).
While it will be possible to develop the first three parts of the course project on Windows, the last part requires either Linux or macOS.
We do not require a textbook for this class, but we recommend the following if you are looking for a source of additional information.
Modern Compiler Implementation in ML, by Andrew Apply. Cambridge University Press, 1998.
This book is a good overview of compilers that uses SML as its implementation language (there is also a version for Java).
ML for the Working Programmer (2nd Ed.), by L.C. Paulson, Cambridge University Press, 1996.
This book is one of the better introductions to programming with SML.
There are a number of online SML tutorials. We recommend the following:
The Standard ML Basis Library
The Basis Library provides operations on standard types (e.g.,
string, etc.), as well as support for access to system services like I/O and networking. There have been some extensions to the Basis Library, which are documented on GitHub.
The following discussion is owed to Stuart Kurtz
The University of Chicago is a scholarly academic community. You need to both understand and internalize the ethics of our community. A good place to start is with the Cadet’s Honor Code of the US Military Academy: "A Cadet will not lie, cheat, or steal, or tolerate those who do." It is important to understand that the notion of property that matters most to academics is ideas, and that to pass someone else’s ideas off as your own is to lie, cheat, and steal.
The University has a formal policy on Academic Honesty, which is somewhat more verbose than West Point’s. Even so, you should read and understand it.
We believe that student interactions are an important and useful means to mastery of the material. We recommend that you discuss the material in this class with other students, and that includes the homework assignments. So what is the boundary between acceptable collaboration and academic misconduct? First, while it is acceptable to discuss homework, it is not acceptable to turn in someone else’s work as your own. When the time comes to write down your answer, you should write it down yourself from your own memory. Moreover, you should cite any material discussions, or written sources, e.g.,
Note: I discussed this exercise with Jane Smith.
The University’s policy, for its relative length, says less than it should regarding the culpability of those who know of misconduct by others, but do not report it. An all too common case has been where one student has decided to "help" another student by giving them a copy of their assignment, only to have that other student copy it and turn it in. In such cases, we view both students as culpable and pursue disciplinary sanctions against both.
For the student collaborations, it can be a slippery slope that leads from sanctioned collaboration to outright misconduct. But for all the slipperyness, there is a clear line: present only your ideas as yours and attribute all others.
If you have any questions about what is or is not proper academic conduct, please ask your instructors.