|
@@ -617,15 +617,16 @@ $R_0$ program.
|
|
|
[`(read) #t]
|
|
|
[`(- ,e) (exp? e)]
|
|
|
[`(+ ,e1 ,e2)
|
|
|
- (and (exp? e1) (exp? e2))]))
|
|
|
+ (and (exp? e1) (exp? e2))]
|
|
|
+ [else #f]))
|
|
|
|
|
|
(define (R0? sexp)
|
|
|
(match sexp
|
|
|
[`(program ,e) (exp? e)]
|
|
|
[else #f]))
|
|
|
|
|
|
-(R0? `(+ (read) (- 8)))
|
|
|
-(R0? `(- (read) (+ 8)))
|
|
|
+(R0? `(program (+ (read) (- 8))))
|
|
|
+(R0? `(program (- (read) (+ 8))))
|
|
|
\end{lstlisting}
|
|
|
\end{minipage}
|
|
|
\vrule
|
|
@@ -633,6 +634,10 @@ $R_0$ program.
|
|
|
\begin{lstlisting}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|