1 | (**************************************************************************) |
---|
2 | (* ___ *) |
---|
3 | (* ||M|| *) |
---|
4 | (* ||A|| A project by Andrea Asperti *) |
---|
5 | (* ||T|| *) |
---|
6 | (* ||I|| Developers: *) |
---|
7 | (* ||T|| The HELM team. *) |
---|
8 | (* ||A|| http://helm.cs.unibo.it *) |
---|
9 | (* \ / *) |
---|
10 | (* \ / This file is distributed under the terms of the *) |
---|
11 | (* v GNU General Public License Version 2 *) |
---|
12 | (* *) |
---|
13 | (**************************************************************************) |
---|
14 | |
---|
15 | include "basics/types.ma". |
---|
16 | include "basics/deqsets.ma". |
---|
17 | include "Traces.ma". |
---|
18 | |
---|
19 | record concrete_transition_sys (p : label_params) : Type[2] ≝ |
---|
20 | { trans_sys :> abstract_status p |
---|
21 | }. |
---|
22 | |
---|
23 | record abstract_transition_sys : Type[1] ≝ |
---|
24 | { abs_state_t :> Type[0] |
---|
25 | ; abs_instr : monoid |
---|
26 | ; act_abs : monoid_action abs_instr abs_state_t |
---|
27 | }. |
---|
28 | |
---|
29 | notation "〚 term 19 C 〛 term 90 A" with precedence 10 for @{ 'sem $C $A }. |
---|
30 | interpretation "act_abs" 'sem f x = (act ?? (act_abs ?) f x). |
---|
31 | |
---|
32 | record galois_rel (p : label_params) |
---|
33 | (C : concrete_transition_sys p) |
---|
34 | (A : abstract_transition_sys) : Type[0] ≝ |
---|
35 | { rel_galois :2> C → A → Prop |
---|
36 | }. |
---|
37 | |
---|
38 | record galois_connection (p : label_params) : Type[2] ≝ |
---|
39 | { concr : concrete_transition_sys p |
---|
40 | ; abs_d : abstract_transition_sys |
---|
41 | ; galois_rel:> galois_rel p concr abs_d |
---|
42 | }. |
---|
43 | |
---|
44 | record abstract_interpretation (p : label_params) : Type[2] ≝ |
---|
45 | { galois_conn:> galois_connection p |
---|
46 | ; instr_t : Type[0] |
---|
47 | ; fetch : concr … galois_conn → option instr_t |
---|
48 | ; instr_map : instr_t → abs_instr … (abs_d … galois_conn) |
---|
49 | ; instr_map_ok : |
---|
50 | ∀s,s': concr … galois_conn. ∀a: abs_d … galois_conn.∀l,i. |
---|
51 | as_execute … l s s' → |
---|
52 | fetch … s = Some ? i → |
---|
53 | ∀I. instr_map … i = I → |
---|
54 | galois_conn s a → galois_conn s' (〚I〛 a) |
---|
55 | }. |
---|