equal
deleted
inserted
replaced
|
1 (* Title: HOL/BCV/DFAandWTI.thy |
|
2 ID: $Id$ |
|
3 Author: Tobias Nipkow |
|
4 Copyright 1999 TUM |
|
5 |
|
6 The relationship between dataflow analysis and a welltyped-insruction predicate. |
|
7 *) |
|
8 |
|
9 DFAandWTI = SemiLattice + |
|
10 |
|
11 types 's os = 's option list |
|
12 |
|
13 constdefs |
|
14 |
|
15 stable :: (nat => 's => 's option) => (nat => nat list) => nat => 's os => bool |
|
16 "stable step succs p sos == |
|
17 !s. sos!p = Some s --> (? t. step p s = Some(t) & |
|
18 (!q:set(succs p). Some t <= sos!q))" |
|
19 |
|
20 wti_is_fix_step :: |
|
21 "(nat => 's => 's option) |
|
22 => (nat => 's os => bool) |
|
23 => (nat => nat list) |
|
24 => nat => 's set => bool" |
|
25 "wti_is_fix_step step wti succs n L == !sos p. |
|
26 sos : listsn n (option L) & p < n --> |
|
27 wti p sos = stable step succs p sos" |
|
28 |
|
29 welltyping :: (nat => 's os => bool) => 's os => bool |
|
30 "welltyping wti tos == !p<size(tos). wti p tos" |
|
31 |
|
32 is_dfa :: ('s os => bool) |
|
33 => (nat => 's => 's option) |
|
34 => (nat => nat list) |
|
35 => nat => 's set => bool |
|
36 "is_dfa dfa step succs n L == !sos : listsn n (option L). |
|
37 dfa sos = |
|
38 (? tos : listsn n (option L). |
|
39 sos <= tos & (!p < n. stable step succs p tos))" |
|
40 |
|
41 end |