mirror of
https://github.com/achlipala/frap.git
synced 2024-11-10 00:07:51 +00:00
Closes #27
This commit is contained in:
parent
e032ab4240
commit
ed64e05e38
1 changed files with 2 additions and 2 deletions
|
@ -810,7 +810,7 @@ In that sense, with this translation, we make progress toward efficient implemen
|
||||||
\newcommand{\compile}[1]{{\left \lfloor #1 \right \rfloor}}
|
\newcommand{\compile}[1]{{\left \lfloor #1 \right \rfloor}}
|
||||||
|
|
||||||
Throughout this book, we will use notation $\compile{\ldots}$ for compilation, where the floor-based notation suggests \emph{moving downward} to a lower abstraction level.
|
Throughout this book, we will use notation $\compile{\ldots}$ for compilation, where the floor-based notation suggests \emph{moving downward} to a lower abstraction level.
|
||||||
Here is the compiler that concerns us now, where we write $\concat{s_1}{s_2}$ for concatenation of two stacks $s_1$ and $s_2$.
|
Here is the compiler that concerns us now, where we write $\concat{\overline{i_1}}{\overline{i_2}}$ for concatenation of two instruction sequences $\overline{i_1}$ and $\overline{i_2}$.
|
||||||
\encoding
|
\encoding
|
||||||
\begin{eqnarray*}
|
\begin{eqnarray*}
|
||||||
\compile{n} &=& \mathsf{PushConst}(n) \\
|
\compile{n} &=& \mathsf{PushConst}(n) \\
|
||||||
|
@ -843,7 +843,7 @@ e \arrow{r}{\compile{\ldots}} \arrow{dr}{\denote{\ldots}} & \compile{e} \arrow{d
|
||||||
As usual, we leave proof details for the associated Coq code, but the key insight of the proof is to strengthen the induction hypothesis via a lemma.
|
As usual, we leave proof details for the associated Coq code, but the key insight of the proof is to strengthen the induction hypothesis via a lemma.
|
||||||
|
|
||||||
\begin{lemma}
|
\begin{lemma}
|
||||||
$\denote{\concat{\compile{e}}{\overline{i}}}(v, s) = \denote{\overline{i}}(v, \concat{\denote{e}v}{s})$.
|
$\denote{\concat{\compile{e}}{\overline{i}}}(v, s) = \denote{\overline{i}}(v, \push{\denote{e}v}{s})$.
|
||||||
\end{lemma}
|
\end{lemma}
|
||||||
|
|
||||||
We strengthen the statement by considering both an arbitrary initial stack $s$ and a sequence of extra instructions $\overline{i}$ to be run after $e$.
|
We strengthen the statement by considering both an arbitrary initial stack $s$ and a sequence of extra instructions $\overline{i}$ to be run after $e$.
|
||||||
|
|
Loading…
Reference in a new issue