Evaluate which consumes the representation of some


In sections 14.4 and 17.7 we developed an evaluator for a portion of Scheme. A typical Scheme implementation also provides an INTERACTIVE user interface. In DrScheme, the Interactions window plays this role. An interactive system prompts the reader for definitions and expressions, evaluates them appropriately, and possibly produces some result. Definitions are added to some repository; to confirm the addition, the interactive system may produce a value like true. Expressions are evaluated relative to the definition repository. The function interpret-with-defs from section 17.7 performs this role. Develop an interaction system around interpret-with-defs. The system should provide at least two services:

1. add-definition, which adds (the representation of) some function definition to the system's repository;

2. evaluate, which consumes (the representation of) some expression and evaluates it relative to the current repository.
If a user adds two (or more) definitions for some function f, the last addition is the one that matters. The previous ones can be ignored.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Evaluate which consumes the representation of some
Reference No:- TGS02168065

Expected delivery within 24 Hours