Projects
Haskell project
The first project is to write a compiler in Haskell. Your compiler will compile programs in a language called Epsilon to machine code for a stack machine called Inter.
Please refer to the following information:
The project will expose you to three different paradigms: an imperative language (the input language, Epsilon), a functional language (the implementation language, Haskell), and a stack-oriented language (the target language, Inter). You will get to apply many of the concepts you learn in the class.
The Epsilon language is deliberately underspecified. In many cases, you will have to decide what the rules of the language should be. Make reasonable assumption based on similar languages you know and document them.
Grading and due date
The programs are normally graded by testing with different inputs and reading the source code. All work has to be done independently.
The project is due on 2007-03-08. That day, the TA and instructor will hold extended office hours. During class on 2007-03-06, make an appointment for a time slot. (See the schedule of appointments.) At the appointed time, meet the TA and instructor in CSIL, demonstrate that your compiler works, and turn in a printout of relevant source code.
Prolog project
You will do a second, smaller project in the last 2–3 weeks of the quarter. This project will give you some feel for programming in logic programming and declarative languages.