|
@@ -1175,8 +1175,8 @@ exhibit several compilation techniques.
|
|
|
\begin{minipage}{0.96\textwidth}
|
|
|
\[
|
|
|
\begin{array}{rcl}
|
|
|
- \Exp &::=& \Int \mid \CREAD{} \mid \CNEG{\Exp} \mid \CADD{\Exp}{\Exp}\\
|
|
|
- &\mid& \Var \mid \CLET{\Var}{\Exp}{\Exp} \\
|
|
|
+ \Exp &::=& \Int{} \mid \CREAD{} \mid \CNEG{\Exp} \mid \CADD{\Exp}{\Exp}\\
|
|
|
+ &\mid& \Var{} \mid \CLET{\Var}{\Exp}{\Exp} \\
|
|
|
\LangVarM{} &::=& \Exp
|
|
|
\end{array}
|
|
|
\]
|
|
@@ -5146,7 +5146,7 @@ addition of \key{if} this get more interesting.
|
|
|
|
|
|
As a motivating example, consider the following program that has an
|
|
|
\key{if} expression nested in the predicate of another \key{if}.
|
|
|
-% cond_test_41.rkt
|
|
|
+% cond_test_41.rkt, if_lt_eq.py
|
|
|
\begin{center}
|
|
|
\begin{minipage}{0.96\textwidth}
|
|
|
\begin{lstlisting}
|
|
@@ -5504,7 +5504,7 @@ The way in which the \code{shrink} pass transforms logical operations
|
|
|
such as \code{and} and \code{or} can impact the quality of code
|
|
|
generated by \code{explicate-control}. For example, consider the
|
|
|
following program.
|
|
|
-% cond_test_21.rkt
|
|
|
+% cond_test_21.rkt, and_eq_input.py
|
|
|
\begin{lstlisting}
|
|
|
(if (and (eq? (read) 0) (eq? (read) 1))
|
|
|
0
|
|
@@ -5837,7 +5837,7 @@ x86 assembly code.
|
|
|
\begin{figure}[tbp]
|
|
|
\begin{tabular}{lll}
|
|
|
\begin{minipage}{0.4\textwidth}
|
|
|
-% cond_test_20.rkt
|
|
|
+% cond_test_20.rkt, eq_input.py
|
|
|
\begin{lstlisting}
|
|
|
(if (eq? (read) 1) 42 0)
|
|
|
\end{lstlisting}
|