8011
|
1 |
(* Title: HOL/MicroJava/BV/Convert.thy
|
|
2 |
ID: $Id$
|
|
3 |
Author: Cornelia Pusch
|
|
4 |
Copyright 1999 Technische Universitaet Muenchen
|
|
5 |
|
|
6 |
The supertype relation lifted to type options, type lists and state types.
|
|
7 |
*)
|
|
8 |
|
|
9 |
Convert = JVMExec +
|
|
10 |
|
|
11 |
types
|
|
12 |
locvars_type = ty option list
|
|
13 |
opstack_type = ty list
|
|
14 |
state_type = "opstack_type \\<times> locvars_type"
|
|
15 |
|
|
16 |
constdefs
|
|
17 |
|
|
18 |
sup_ty_opt :: "['code prog,ty option,ty option] \\<Rightarrow> bool" ("_ \\<turnstile>_ >= _")
|
|
19 |
"G \\<turnstile> a >= a' \\<equiv>
|
|
20 |
case a of
|
|
21 |
None \\<Rightarrow> True
|
|
22 |
| Some t \\<Rightarrow> case a' of
|
|
23 |
None \\<Rightarrow> False
|
|
24 |
| Some t' \\<Rightarrow> G \\<turnstile> t' \\<preceq> t"
|
|
25 |
|
|
26 |
sup_loc :: "['code prog,locvars_type,locvars_type] \\<Rightarrow> bool" ("_ \\<turnstile> _ >>= _" [71,71] 70)
|
|
27 |
"G \\<turnstile> LT >>= LT' \\<equiv> (length LT=length LT') \\<and> (\\<forall>(t,t')\\<in>set (zip LT LT'). G \\<turnstile> t >= t')"
|
|
28 |
|
|
29 |
|
|
30 |
sup_state :: "['code prog,state_type,state_type] \\<Rightarrow> bool" ("_ \\<turnstile> _ >>>= _" [71,71] 70)
|
|
31 |
"G \\<turnstile> s >>>= s' \\<equiv> G \\<turnstile> map Some (fst s) >>= map Some (fst s') \\<and> G \\<turnstile> snd s >>= snd s'"
|
|
32 |
|
|
33 |
end
|