HW 3: Little Languages
Overview
In this assignment, you will implement pieces of three “little languages”. Each language is designed for a different task: we have a language for graphics, a language for logic, and a language for text-processing.
The unifying concept of this assignment is programs as structured data. We will also explore evaluation techniques, especially lazy evaluation, and there are a few chances to show off your creativity!
You may work on this assignment by yourself or with a partner. If you work with a partner, you must cooperate on all parts of the assignment. As always, you must follow pair programming rules at all times (even when writing text or math) and share roles equally. Both members of the pair must contribute to and understand all parts of jointly submitted work.
Materials
Use the assignment workflow and the link provided on Piazza to get access to this week’s files.
Working on the assignment
This assignment (and future ones) asks you to read and understand a lot, to be able to write just a little bit of code. This is a common experience in programming-languages work: a lot of thinking goes into each line of code.
It is more than reasonable to complete this assignment by writing about 50 lines of Haskell. But it will take quite a bit of thinking to make sure that each line does what you expect.
There are three parts to this assignment. Complete them in this order:
- A little language to make art.
- A little language to reason about logical formulas.
- A little language to match patterns in text.