/Net/solen/u8/Faculty/em/max/MC28/micro-scheme.scm
and
use the ``Evaluate All'' command to evaluate all the definitions in
that file. This file contains the Micro-Scheme implementation from
section 10.2 of the text, along with some necessary definitions from
section 10.1 and earlier chapters of the text.
(read-eval-print-loop)
in Scheme and then try evaluating
various Micro-Scheme expressions in the resulting Micro-Scheme
read-eval-print loop. When you are done trying out Micro-Scheme and
want to return to real Scheme, you can use the ``Abort to Top''
command in the ``Actions'' menu.
look-up-value
, as described in exercises 10.9 and
10.10 on page 322 of the textbook. You should use the ``Copy'' and
``Paste'' commands in SchematiX to copy the definition of
look-up-value
into your own file before you start modifying it.
For 10.9, you could add cons
, car
,
cdr
, and
null?
, so that you can do list processing in Micro-Scheme. For
10.10, you can add anything you've wished Scheme had built in, perhaps
square
. Try out Micro-Scheme again, making sure that your new
pre-defined names work.
with
expressions to
Micro-Scheme. This will involve modifying the definition of
micro-scheme-parsing-p/a-list
, so you should copy and paste
that definition into your file as well. You shouldn't need to modify
any other existing definitions -- you should just modify your copy of
micro-scheme-parsing-p/a-list
and add any new definitions you
need.
Here are two somewhat tricky with
expressions; think carefully
about what the value of each of them should be, and make sure your
implementation produces those values:
(with x = (+ 2 3) compute (with y = (+ x 4) compute (* x y))) (with x = (+ 2 3) compute (with x = (+ x 4) compute (* x x)))
/Net/solen/u8/Faculty/em/max/MC28/mini-scheme.scm
and use the
Evaluate All command. This file contains the definitions from
section 10.3, with the exception of those superseded in section 10.4,
and it also contains relevant definitions from 10.2 and earlier chapters.
Finally, this file also contains the definitions from section 10.4 of
unparse
(p.335), evaluate-in-at
and
display-times
(p. 337), make-application-ast
(p. 338),
and make-mini-scheme-version-of
(p. 340). You will need to
copy all the AST constructors and the read-eval-print-loop
and
make-procedure
procedures out of this file into your own file
in order to modify them in the subsequent exercises.
make-mini-scheme-version-of
, because the version we have
provided from page 340 already incorporates the needed modifications.
Test your read-eval-print loop as shown on page 340 and in other ways.