equal
deleted
inserted
replaced
6 |
6 |
7 subsection "Computable Abstract Interpretation" |
7 subsection "Computable Abstract Interpretation" |
8 |
8 |
9 text{* Abstract interpretation over type @{text st} instead of functions. *} |
9 text{* Abstract interpretation over type @{text st} instead of functions. *} |
10 |
10 |
11 context Gamma |
11 context Gamma_semilattice |
12 begin |
12 begin |
13 |
13 |
14 fun aval' :: "aexp \<Rightarrow> 'av st \<Rightarrow> 'av" where |
14 fun aval' :: "aexp \<Rightarrow> 'av st \<Rightarrow> 'av" where |
15 "aval' (N i) S = num' i" | |
15 "aval' (N i) S = num' i" | |
16 "aval' (V x) S = fun S x" | |
16 "aval' (V x) S = fun S x" | |
30 by(simp add: \<gamma>_st_def) |
30 by(simp add: \<gamma>_st_def) |
31 |
31 |
32 end |
32 end |
33 |
33 |
34 |
34 |
35 locale Abs_Int = Gamma where \<gamma>=\<gamma> |
35 locale Abs_Int = Gamma_semilattice where \<gamma>=\<gamma> |
36 for \<gamma> :: "'av::semilattice_sup_top \<Rightarrow> val set" |
36 for \<gamma> :: "'av::semilattice_sup_top \<Rightarrow> val set" |
37 begin |
37 begin |
38 |
38 |
39 definition "step' = Step |
39 definition "step' = Step |
40 (\<lambda>x e S. case S of None \<Rightarrow> None | Some S \<Rightarrow> Some(update S x (aval' e S))) |
40 (\<lambda>x e S. case S of None \<Rightarrow> None | Some S \<Rightarrow> Some(update S x (aval' e S))) |