To make sure you can develop the data definitions for a domain-specific programming language.
Imagine that you are designing a software system that will administer teacher-designed exams to students. The teacher would write up an exam in a language required by the software system. The system would then "run" the teacher's exam program; running an exam means that the system would ask the students the questions on the exam and display any diagnostic information that the teacher wanted the students to get based on their answers.
The language for writing exams must allow a teacher to specify which questions to ask (and which answers to expect), when to skip questions based on past results (for example, a student who is doing well might be given harder questions as the test progresses), when to print summaries of a student's progress, and when to print other messages to the student. Since the system can skip questions, two students taking the same exam might see a different series of questions.
The language must be able to capture the specific exams (and intended interactions) shown on the sample exam page.
Develop the data definitions for a language for capturing electronic exams. You must submit both your proposed language and Scheme expressions showing how to represent both sample exams in your language.
You do not need to be able to give (run) exams at the end of this assignment. In other words, you do not need to implement the interpreter. You only need to write the data definitions and examples of data for the sample exams. Your solution will be a page or two at most and should not contain any functions. If that instruction leaves you confused, come to office hours.
Turn in a single file hwk4.ss (or hwk4.scm) containing all code and documentation for this assignment. Make sure that both students' names are in a comment at the top of the file.
Refer to the Homework Expectations when preparing your solutions.
Not sure how to start? Look back at the notes from the "Introduction to Languages" lecture: they discuss how a language consists of data, operations on the data, and control commands for ordering operations. What are each of these for an exam program? Imagine that the teacher were verbally giving commands to the exam software saying how to give the exam. The commands (verbs) that you imagine the teacher issuing are the commands/operators in your language; the nouns are the data.
Once you've identified the operations and data, see how to organize them. If some data are similar in spirit but different in details, make a multi-case data definition (like we did for animals).