10123
|
1 |
%
|
|
2 |
\begin{isabellebody}%
|
|
3 |
\def\isabellecontext{CTL}%
|
11866
|
4 |
\isamarkupfalse%
|
10133
|
5 |
%
|
10971
|
6 |
\isamarkupsubsection{Computation Tree Logic --- CTL%
|
10395
|
7 |
}
|
11866
|
8 |
\isamarkuptrue%
|
10149
|
9 |
%
|
|
10 |
\begin{isamarkuptext}%
|
10217
|
11 |
\label{sec:CTL}
|
11494
|
12 |
\index{CTL|(}%
|
10867
|
13 |
The semantics of PDL only needs reflexive transitive closure.
|
|
14 |
Let us be adventurous and introduce a more expressive temporal operator.
|
|
15 |
We extend the datatype
|
10149
|
16 |
\isa{formula} by a new constructor%
|
|
17 |
\end{isamarkuptext}%
|
11866
|
18 |
\isamarkuptrue%
|
|
19 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isacharbar}\ AF\ formula\isamarkupfalse%
|
|
20 |
%
|
10149
|
21 |
\begin{isamarkuptext}%
|
|
22 |
\noindent
|
10983
|
23 |
which stands for ``\emph{A}lways in the \emph{F}uture'':
|
|
24 |
on all infinite paths, at some point the formula holds.
|
|
25 |
Formalizing the notion of an infinite path is easy
|
10159
|
26 |
in HOL: it is simply a function from \isa{nat} to \isa{state}.%
|
10149
|
27 |
\end{isamarkuptext}%
|
11866
|
28 |
\isamarkuptrue%
|
10123
|
29 |
\isacommand{constdefs}\ Paths\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}state\ {\isasymRightarrow}\ {\isacharparenleft}nat\ {\isasymRightarrow}\ state{\isacharparenright}set{\isachardoublequote}\isanewline
|
11866
|
30 |
\ \ \ \ \ \ \ \ \ {\isachardoublequote}Paths\ s\ {\isasymequiv}\ {\isacharbraceleft}p{\isachardot}\ s\ {\isacharequal}\ p\ {\isadigit{0}}\ {\isasymand}\ {\isacharparenleft}{\isasymforall}i{\isachardot}\ {\isacharparenleft}p\ i{\isacharcomma}\ p{\isacharparenleft}i{\isacharplus}{\isadigit{1}}{\isacharparenright}{\isacharparenright}\ {\isasymin}\ M{\isacharparenright}{\isacharbraceright}{\isachardoublequote}\isamarkupfalse%
|
|
31 |
%
|
10149
|
32 |
\begin{isamarkuptext}%
|
|
33 |
\noindent
|
11494
|
34 |
This definition allows a succinct statement of the semantics of \isa{AF}:
|
10867
|
35 |
\footnote{Do not be misled: neither datatypes nor recursive functions can be
|
10149
|
36 |
extended by new constructors or equations. This is just a trick of the
|
12815
|
37 |
presentation (see \S\ref{sec:doc-prep-suppress}). In reality one has to define
|
|
38 |
a new datatype and a new function.}%
|
10149
|
39 |
\end{isamarkuptext}%
|
11866
|
40 |
\isamarkuptrue%
|
|
41 |
\isamarkupfalse%
|
|
42 |
{\isachardoublequote}s\ {\isasymTurnstile}\ AF\ f\ \ \ \ {\isacharequal}\ {\isacharparenleft}{\isasymforall}p\ {\isasymin}\ Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymTurnstile}\ f{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
|
|
43 |
%
|
10149
|
44 |
\begin{isamarkuptext}%
|
|
45 |
\noindent
|
|
46 |
Model checking \isa{AF} involves a function which
|
10159
|
47 |
is just complicated enough to warrant a separate definition:%
|
10149
|
48 |
\end{isamarkuptext}%
|
11866
|
49 |
\isamarkuptrue%
|
10123
|
50 |
\isacommand{constdefs}\ af\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}state\ set\ {\isasymRightarrow}\ state\ set\ {\isasymRightarrow}\ state\ set{\isachardoublequote}\isanewline
|
11866
|
51 |
\ \ \ \ \ \ \ \ \ {\isachardoublequote}af\ A\ T\ {\isasymequiv}\ A\ {\isasymunion}\ {\isacharbraceleft}s{\isachardot}\ {\isasymforall}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\ {\isasymlongrightarrow}\ t\ {\isasymin}\ T{\isacharbraceright}{\isachardoublequote}\isamarkupfalse%
|
|
52 |
%
|
10149
|
53 |
\begin{isamarkuptext}%
|
|
54 |
\noindent
|
10867
|
55 |
Now we define \isa{mc\ {\isacharparenleft}AF\ f{\isacharparenright}} as the least set \isa{T} that includes
|
10159
|
56 |
\isa{mc\ f} and all states all of whose direct successors are in \isa{T}:%
|
|
57 |
\end{isamarkuptext}%
|
11866
|
58 |
\isamarkuptrue%
|
|
59 |
\isamarkupfalse%
|
|
60 |
{\isachardoublequote}mc{\isacharparenleft}AF\ f{\isacharparenright}\ \ \ \ {\isacharequal}\ lfp{\isacharparenleft}af{\isacharparenleft}mc\ f{\isacharparenright}{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
|
|
61 |
%
|
10159
|
62 |
\begin{isamarkuptext}%
|
|
63 |
\noindent
|
|
64 |
Because \isa{af} is monotone in its second argument (and also its first, but
|
10983
|
65 |
that is irrelevant), \isa{af\ A} has a least fixed point:%
|
10149
|
66 |
\end{isamarkuptext}%
|
11866
|
67 |
\isamarkuptrue%
|
10123
|
68 |
\isacommand{lemma}\ mono{\isacharunderscore}af{\isacharcolon}\ {\isachardoublequote}mono{\isacharparenleft}af\ A{\isacharparenright}{\isachardoublequote}\isanewline
|
11866
|
69 |
\isamarkupfalse%
|
15488
|
70 |
\isamarkupfalse%
|
11866
|
71 |
\isamarkupfalse%
|
15904
|
72 |
\isanewline
|
|
73 |
\isamarkupfalse%
|
|
74 |
\isamarkupfalse%
|
|
75 |
\isamarkupfalse%
|
|
76 |
\isanewline
|
11866
|
77 |
\isamarkupfalse%
|
|
78 |
\isamarkupfalse%
|
|
79 |
\isamarkupfalse%
|
|
80 |
\isamarkupfalse%
|
|
81 |
\isamarkupfalse%
|
|
82 |
\isamarkupfalse%
|
|
83 |
\isamarkupfalse%
|
|
84 |
\isamarkupfalse%
|
|
85 |
\isamarkupfalse%
|
|
86 |
\isamarkupfalse%
|
|
87 |
\isamarkupfalse%
|
|
88 |
\isamarkupfalse%
|
|
89 |
\isamarkupfalse%
|
|
90 |
\isamarkupfalse%
|
|
91 |
\isamarkupfalse%
|
15904
|
92 |
\isanewline
|
11866
|
93 |
\isamarkupfalse%
|
|
94 |
%
|
10149
|
95 |
\begin{isamarkuptext}%
|
10867
|
96 |
All we need to prove now is \isa{mc\ {\isacharparenleft}AF\ f{\isacharparenright}\ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ s\ {\isasymTurnstile}\ AF\ f{\isacharbraceright}}, which states
|
|
97 |
that \isa{mc} and \isa{{\isasymTurnstile}} agree for \isa{AF}\@.
|
|
98 |
This time we prove the two inclusions separately, starting
|
10159
|
99 |
with the easy one:%
|
|
100 |
\end{isamarkuptext}%
|
11866
|
101 |
\isamarkuptrue%
|
10187
|
102 |
\isacommand{theorem}\ AF{\isacharunderscore}lemma{\isadigit{1}}{\isacharcolon}\isanewline
|
12328
|
103 |
\ \ {\isachardoublequote}lfp{\isacharparenleft}af\ A{\isacharparenright}\ {\isasymsubseteq}\ {\isacharbraceleft}s{\isachardot}\ {\isasymforall}p\ {\isasymin}\ Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymin}\ A{\isacharbraceright}{\isachardoublequote}\isamarkupfalse%
|
11866
|
104 |
\isamarkuptrue%
|
15488
|
105 |
\isamarkupfalse%
|
11866
|
106 |
\isamarkupfalse%
|
|
107 |
\isamarkuptrue%
|
15488
|
108 |
\isamarkupfalse%
|
11866
|
109 |
\isamarkupfalse%
|
|
110 |
\isamarkupfalse%
|
|
111 |
%
|
10123
|
112 |
\begin{isamarkuptext}%
|
10867
|
113 |
The opposite inclusion is proved by contradiction: if some state
|
10159
|
114 |
\isa{s} is not in \isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}, then we can construct an
|
11494
|
115 |
infinite \isa{A}-avoiding path starting from~\isa{s}. The reason is
|
10123
|
116 |
that by unfolding \isa{lfp} we find that if \isa{s} is not in
|
|
117 |
\isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}, then \isa{s} is not in \isa{A} and there is a
|
10983
|
118 |
direct successor of \isa{s} that is again not in \mbox{\isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}}. Iterating this argument yields the promised infinite
|
10123
|
119 |
\isa{A}-avoiding path. Let us formalize this sketch.
|
|
120 |
|
10867
|
121 |
The one-step argument in the sketch above
|
|
122 |
is proved by a variant of contraposition:%
|
10123
|
123 |
\end{isamarkuptext}%
|
11866
|
124 |
\isamarkuptrue%
|
10123
|
125 |
\isacommand{lemma}\ not{\isacharunderscore}in{\isacharunderscore}lfp{\isacharunderscore}afD{\isacharcolon}\isanewline
|
10983
|
126 |
\ {\isachardoublequote}s\ {\isasymnotin}\ lfp{\isacharparenleft}af\ A{\isacharparenright}\ {\isasymLongrightarrow}\ s\ {\isasymnotin}\ A\ {\isasymand}\ {\isacharparenleft}{\isasymexists}\ t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ t\ {\isasymnotin}\ lfp{\isacharparenleft}af\ A{\isacharparenright}{\isacharparenright}{\isachardoublequote}\isanewline
|
11866
|
127 |
\isamarkupfalse%
|
|
128 |
\isamarkupfalse%
|
|
129 |
\isamarkupfalse%
|
|
130 |
\isamarkupfalse%
|
15488
|
131 |
\isamarkupfalse%
|
11866
|
132 |
%
|
10123
|
133 |
\begin{isamarkuptext}%
|
|
134 |
\noindent
|
10867
|
135 |
We assume the negation of the conclusion and prove \isa{s\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}}.
|
10237
|
136 |
Unfolding \isa{lfp} once and
|
10123
|
137 |
simplifying with the definition of \isa{af} finishes the proof.
|
|
138 |
|
|
139 |
Now we iterate this process. The following construction of the desired
|
10895
|
140 |
path is parameterized by a predicate \isa{Q} that should hold along the path:%
|
10123
|
141 |
\end{isamarkuptext}%
|
11866
|
142 |
\isamarkuptrue%
|
10123
|
143 |
\isacommand{consts}\ path\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}state\ {\isasymRightarrow}\ {\isacharparenleft}state\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isasymRightarrow}\ {\isacharparenleft}nat\ {\isasymRightarrow}\ state{\isacharparenright}{\isachardoublequote}\isanewline
|
11866
|
144 |
\isamarkupfalse%
|
10123
|
145 |
\isacommand{primrec}\isanewline
|
10895
|
146 |
{\isachardoublequote}path\ s\ Q\ {\isadigit{0}}\ {\isacharequal}\ s{\isachardoublequote}\isanewline
|
11866
|
147 |
{\isachardoublequote}path\ s\ Q\ {\isacharparenleft}Suc\ n{\isacharparenright}\ {\isacharequal}\ {\isacharparenleft}SOME\ t{\isachardot}\ {\isacharparenleft}path\ s\ Q\ n{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ Q\ t{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
|
|
148 |
%
|
10123
|
149 |
\begin{isamarkuptext}%
|
|
150 |
\noindent
|
12699
|
151 |
Element \isa{n\ {\isacharplus}\ {\isadigit{1}}} on this path is some arbitrary successor
|
10895
|
152 |
\isa{t} of element \isa{n} such that \isa{Q\ t} holds. Remember that \isa{SOME\ t{\isachardot}\ R\ t}
|
10654
|
153 |
is some arbitrary but fixed \isa{t} such that \isa{R\ t} holds (see \S\ref{sec:SOME}). Of
|
10867
|
154 |
course, such a \isa{t} need not exist, but that is of no
|
|
155 |
concern to us since we will only use \isa{path} when a
|
10123
|
156 |
suitable \isa{t} does exist.
|
|
157 |
|
10895
|
158 |
Let us show that if each state \isa{s} that satisfies \isa{Q}
|
|
159 |
has a successor that again satisfies \isa{Q}, then there exists an infinite \isa{Q}-path:%
|
10123
|
160 |
\end{isamarkuptext}%
|
11866
|
161 |
\isamarkuptrue%
|
10159
|
162 |
\isacommand{lemma}\ infinity{\isacharunderscore}lemma{\isacharcolon}\isanewline
|
10895
|
163 |
\ \ {\isachardoublequote}{\isasymlbrakk}\ Q\ s{\isacharsemicolon}\ {\isasymforall}s{\isachardot}\ Q\ s\ {\isasymlongrightarrow}\ {\isacharparenleft}{\isasymexists}\ t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ Q\ t{\isacharparenright}\ {\isasymrbrakk}\ {\isasymLongrightarrow}\isanewline
|
11866
|
164 |
\ \ \ {\isasymexists}p{\isasymin}Paths\ s{\isachardot}\ {\isasymforall}i{\isachardot}\ Q{\isacharparenleft}p\ i{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
|
15488
|
165 |
\isamarkuptrue%
|
|
166 |
\isamarkupfalse%
|
11866
|
167 |
\isamarkuptrue%
|
15488
|
168 |
\isamarkupfalse%
|
11866
|
169 |
\isamarkuptrue%
|
|
170 |
\isamarkupfalse%
|
15488
|
171 |
\isamarkupfalse%
|
11866
|
172 |
\isamarkuptrue%
|
15488
|
173 |
\isamarkupfalse%
|
|
174 |
\isamarkupfalse%
|
|
175 |
\isamarkuptrue%
|
|
176 |
\isamarkupfalse%
|
11866
|
177 |
\isamarkuptrue%
|
15488
|
178 |
\isamarkupfalse%
|
11866
|
179 |
\isamarkupfalse%
|
15488
|
180 |
\isamarkupfalse%
|
11866
|
181 |
\isamarkupfalse%
|
15488
|
182 |
\isamarkupfalse%
|
11866
|
183 |
\isamarkupfalse%
|
|
184 |
\isamarkupfalse%
|
|
185 |
%
|
10159
|
186 |
\begin{isamarkuptext}%
|
10867
|
187 |
Function \isa{path} has fulfilled its purpose now and can be forgotten.
|
|
188 |
It was merely defined to provide the witness in the proof of the
|
10171
|
189 |
\isa{infinity{\isacharunderscore}lemma}. Aficionados of minimal proofs might like to know
|
10159
|
190 |
that we could have given the witness without having to define a new function:
|
|
191 |
the term
|
|
192 |
\begin{isabelle}%
|
10895
|
193 |
\ \ \ \ \ nat{\isacharunderscore}rec\ s\ {\isacharparenleft}{\isasymlambda}n\ t{\isachardot}\ SOME\ u{\isachardot}\ {\isacharparenleft}t{\isacharcomma}\ u{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ Q\ u{\isacharparenright}%
|
10159
|
194 |
\end{isabelle}
|
10895
|
195 |
is extensionally equal to \isa{path\ s\ Q},
|
10867
|
196 |
where \isa{nat{\isacharunderscore}rec} is the predefined primitive recursor on \isa{nat}.%
|
10159
|
197 |
\end{isamarkuptext}%
|
11866
|
198 |
\isamarkuptrue%
|
|
199 |
\isamarkupfalse%
|
|
200 |
\isamarkupfalse%
|
|
201 |
\isamarkupfalse%
|
|
202 |
\isamarkupfalse%
|
|
203 |
\isamarkupfalse%
|
|
204 |
\isamarkupfalse%
|
|
205 |
\isamarkupfalse%
|
|
206 |
\isamarkupfalse%
|
|
207 |
\isamarkupfalse%
|
|
208 |
\isamarkupfalse%
|
|
209 |
\isamarkupfalse%
|
|
210 |
\isamarkupfalse%
|
|
211 |
\isamarkupfalse%
|
|
212 |
\isamarkupfalse%
|
|
213 |
\isamarkupfalse%
|
15904
|
214 |
\isanewline
|
11866
|
215 |
\isamarkupfalse%
|
10159
|
216 |
%
|
|
217 |
\begin{isamarkuptext}%
|
10187
|
218 |
At last we can prove the opposite direction of \isa{AF{\isacharunderscore}lemma{\isadigit{1}}}:%
|
10159
|
219 |
\end{isamarkuptext}%
|
11866
|
220 |
\isamarkuptrue%
|
12328
|
221 |
\isacommand{theorem}\ AF{\isacharunderscore}lemma{\isadigit{2}}{\isacharcolon}\ {\isachardoublequote}{\isacharbraceleft}s{\isachardot}\ {\isasymforall}p\ {\isasymin}\ Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymin}\ A{\isacharbraceright}\ {\isasymsubseteq}\ lfp{\isacharparenleft}af\ A{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
|
11866
|
222 |
\isamarkuptrue%
|
|
223 |
\isamarkupfalse%
|
15488
|
224 |
\isamarkupfalse%
|
11866
|
225 |
\isamarkupfalse%
|
15488
|
226 |
\isamarkuptrue%
|
|
227 |
\isamarkupfalse%
|
11866
|
228 |
\isamarkuptrue%
|
|
229 |
\isamarkupfalse%
|
15488
|
230 |
\isamarkupfalse%
|
11866
|
231 |
%
|
10159
|
232 |
\begin{isamarkuptext}%
|
10867
|
233 |
If you find these proofs too complicated, we recommend that you read
|
|
234 |
\S\ref{sec:CTL-revisited}, where we show how inductive definitions lead to
|
10217
|
235 |
simpler arguments.
|
|
236 |
|
|
237 |
The main theorem is proved as for PDL, except that we also derive the
|
|
238 |
necessary equality \isa{lfp{\isacharparenleft}af\ A{\isacharparenright}\ {\isacharequal}\ {\isachardot}{\isachardot}{\isachardot}} by combining
|
|
239 |
\isa{AF{\isacharunderscore}lemma{\isadigit{1}}} and \isa{AF{\isacharunderscore}lemma{\isadigit{2}}} on the spot:%
|
10159
|
240 |
\end{isamarkuptext}%
|
11866
|
241 |
\isamarkuptrue%
|
10123
|
242 |
\isacommand{theorem}\ {\isachardoublequote}mc\ f\ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ s\ {\isasymTurnstile}\ f{\isacharbraceright}{\isachardoublequote}\isanewline
|
11866
|
243 |
\isamarkupfalse%
|
15488
|
244 |
\isamarkupfalse%
|
11866
|
245 |
\isamarkupfalse%
|
|
246 |
\isamarkupfalse%
|
|
247 |
%
|
10159
|
248 |
\begin{isamarkuptext}%
|
10867
|
249 |
The language defined above is not quite CTL\@. The latter also includes an
|
10983
|
250 |
until-operator \isa{EU\ f\ g} with semantics ``there \emph{E}xists a path
|
11494
|
251 |
where \isa{f} is true \emph{U}ntil \isa{g} becomes true''. We need
|
|
252 |
an auxiliary function:%
|
10281
|
253 |
\end{isamarkuptext}%
|
11866
|
254 |
\isamarkuptrue%
|
10281
|
255 |
\isacommand{consts}\ until{\isacharcolon}{\isacharcolon}\ {\isachardoublequote}state\ set\ {\isasymRightarrow}\ state\ set\ {\isasymRightarrow}\ state\ {\isasymRightarrow}\ state\ list\ {\isasymRightarrow}\ bool{\isachardoublequote}\isanewline
|
11866
|
256 |
\isamarkupfalse%
|
10281
|
257 |
\isacommand{primrec}\isanewline
|
|
258 |
{\isachardoublequote}until\ A\ B\ s\ {\isacharbrackleft}{\isacharbrackright}\ \ \ \ {\isacharequal}\ {\isacharparenleft}s\ {\isasymin}\ B{\isacharparenright}{\isachardoublequote}\isanewline
|
11866
|
259 |
{\isachardoublequote}until\ A\ B\ s\ {\isacharparenleft}t{\isacharhash}p{\isacharparenright}\ {\isacharequal}\ {\isacharparenleft}s\ {\isasymin}\ A\ {\isasymand}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ until\ A\ B\ t\ p{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
|
|
260 |
\isamarkupfalse%
|
|
261 |
%
|
10281
|
262 |
\begin{isamarkuptext}%
|
|
263 |
\noindent
|
11494
|
264 |
Expressing the semantics of \isa{EU} is now straightforward:
|
10171
|
265 |
\begin{isabelle}%
|
10983
|
266 |
\ \ \ \ \ s\ {\isasymTurnstile}\ EU\ f\ g\ {\isacharequal}\ {\isacharparenleft}{\isasymexists}p{\isachardot}\ until\ {\isacharbraceleft}t{\isachardot}\ t\ {\isasymTurnstile}\ f{\isacharbraceright}\ {\isacharbraceleft}t{\isachardot}\ t\ {\isasymTurnstile}\ g{\isacharbraceright}\ s\ p{\isacharparenright}%
|
10171
|
267 |
\end{isabelle}
|
10281
|
268 |
Note that \isa{EU} is not definable in terms of the other operators!
|
|
269 |
|
|
270 |
Model checking \isa{EU} is again a least fixed point construction:
|
10171
|
271 |
\begin{isabelle}%
|
10839
|
272 |
\ \ \ \ \ mc{\isacharparenleft}EU\ f\ g{\isacharparenright}\ {\isacharequal}\ lfp{\isacharparenleft}{\isasymlambda}T{\isachardot}\ mc\ g\ {\isasymunion}\ mc\ f\ {\isasyminter}\ {\isacharparenleft}M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}{\isacharparenright}%
|
10171
|
273 |
\end{isabelle}
|
10281
|
274 |
|
|
275 |
\begin{exercise}
|
|
276 |
Extend the datatype of formulae by the above until operator
|
|
277 |
and prove the equivalence between semantics and model checking, i.e.\ that
|
10186
|
278 |
\begin{isabelle}%
|
|
279 |
\ \ \ \ \ mc\ {\isacharparenleft}EU\ f\ g{\isacharparenright}\ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ s\ {\isasymTurnstile}\ EU\ f\ g{\isacharbraceright}%
|
|
280 |
\end{isabelle}
|
|
281 |
%For readability you may want to annotate {term EU} with its customary syntax
|
|
282 |
%{text[display]"| EU formula formula E[_ U _]"}
|
|
283 |
%which enables you to read and write {text"E[f U g]"} instead of {term"EU f g"}.
|
|
284 |
\end{exercise}
|
10867
|
285 |
For more CTL exercises see, for example, Huth and Ryan \cite{Huth-Ryan-book}.%
|
10281
|
286 |
\end{isamarkuptext}%
|
11866
|
287 |
\isamarkuptrue%
|
|
288 |
\isamarkupfalse%
|
|
289 |
\isamarkupfalse%
|
|
290 |
\isamarkupfalse%
|
|
291 |
\isamarkupfalse%
|
|
292 |
\isamarkupfalse%
|
|
293 |
\isamarkupfalse%
|
|
294 |
\isamarkupfalse%
|
|
295 |
\isamarkupfalse%
|
15904
|
296 |
\isanewline
|
|
297 |
\isamarkupfalse%
|
|
298 |
\isamarkupfalse%
|
|
299 |
\isamarkupfalse%
|
|
300 |
\isamarkupfalse%
|
|
301 |
\isanewline
|
11866
|
302 |
\isamarkupfalse%
|
|
303 |
\isamarkupfalse%
|
|
304 |
\isamarkupfalse%
|
|
305 |
\isamarkupfalse%
|
|
306 |
\isamarkupfalse%
|
|
307 |
\isamarkupfalse%
|
|
308 |
\isamarkupfalse%
|
|
309 |
\isamarkupfalse%
|
|
310 |
\isamarkupfalse%
|
|
311 |
\isamarkupfalse%
|
|
312 |
\isamarkupfalse%
|
|
313 |
\isamarkupfalse%
|
15904
|
314 |
\isanewline
|
|
315 |
\isanewline
|
11866
|
316 |
\isamarkupfalse%
|
10281
|
317 |
%
|
|
318 |
\begin{isamarkuptext}%
|
12334
|
319 |
Let us close this section with a few words about the executability of
|
|
320 |
our model checkers. It is clear that if all sets are finite, they can be
|
|
321 |
represented as lists and the usual set operations are easily
|
|
322 |
implemented. Only \isa{lfp} requires a little thought. Fortunately, theory
|
12473
|
323 |
\isa{While{\isacharunderscore}Combinator} in the Library~\cite{HOL-Library} provides a
|
12334
|
324 |
theorem stating that in the case of finite sets and a monotone
|
|
325 |
function~\isa{F}, the value of \mbox{\isa{lfp\ F}} can be computed by
|
|
326 |
iterated application of \isa{F} to~\isa{{\isacharbraceleft}{\isacharbraceright}} until a fixed point is
|
|
327 |
reached. It is actually possible to generate executable functional programs
|
10159
|
328 |
from HOL definitions, but that is beyond the scope of the tutorial.%
|
11494
|
329 |
\index{CTL|)}%
|
10159
|
330 |
\end{isamarkuptext}%
|
11866
|
331 |
\isamarkuptrue%
|
|
332 |
\isamarkupfalse%
|
10123
|
333 |
\end{isabellebody}%
|
|
334 |
%%% Local Variables:
|
|
335 |
%%% mode: latex
|
|
336 |
%%% TeX-master: "root"
|
|
337 |
%%% End:
|