proj3 - reading the initialization le, your interpreter...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Project 3: Scheme Interpreter Extension CSC 4101, Fall 2011 Due: 3 December 2011 For this project, you will extend the functionality of the Scheme interpreter from Project 2 by writing additional built-in function in Scheme. Implement at least the following Scheme functions: the comparison operations eqv? and equal? ; the n-ary integer comparison operations =, <, >, <=, >= ; the test predicates zero? , positive? , negative? , odd? , even? ; the n-ary arithmetic operations max , min , +, -, * ; the boolean operations not , and , or ; the list functions caar , cadr , . . . cddddr , list , length , append , reverse ; the set and association list operations memq , memv , member , assq , assv , assoc ; the higher-order functions map and for-each . Extend the main function of Project 2. After populating the built-in environment with all the BuiltIn objects, it would read the Scheme definitions from a file ini.scm into the built-in environment. After
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: reading the initialization le, your interpreter would create the top-level environment and start reading user input. If your Project 2 is not working, you can develop the above Scheme code in Scheme48. To do so, you will rst need to dene the built-in functions from Project 2. E.g., you rst need to dene (define builtin-+ +) (define (b+ x y) (builtin-+ x y)) in an environment in which + is the built-in Scheme48 operation. Then you can dene your own version of + using only b+ . Administrative Stuff Program this project individually, not in groups. Put your code into a le ini.scm , but do not include the denitions for the built-ins from Project 2 (such as b+ , etc.). Submit this le together with a README le with anything you want to tell the grader. 1...
View Full Document

Ask a homework question - tutors are online