|
@@ -1951,16 +1951,19 @@ Test your \key{uniquify} pass by creating five example $R_1$ programs
|
|
|
and checking whether the output programs produce the same result as
|
|
|
the input programs. The $R_1$ programs should be designed to test the
|
|
|
most interesting parts of the \key{uniquify} pass, that is, the
|
|
|
-programs should include \key{let} forms, variables, and variables
|
|
|
-that overshadow each other. The five programs should be in a
|
|
|
-subdirectory named \key{tests} and they should have the same file name
|
|
|
-except for a different integer at the end of the name, followed by the
|
|
|
-ending \key{.rkt}. Use the \key{interp-tests} function
|
|
|
+programs should include \key{let} forms, variables, and variables that
|
|
|
+overshadow each other. The five programs should be in a subdirectory
|
|
|
+named \key{tests} and they should have the same file name except for a
|
|
|
+different integer at the end of the name, followed by the ending
|
|
|
+\key{.rkt}. Use the \key{interp-tests} function
|
|
|
(Appendix~\ref{appendix:utilities}) from \key{utilities.rkt} to test
|
|
|
your \key{uniquify} pass on the example programs. See the
|
|
|
-\key{run-tests.rkt} script in the student support code for an example
|
|
|
-of how to use \key{interp-tests}.
|
|
|
-
|
|
|
+\key{run-tests.rkt} script in the support code for an example of how
|
|
|
+to use \key{interp-tests}. The support code is in a \code{github}
|
|
|
+repository at the following URL:
|
|
|
+\begin{center}\footnotesize
|
|
|
+ \url{https://github.com/IUCompilerCourse/public-student-support-code}
|
|
|
+\end{center}
|
|
|
\end{exercise}
|
|
|
|
|
|
\section{Remove Complex Operands}
|
|
@@ -4175,8 +4178,8 @@ checker enforces the rule that the argument of \code{not} must be a
|
|
|
|
|
|
The type checker for $R_2$ is a structurally recursive function over
|
|
|
the AST. Figure~\ref{fig:type-check-R2} defines the
|
|
|
-\code{type-check-exp} function. The code for the type checker is
|
|
|
-included in the student support code.
|
|
|
+\code{type-check-exp} function. The code for the type checker is in
|
|
|
+the file \code{type-check-R2.rkt} of support code.
|
|
|
%
|
|
|
Given an input expression \code{e}, the type checker either returns a
|
|
|
type (\key{Integer} or \key{Boolean}) or it signals an error. The
|