C311 Assignment 6 -- IF Interpreter

Due Monday, February 20th, at 8:55 AM

Read EOPL Sections 5.1 and 5.2.

Unless explicitely stated otherwise, use the following guidelines in all subsequent assignments.

  1. Use Scheme++ and use the power of object-oriented programming to advantage.
  2. Use a Scheme-like concrete syntax, rather than the Pascal-like syntax of the text.
  3. Implement your assignment as a new language class, the name of which will be given in the assignment. In assignments with multiple parts, combine the features of each part this one language.
For example, after loading your code for this assignment you might have the transcript:
> (use <if-language>)
> (rep)
if> (minus (+ (minus 5) 9))
-4
if> (list 1 2 3)
(1 2 3)
if> (if (greater 2 3) 5 6)
6

Submit via email

Implement the features described in the following exercises by defining the class <if-language>, derived from <call-language>, which may be found in copper:/u/c311/ss/call.ss and aux.ss.
  1. EOPL Exercise 5.1.3
  2. EOPL Exercise 5.1.4
  3. EOPL Exercise 5.2.1
  4. EOPL Exercise 5.2.2
  5. EOPL Exercise 5.2.3
chaynes@indiana.edu