CS 1102 (A08) Homework 4: Data Definitions for Languages

Due: September 25 (Thursday) at 11:59pm via turnin (assignment name hwk4).

Assignment Goal

To make sure you can develop the data definitions for a domain-specific programming language.


Problem Set-Up

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.

The Assignment

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.

What to Turn In

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.


Hints and Guidelines


Back to the Assignments page