COMP 325, Fall 2021, Homework 1

“Arithmetic” Mystery Language1

Due Friday, August 27 by the start of class (10 AM). Submit via Gradescope.

First, you should get acquainted with the mystery languages by reading the documentation. Then go ahead and explore the “arithmetic” family of languages.

Your goal for this (and all) mystery languages is to find the difference between the languages. You will be given a specification of the language’s syntax, as well as a very general, sometimes vague description of the language’s semantics, generally focused on one specific feature. There will be several implementations of the language, each of which implements that specific feature in a different way. You will be able to run code in each of the languages, but you will not have access to the implementation details/code.

Your first task is to write a small(-ish) set of programs to differentiate the languages. In other words, each program produces different outputs on at least two of the language variants, and the entire set of programs can distinguish between all the variants. We call this set of programs a classifier. These classifers should, above all, be clear to the grader. It can help to make them short, although you need not be extra clever and try to come up with a single program that differentiates all the languages – such classifiers are sometimes hard to understand.

Your second task is to write a short description of the difference between the language variants, as best as you can. Focus on the new feature and its interaction with existing features. Sometimes we might have already covered the appropriate terminology, in which case you should use it. But in other cases we may not have covered the terminology yet, so you should do your best describe at a high-level how the language variants differ.

  1. This assignment, like most in this course, comes from Brown University’s Programming Languages course.