10123
|
1 |
%
|
|
2 |
\begin{isabellebody}%
|
|
3 |
\def\isabellecontext{Base}%
|
|
4 |
%
|
|
5 |
\isamarkupsection{A verified model checker}
|
|
6 |
%
|
|
7 |
\begin{isamarkuptext}%
|
|
8 |
Model checking is a very popular technique for the verification of finite
|
|
9 |
state systems (implementations) w.r.t.\ temporal logic formulae
|
|
10 |
(specifications) \cite{Clark}. Its foundations are completely set theoretic
|
|
11 |
and this section shall develop them in HOL. This is done in two steps: first
|
|
12 |
we consider a very simple ``temporal'' logic called propositional dynamic
|
|
13 |
logic (PDL) which we then extend to the temporal logic CTL used in many real
|
|
14 |
model checkers. In each case we give both a traditional semantics (\isa{{\isasymTurnstile}}) and a
|
|
15 |
recursive function \isa{mc} that maps a formula into the set of all states of
|
|
16 |
the system where the formula is valid. If the system has a finite number of
|
|
17 |
states, \isa{mc} is directly executable, i.e.\ a model checker, albeit not a
|
|
18 |
very efficient one. The main proof obligation is to show that the semantics
|
|
19 |
and the model checker agree.
|
|
20 |
|
|
21 |
Our models are transition systems.
|
|
22 |
|
|
23 |
START with simple example: mutex or something.
|
|
24 |
|
|
25 |
Abstracting from this concrete example, we assume there is some type of
|
|
26 |
atomic propositions%
|
|
27 |
\end{isamarkuptext}%
|
|
28 |
\isacommand{typedecl}\ atom%
|
|
29 |
\begin{isamarkuptext}%
|
|
30 |
\noindent
|
|
31 |
which we merely declare rather than define because it is an implicit parameter of our model.
|
|
32 |
Of course it would have been more generic to make \isa{atom} a type parameter of everything
|
|
33 |
but fixing \isa{atom} as above reduces clutter.
|
|
34 |
|
|
35 |
Instead of introducing both a separate type of states and a function
|
|
36 |
telling us which atoms are true in each state we simply identify each
|
|
37 |
state with that set of atoms:%
|
|
38 |
\end{isamarkuptext}%
|
|
39 |
\isacommand{types}\ state\ {\isacharequal}\ {\isachardoublequote}atom\ set{\isachardoublequote}%
|
|
40 |
\begin{isamarkuptext}%
|
|
41 |
\noindent
|
|
42 |
Finally we declare an arbitrary but fixed transition system, i.e.\ relation between states:%
|
|
43 |
\end{isamarkuptext}%
|
|
44 |
\isacommand{consts}\ M\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}state\ {\isasymtimes}\ state{\isacharparenright}set{\isachardoublequote}%
|
|
45 |
\begin{isamarkuptext}%
|
|
46 |
\noindent
|
|
47 |
Again, we could have made \isa{M} a parameter of everything.%
|
|
48 |
\end{isamarkuptext}%
|
|
49 |
\end{isabellebody}%
|
|
50 |
%%% Local Variables:
|
|
51 |
%%% mode: latex
|
|
52 |
%%% TeX-master: "root"
|
|
53 |
%%% End:
|