9791
|
1 |
(* Title: HOL/BCV/DFA_Framework.thy
|
|
2 |
ID: $Id$
|
|
3 |
Author: Tobias Nipkow
|
|
4 |
Copyright 2000 TUM
|
|
5 |
|
|
6 |
The relationship between dataflow analysis and a welltyped-insruction predicate.
|
|
7 |
*)
|
|
8 |
|
|
9 |
DFA_Framework = Listn +
|
|
10 |
|
|
11 |
constdefs
|
|
12 |
|
|
13 |
stable :: 's ord =>
|
|
14 |
(nat => 's => 's)
|
|
15 |
=> (nat => nat list) => 's list => nat => bool
|
|
16 |
"stable r step succs ss p == !q:set(succs p). step p (ss!p) <=_r ss!q"
|
|
17 |
|
|
18 |
stables :: 's ord => (nat => 's => 's)
|
|
19 |
=> (nat => nat list) => 's list => bool
|
|
20 |
"stables r step succs ss == !p<size ss. stable r step succs ss p"
|
|
21 |
|
|
22 |
is_dfa :: 's ord
|
|
23 |
=> ('s list => 's list)
|
|
24 |
=> (nat => 's => 's)
|
|
25 |
=> (nat => nat list)
|
|
26 |
=> nat => 's set => bool
|
|
27 |
"is_dfa r dfa step succs n A == !ss : list n A.
|
|
28 |
dfa ss : list n A & stables r step succs (dfa ss) & ss <=[r] dfa ss &
|
|
29 |
(!ts: list n A. ss <=[r] ts & stables r step succs ts
|
|
30 |
--> dfa ss <=[r] ts)"
|
|
31 |
|
|
32 |
is_bcv :: 's ord => 's => ('s list => nat => bool)
|
|
33 |
=> nat => 's set => ('s list => 's list) => bool
|
|
34 |
"is_bcv r T wti n A bcv == !ss : list n A.
|
|
35 |
(!p<n. (bcv ss)!p ~= T) =
|
|
36 |
(? ts: list n A. ss <=[r] ts & welltyping T wti ts)"
|
|
37 |
|
|
38 |
wti_is_stable_topless ::
|
|
39 |
's ord => 's
|
|
40 |
=> (nat => 's => 's)
|
|
41 |
=> ('s list => nat => bool)
|
|
42 |
=> (nat => nat list)
|
|
43 |
=> nat => 's set => bool
|
|
44 |
"wti_is_stable_topless r T step wti succs n A == !ss p.
|
|
45 |
ss : list n A & (!p<n. ss!p ~= T) & p < n -->
|
|
46 |
wti ss p = stable r step succs ss p"
|
|
47 |
|
|
48 |
welltyping :: 's => ('s list => nat => bool) => 's list => bool
|
|
49 |
"welltyping T wti ts == !p<size(ts). ts!p ~= T & wti ts p"
|
|
50 |
|
|
51 |
end
|