|
@@ -7791,12 +7791,14 @@ operators to include
|
|
\newcommand{\LifASTPython}{
|
|
\newcommand{\LifASTPython}{
|
|
\begin{array}{lcl}
|
|
\begin{array}{lcl}
|
|
\itm{boolop} &::=& \code{And()} \MID \code{Or()} \\
|
|
\itm{boolop} &::=& \code{And()} \MID \code{Or()} \\
|
|
-\itm{unaryop} &::=& \code{Not()} \\
|
|
|
|
|
|
+%\itm{unaryop} &::=& \code{Not()} \\
|
|
\itm{cmp} &::= & \code{Eq()} \MID \code{NotEq()} \MID \code{Lt()} \MID \code{LtE()} \MID \code{Gt()} \MID \code{GtE()} \\
|
|
\itm{cmp} &::= & \code{Eq()} \MID \code{NotEq()} \MID \code{Lt()} \MID \code{LtE()} \MID \code{Gt()} \MID \code{GtE()} \\
|
|
\itm{bool} &::=& \code{True} \MID \code{False} \\
|
|
\itm{bool} &::=& \code{True} \MID \code{False} \\
|
|
\Exp &::=& \BOOL{\itm{bool}}
|
|
\Exp &::=& \BOOL{\itm{bool}}
|
|
- \MID \BOOLOP{\itm{boolop}}{\Exp}{\Exp}\\
|
|
|
|
- &\MID& \CMP{\Exp}{\itm{cmp}}{\Exp} \MID \IF{\Exp}{\Exp}{\Exp} \\
|
|
|
|
|
|
+ \MID \BOOLOP{\itm{boolop}}{\Exp}{\Exp}\\
|
|
|
|
+ &\MID& \UNIOP{\key{Not()}}{\Exp}
|
|
|
|
+ \MID \CMP{\Exp}{\itm{cmp}}{\Exp} \\
|
|
|
|
+ &\MID& \IF{\Exp}{\Exp}{\Exp} \\
|
|
\Stmt{} &::=& \IFSTMT{\Exp}{\Stmt^{+}}{\Stmt^{+}}
|
|
\Stmt{} &::=& \IFSTMT{\Exp}{\Stmt^{+}}{\Stmt^{+}}
|
|
\end{array}
|
|
\end{array}
|
|
}
|
|
}
|
|
@@ -8892,8 +8894,10 @@ upcoming \code{explicate\_control} pass.
|
|
\newcommand{\LifMonadASTPython}{
|
|
\newcommand{\LifMonadASTPython}{
|
|
\begin{array}{rcl}
|
|
\begin{array}{rcl}
|
|
\Atm &::=& \BOOL{\itm{bool}}\\
|
|
\Atm &::=& \BOOL{\itm{bool}}\\
|
|
-\Exp &::=& \CMP{\Atm}{\itm{cmp}}{\Atm} \MID \IF{\Exp}{\Exp}{\Exp} \\
|
|
|
|
- &\MID& \BEGIN{\Stmt^{*}}{\Exp}\\
|
|
|
|
|
|
+\Exp &::=& \UNIOP{\key{Not()}}{\Exp}
|
|
|
|
+ \MID \CMP{\Atm}{\itm{cmp}}{\Atm} \\
|
|
|
|
+ &\MID& \IF{\Exp}{\Exp}{\Exp}
|
|
|
|
+ \MID \BEGIN{\Stmt^{*}}{\Exp}\\
|
|
\Stmt{} &::=& \IFSTMT{\Exp}{\Stmt^{*}}{\Stmt^{*}}
|
|
\Stmt{} &::=& \IFSTMT{\Exp}{\Stmt^{*}}{\Stmt^{*}}
|
|
\end{array}
|
|
\end{array}
|
|
}
|
|
}
|
|
@@ -20344,9 +20348,10 @@ next two sections.
|
|
\end{array}
|
|
\end{array}
|
|
}
|
|
}
|
|
|
|
|
|
-\begin{figure}[tp]
|
|
|
|
|
|
+\begin{figure}[tbp]
|
|
\centering
|
|
\centering
|
|
\begin{tcolorbox}[colback=white]
|
|
\begin{tcolorbox}[colback=white]
|
|
|
|
+ \vspace{-5pt}
|
|
\small
|
|
\small
|
|
{\if\edition\racketEd
|
|
{\if\edition\racketEd
|
|
\[
|
|
\[
|
|
@@ -20384,7 +20389,7 @@ next two sections.
|
|
\label{fig:Lgrad-concrete-syntax}
|
|
\label{fig:Lgrad-concrete-syntax}
|
|
\end{figure}
|
|
\end{figure}
|
|
|
|
|
|
-\begin{figure}[tp]
|
|
|
|
|
|
+\begin{figure}[tbp]
|
|
\centering
|
|
\centering
|
|
\begin{tcolorbox}[colback=white]
|
|
\begin{tcolorbox}[colback=white]
|
|
\small
|
|
\small
|
|
@@ -20460,7 +20465,7 @@ but parameter \code{f} of \code{map} has type
|
|
The type checker for \LangGrad{} accepts this call because the two types are
|
|
The type checker for \LangGrad{} accepts this call because the two types are
|
|
consistent.
|
|
consistent.
|
|
|
|
|
|
-\begin{figure}[btp]
|
|
|
|
|
|
+\begin{figure}[hbtp]
|
|
% gradual_test_9.rkt
|
|
% gradual_test_9.rkt
|
|
\begin{tcolorbox}[colback=white]
|
|
\begin{tcolorbox}[colback=white]
|
|
{\if\edition\racketEd
|
|
{\if\edition\racketEd
|
|
@@ -20780,6 +20785,8 @@ def type_check_stmts(self, ss, env, return_type):
|
|
\label{fig:type-check-Lgradual-3}
|
|
\label{fig:type-check-Lgradual-3}
|
|
\end{figure}
|
|
\end{figure}
|
|
|
|
|
|
|
|
+\clearpage
|
|
|
|
+
|
|
\begin{figure}[tbp]
|
|
\begin{figure}[tbp]
|
|
\begin{tcolorbox}[colback=white]
|
|
\begin{tcolorbox}[colback=white]
|
|
\begin{lstlisting}
|
|
\begin{lstlisting}
|
|
@@ -21026,7 +21033,7 @@ def check_consistent(self, t1, t2, e):
|
|
|
|
|
|
\fi}
|
|
\fi}
|
|
|
|
|
|
-\clearpage
|
|
|
|
|
|
+
|
|
|
|
|
|
\section{Interpreting \LangCast{} \vspace{-2pt}}
|
|
\section{Interpreting \LangCast{} \vspace{-2pt}}
|
|
\label{sec:interp-casts}
|
|
\label{sec:interp-casts}
|
|
@@ -21674,6 +21681,7 @@ def main() -> int:
|
|
\label{fig:map-lower-cast}
|
|
\label{fig:map-lower-cast}
|
|
\end{figure}
|
|
\end{figure}
|
|
|
|
|
|
|
|
+%\pagebreak
|
|
|
|
|
|
\section{Differentiate Proxies \vspace{-2pt}}
|
|
\section{Differentiate Proxies \vspace{-2pt}}
|
|
\label{sec:differentiate-proxies}
|
|
\label{sec:differentiate-proxies}
|
|
@@ -21951,6 +21959,7 @@ decimal), just like the tuple and array types.
|
|
%
|
|
%
|
|
Otherwise, the only other changes are adding cases that copy the new AST nodes.
|
|
Otherwise, the only other changes are adding cases that copy the new AST nodes.
|
|
|
|
|
|
|
|
+\pagebreak
|
|
|
|
|
|
\section{Closure Conversion \vspace{-2pt}}
|
|
\section{Closure Conversion \vspace{-2pt}}
|
|
\label{sec:closure-conversion-gradual}
|
|
\label{sec:closure-conversion-gradual}
|