Add description for 2.3

This commit is contained in:
Tobias Eidelpes 2021-06-03 14:49:43 +02:00
parent a4b68d6ce6
commit f042ef4a8d

View File

@ -103,10 +103,34 @@ change from 1 to 0.
\paragraph{Paper proofs} \paragraph{Paper proofs}
To prove \texttt{nsteps\_stop}, induction over the amount of executed steps $n$
is used. The base case starts with $n = 0$. This case is trivial since
\texttt{nsteps 0 te cs == cs}. The induction hypothesis is \texttt{nsteps (n-1)
te cs == cs} and it is assumed that $n > 0$. The induction then goes as follows:
\begin{verbatim}
nsteps n te cs = nsteps (n-1) te (step_simp te cs)
= nsteps (n-1) te cs
= cs
\end{verbatim}
It is allowed to reduce \texttt{step\_simp te cs} to \texttt{cs}, because
\texttt{cs} is already final.
Now it is possible to prove the lemma \texttt{progress}: \texttt{cs ==
step\_simp te cs} $\rightarrow$ \texttt{isFinal cs}. Since, \texttt{step\_simp}
has the same value as the \texttt{step} function, when the outcome is
\texttt{Next}, the call stack is different from \texttt{cs}. This means that the
left side of the lemma does not hold and therefore the right side does not have
to hold to satisfy the implication. If the outcome is \texttt{Stop}, \texttt{cs}
can only equal \texttt{Ter ts []} and therefore the left side is satisfied. When
the left side is satisfied, \texttt{cs} is a final state and therefore it
follows that \texttt{isFinal cs} is also true.
\paragraph{Explanation on used equalities} \paragraph{Explanation on used equalities}
%TODO
The lemma uses propositional equality, because \texttt{callstack} has the
keyword \texttt{noeq}, which means that the type does not satisfy decidable
equality. The usual equality only works with types that satisfy decidable
equality and therefore propositional equality is needed.
\section{Uniqueness of call stacks} \section{Uniqueness of call stacks}
@ -114,7 +138,6 @@ change from 1 to 0.
%TODO %TODO
\paragraph{Explanation on lemma \texttt{order\_ineq}} \paragraph{Explanation on lemma \texttt{order\_ineq}}
%TODO
\section{Exception Propagation} \section{Exception Propagation}