| author | berghofe | 
| Sat, 30 Jan 2010 17:03:46 +0100 | |
| changeset 34990 | 81e8fdfeb849 | 
| parent 33954 | 1bc3b688548c | 
| child 35416 | d8d7d1b785af | 
| permissions | -rwxr-xr-x | 
| 
33954
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
1  | 
(* Title: HOL/MicroJava/BV/Typing_Framework.thy  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
2  | 
Author: Tobias Nipkow  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
3  | 
Copyright 2000 TUM  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
4  | 
*)  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
5  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
6  | 
header {* \isaheader{Typing and Dataflow Analysis Framework} *}
 | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
7  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
8  | 
theory Typing_Framework  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
9  | 
imports Listn  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
10  | 
begin  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
11  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
12  | 
text {* 
 | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
13  | 
The relationship between dataflow analysis and a welltyped-instruction predicate.  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
14  | 
*}  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
15  | 
types  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
16  | 
's step_type = "nat \<Rightarrow> 's \<Rightarrow> (nat \<times> 's) list"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
17  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
18  | 
constdefs  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
19  | 
stable :: "'s ord \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> nat \<Rightarrow> bool"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
20  | 
"stable r step ss p == !(q,s'):set(step p (ss!p)). s' <=_r ss!q"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
21  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
22  | 
stables :: "'s ord \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> bool"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
23  | 
"stables r step ss == !p<size ss. stable r step ss p"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
24  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
25  | 
wt_step ::  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
26  | 
"'s ord \<Rightarrow> 's \<Rightarrow> 's step_type \<Rightarrow> 's list \<Rightarrow> bool"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
27  | 
"wt_step r T step ts ==  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
28  | 
!p<size(ts). ts!p ~= T & stable r step ts p"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
29  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
30  | 
is_bcv :: "'s ord \<Rightarrow> 's \<Rightarrow> 's step_type  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
31  | 
           \<Rightarrow> nat \<Rightarrow> 's set \<Rightarrow> ('s list \<Rightarrow> 's list) \<Rightarrow> bool"  
 | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
32  | 
"is_bcv r T step n A bcv == !ss : list n A.  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
33  | 
(!p<n. (bcv ss)!p ~= T) =  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
34  | 
(? ts: list n A. ss <=[r] ts & wt_step r T step ts)"  | 
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
35  | 
|
| 
 
1bc3b688548c
backported parts of abstract byte code verifier from AFP/Jinja
 
haftmann 
parents:  
diff
changeset
 | 
36  | 
end  |