10.9 Putting It All Together

The following interpreter for Camille supports both local binding and conditional evaluation:6

A set of 21 code lines in Camille that supports local binding and conditional evaluation.
Description
Continuation of the code in Camille that supports local binding and conditional evaluation, consisting of 63 lines.
Description
Continuation of the code in Camille that supports local binding and conditional evaluation, consisting of 63 lines.
Description
Continuation of the code in Camille that supports local binding and conditional evaluation, consisting of 63 lines.
Description
Continuation of the code in Camille that supports local binding and conditional evaluation, consisting of 63 lines.
Description
Continuation of the code in Camille that supports local binding and conditional evaluation, consisting of 63 lines.
Description
Continuation of the code in Camille that supports local binding and conditional evaluation, consisting of 49 lines.
Description

Programming Exercises for Chapter 10

Table 10.1 summarizes some of the details of the exercises here.

Table 10.1 New Versions of Camille, and Their Essential Properties, Created in the Chapter 10 Programming Exercises. (Key: ASR = abstract-syntax representation; CLS = closure; LOLR = list-of-lists representation.)

A table listing description, start from, and representation of Camille in different programming exercises.
Description

Exercise 10.1 Reimplement the interpreter given in this chapter for Camille 1.2.a to use the abstract-syntax representation of a named environment given in Section 9.8.4. This is Camille 1.2(named ASR).

Exercise 10.2 Reimplement the interpreter given in this chapter for Camille 1.2 to use the list-of-lists representation of a named environment developed in Programming Exercise 9.8.5.a. This is Camille 1.2(named LOLR).

Programming Exercises 10.310.5 involve building Camille interpreters using nameless environments that are accessed through lexical addressing. These interpreters require an update to the definition of the p_line_expr function shown at the end of of Section 10.6.1 and repeated here:

A set of four code lines in Camille for updating the definition of p underscore line underscore e x p r.
Description

We must replace line 85 with lines 85 and 86 in the following new definition:

A set of five code lines in Camille with replaced lines.
Description

Exercise 10.3 Reimplement the interpreter for Camille 1.2 to use the abstract-syntax representation of a nameless environment developed in Programming Exercise 9.8.9. This is Camille 1.2(nameless ASR).

Exercise 10.4 Reimplement the interpreter for Camille 1.2 to use the list-of-lists representation of a nameless environment developed in Programming Exercise 9.8.5.b. This is Camille 1.2(nameless LOLR).

Exercise 10.5 Reimplement the interpreter given in this chapter for Camille 1.2 to use the closure representation of a nameless environment developed in Programming Exercise 9.8.7. This is Camille 1.2(nameless CLS).

Exercise 10.6 Implement l e t* in Camille (with the same semantics it has in Scheme). For instance:

A set of six code lines in Camille with the let asterisk function implemented.
Description

This is Camille 1.3.

6. Camille version 1.2(named CLS).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.137.37