mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 13:05:24 +02:00
[FMFP] Final remarks and fixes
This commit is contained in:
Binary file not shown.
@@ -43,7 +43,7 @@ For Boolean Expressions
|
|||||||
And finally for Statements:
|
And finally for Statements:
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
FV(\texttt{skip}) & = \varnothing \\
|
FV(\texttt{skip}) & = \varnothing \\
|
||||||
FV(x := e) & = \{ x \} \cup FV(s_2) \\
|
FV(x := e) & = \{ x \} \cup FV(e) \\
|
||||||
FV(s_1; s_2) & = FV(s_1) \cup FV(s_2) \\
|
FV(s_1; s_2) & = FV(s_1) \cup FV(s_2) \\
|
||||||
FV(\texttt{if}\; b\; \texttt{then} \; s_1 \; \texttt{else} \; s_2 \; \texttt{end}) & = FV(b) \cup FV(s_1) \cup FV(s_2) \\
|
FV(\texttt{if}\; b\; \texttt{then} \; s_1 \; \texttt{else} \; s_2 \; \texttt{end}) & = FV(b) \cup FV(s_1) \cup FV(s_2) \\
|
||||||
FV(\texttt{while}\; b\; \texttt{do} \; s \; \texttt{end}) & = FV(b) \cup FV(s)
|
FV(\texttt{while}\; b\; \texttt{do} \; s \; \texttt{end}) & = FV(b) \cup FV(s)
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
The full proof for this is available on the slides for Formal Methods, pages 82 - 91 (Slide Deck 3, pages 27 - 40)
|
The full proof for this is available on the slides for Formal Methods, pages 82 - 91 (Slide Deck 3, pages 27 - 40)
|
||||||
|
|
||||||
In there, \bi{Induction on Derivation Trees} is used.
|
In there, \bi{Induction on Derivation Trees} is used.
|
||||||
Similar like other induction proofs, we show that a property $P(T)$ holds for all derivation trees $T$,
|
Similar to other induction proofs, we show that a property $P(T)$ holds for all derivation trees $T$,
|
||||||
we prove that $P(T)$ holds for an arbitrary derivation tree $T$ under the assumption (the induction hypothesis) that $P(T')$ holds for all sub-trees $T'$ of $T$
|
we prove that $P(T)$ holds for an arbitrary derivation tree $T$ under the assumption (the induction hypothesis) that $P(T')$ holds for all sub-trees $T'$ of $T$
|
||||||
|
|
||||||
This kind of induction is a special case of \bi{well-founded (Noetherian) induction}.
|
This kind of induction is a special case of \bi{well-founded (Noetherian) induction}.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
\subsubsection{Evaluation strategies}
|
\subsubsection{Evaluation strategies}
|
||||||
\begin{examdetails}
|
\begin{examdetails}
|
||||||
It is likely that one such task will appear.
|
It is not very likely that one such task will appear.
|
||||||
\end{examdetails}
|
\end{examdetails}
|
||||||
Evaluation strategies formalize how programming languages evaluate the code.
|
Evaluation strategies formalize how programming languages evaluate the code.
|
||||||
Most of the commonly used programming languages use \textit{eager evaluation}, whereas functional programming languages tend to prefer \textit{lazy evaluation}
|
Most of the commonly used programming languages use \textit{eager evaluation}, whereas functional programming languages tend to prefer \textit{lazy evaluation}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
\subsubsection{Haskell}
|
\subsubsection{Haskell}
|
||||||
\begin{examdetails}
|
\begin{examdetails}
|
||||||
typically either short coding task or proof of program
|
Typically one large coding task (split up into many subtasks) and proof of program
|
||||||
\end{examdetails}
|
\end{examdetails}
|
||||||
|
|
||||||
\paragraph{Programming}
|
\paragraph{Programming}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
\newpage
|
\newpage
|
||||||
\subsubsection{Natural Deduction}
|
\subsubsection{Natural Deduction}
|
||||||
|
\begin{examdetails}
|
||||||
|
From time to time there is one such task, has become more common in recent times. Inference rules are provided
|
||||||
|
\end{examdetails}
|
||||||
\paragraph{Parenthesis}
|
\paragraph{Parenthesis}
|
||||||
This task (if it were to even ever appear in the exams) is simply applying precedences, as well as remembering associativity.
|
This task (if it were to even ever appear in the exams) is simply applying precedences, as well as remembering associativity.
|
||||||
The precedences are as follows:
|
The precedences are as follows:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
\begin{examdetails}
|
\begin{examdetails}
|
||||||
There typically is one such task. They provide the inference rules
|
There typically is one such task. They provide the inference rules
|
||||||
\end{examdetails}
|
\end{examdetails}
|
||||||
|
|
||||||
The proof trees are again drawn up bottom up, applying rules from the outside in.
|
The proof trees are again drawn up bottom up, applying rules from the outside in.
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item Create a proof tree using the typing rules.
|
\item Create a proof tree using the typing rules.
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
\subsubsection{Axiomatic Semantics}
|
\subsubsection{Axiomatic Semantics}
|
||||||
|
\begin{examdetails}
|
||||||
|
Typically one task, accounting for a fairly large portion of points
|
||||||
|
\end{examdetails}
|
||||||
Here, we need to find pre- and postconditions for expressions and prove that they are correct.
|
Here, we need to find pre- and postconditions for expressions and prove that they are correct.
|
||||||
|
|
||||||
To do the proofs, we again apply transition rules, as was the case already with operational semantics.
|
To do the proofs, we again apply transition rules, as was the case already with operational semantics.
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
\subsubsection{Modelling}
|
\subsubsection{Modelling}
|
||||||
|
\begin{examdetails}
|
||||||
|
Has appeared from time to time in exams
|
||||||
|
\end{examdetails}
|
||||||
Many of the tasks here are pretty straight forward, converting IMP into Promela,
|
Many of the tasks here are pretty straight forward, converting IMP into Promela,
|
||||||
and putting an \texttt{assert} (or more) into the \texttt{init} block, to check if the required state is reached.
|
and putting an \texttt{assert} (or more) into the \texttt{init} block, to check if the required state is reached.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
\newpage
|
\newpage
|
||||||
\subsubsection{Linear Time Properties (LTL)}
|
\subsubsection{Linear Time Properties (LTL)}
|
||||||
|
\begin{examdetails}
|
||||||
|
Has appeared in most exams over the last 10 years.
|
||||||
|
Typically a task where you provide an LTL formula, one where you show correctness / counterexamples for one and one on Liveness/Safety Properties
|
||||||
|
\end{examdetails}
|
||||||
We refer to Section~\ref{sec:ltl} for intuition, as these tend to mostly be intuition exercises.
|
We refer to Section~\ref{sec:ltl} for intuition, as these tend to mostly be intuition exercises.
|
||||||
|
|
||||||
For doing verification of liveness / safety properties using \texttt{spin} and Promela,
|
For doing verification of liveness / safety properties using \texttt{spin} and Promela,
|
||||||
|
|||||||
Reference in New Issue
Block a user