author | paulson |
Fri, 31 Jul 1998 18:46:55 +0200 | |
changeset 5232 | e5a7cdd07ea5 |
parent 5071 | 548f398d770b |
child 5240 | bbcd79ef7cf2 |
permissions | -rw-r--r-- |
4776 | 1 |
(* Title: HOL/UNITY/Reach.thy |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1998 University of Cambridge |
|
5 |
||
6 |
Reachability in Directed Graphs. From Chandy and Misra, section 6.4. |
|
7 |
*) |
|
8 |
||
5232 | 9 |
Reach = FP + Traces + SubstAx + |
4776 | 10 |
|
11 |
types vertex |
|
12 |
state = "vertex=>bool" |
|
13 |
||
14 |
arities vertex :: term |
|
15 |
||
16 |
consts |
|
17 |
init :: "vertex" |
|
18 |
||
19 |
edges :: "(vertex*vertex) set" |
|
20 |
||
21 |
constdefs |
|
22 |
||
23 |
asgt :: "[vertex,vertex] => (state*state) set" |
|
5071
548f398d770b
Consequences of the change from [ := ] to ( := ) in theory Update.
nipkow
parents:
4896
diff
changeset
|
24 |
"asgt u v == {(s,s'). s' = s(v:= s u | s v)}" |
4776 | 25 |
|
26 |
racts :: "(state*state) set set" |
|
27 |
"racts == insert id (UN (u,v): edges. {asgt u v})" |
|
28 |
||
29 |
rinit :: "state set" |
|
30 |
"rinit == {%v. v=init}" |
|
31 |
||
32 |
invariant :: state set |
|
33 |
"invariant == {s. (ALL v. s v --> (init, v) : edges^*) & s init}" |
|
34 |
||
35 |
fixedpoint :: state set |
|
36 |
"fixedpoint == {s. ALL (u,v): edges. s u --> s v}" |
|
37 |
||
38 |
metric :: state => nat |
|
39 |
"metric == (%s. card {v. ~ s v})" |
|
40 |
||
41 |
rules |
|
42 |
||
43 |
(*We assume that the set of vertices is finite*) |
|
44 |
finite_graph "finite (UNIV :: vertex set)" |
|
45 |
||
46 |
end |