CSCI 1730 · Fall 2026
Mystery Languages
Time
You should spend no more than an hour. It’s much better to spend three 20-minute sessions than one 60-minute one. After each session, step away. Let the problem gestate in your head. After a while you will get some new ideas and angles to try.
After two sessions, if you still feel stuck, come talk to the staff and show them what you’ve tried so far.
Grading Standard
You need to classify most of the languages on most of the assignments. (This has not been a problem for students in the past.) You might not get all of them, but you need to get quite close.
Software
The software is on GitHub. The README provides installation instructions. Please also watch the video linked to the README to get a sense of the mechanics.
The software has mystery languages in two syntaxes: Racket-style and Shplait-style. The assignments below are described in terms of the latter. You can, however, use whichever you prefer.
Tasks
For each language family, the documentation of available constructs is in the repository’s README. The video shows you how to work with the variants of the strings language.
sh-arithmetic
sh-conditionals
sh-fun-calls
sh-mut-vars
sh-mut-structs
sh-fields
sh-eval-order
In the video, we end up with a small set of programs that can tell all the variants apart. This is the classifier. For each of the language families above, your task is to produce a classifier that distinguishes the variants, akin to that in the video.
Observe that a given program in the classifier set may distinguish only one variant from all the others (just as in the video). When there are more than two variants, it is not always easy to produce a single program that can tell them all apart (i.e., produces a different answer in each variant); nor is it necessary. Sometimes a classifier is much clearer to a reader (like a grader!) if each program distinguishes just one variant; then it has a clear purpose.
Therefore, don’t try to get overly clever. You can if you want for your personal satisfaction, but that doesn’t mean you have to turn that in to us! Or if you do, try to also include simpler, less ambitious programs as well. A classifier does not have to be the minimal set necessary to tell apart the variants.
Once you have figured out a satisfactory set of programs, please write them as testing (check:) blocks. That way we can independently (a) read them to see the expected outcomes and that they are indeed suitably different and illustrative, and (b) run them to confirm that they all pass. Without the tests we cannot do these steps independently.
Like and unsurprised: You like this behavior, and you aren’t surprised by it (e.g., adding 1 and 2 produces 3).
Dislike and unsurprised: You may not like the behavior, but you’ve gotten used to it by now (usually by exposure during prior programming).
Dislike and surprised: Probably true of many mystery languages variants!
Like and surprised: You hadn’t previously considered this option, but now that you see it you perhaps wish more languages did it.
Advice
The new features that got added in this round. Your solution should incorporate these new features. (Usually there’s only one new feature, but it may have multiple constructs.)
The interaction between this new feature and all the ones that are already in the language. Failing to take this into account is a common mistake in language design.
In general, every part of your solution should somehow involve one or more of the new feature’s constructs. Anything else you find may just be an artifact of the implementation.
Submission Format
Submit one file with a suite of tests that differentiates the mystery languages.
Ideally, write a coment (;; for line-comments) about each test so we have a sense of what you are trying to do.
Put your reflection in a block-comment (#| … |#) at the bottom of your file.