src/HOL/MicroJava/BV/JVMType.thy
changeset 61994 133a8a888ae8
parent 61952 546958347e05
child 62042 6c6ccf573479
equal deleted inserted replaced
61993:89206877f0ee 61994:133a8a888ae8
    36 
    36 
    37 definition  sup :: "'c prog \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> state binop" where
    37 definition  sup :: "'c prog \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> state binop" where
    38   "sup S maxs maxr == snd(snd(sl S maxs maxr))"
    38   "sup S maxs maxr == snd(snd(sl S maxs maxr))"
    39 
    39 
    40 definition sup_ty_opt :: "['code prog,ty err,ty err] \<Rightarrow> bool"
    40 definition sup_ty_opt :: "['code prog,ty err,ty err] \<Rightarrow> bool"
    41                  ("_ |- _ <=o _" [71,71] 70) where 
    41                  ("_ \<turnstile> _ <=o _" [71,71] 70) where 
    42   "sup_ty_opt G == Err.le (subtype G)"
    42   "sup_ty_opt G == Err.le (subtype G)"
    43 
    43 
    44 definition sup_loc :: "['code prog,locvars_type,locvars_type] \<Rightarrow> bool" 
    44 definition sup_loc :: "['code prog,locvars_type,locvars_type] \<Rightarrow> bool" 
    45               ("_ |- _ <=l _"  [71,71] 70) where
    45               ("_ \<turnstile> _ <=l _"  [71,71] 70) where
    46   "sup_loc G == Listn.le (sup_ty_opt G)"
    46   "sup_loc G == Listn.le (sup_ty_opt G)"
    47 
    47 
    48 definition sup_state :: "['code prog,state_type,state_type] \<Rightarrow> bool"   
    48 definition sup_state :: "['code prog,state_type,state_type] \<Rightarrow> bool"   
    49                ("_ |- _ <=s _"  [71,71] 70) where
    49                ("_ \<turnstile> _ <=s _"  [71,71] 70) where
    50   "sup_state G == Product.le (Listn.le (subtype G)) (sup_loc G)"
    50   "sup_state G == Product.le (Listn.le (subtype G)) (sup_loc G)"
    51 
    51 
    52 definition sup_state_opt :: "['code prog,state_type option,state_type option] \<Rightarrow> bool" 
    52 definition sup_state_opt :: "['code prog,state_type option,state_type option] \<Rightarrow> bool" 
    53                    ("_ |- _ <=' _"  [71,71] 70) where
    53                    ("_ \<turnstile> _ <=' _"  [71,71] 70) where
    54   "sup_state_opt G == Opt.le (sup_state G)"
    54   "sup_state_opt G == Opt.le (sup_state G)"
    55 
    55 
    56 
       
    57 notation (xsymbols)
       
    58   sup_ty_opt  ("_ \<turnstile> _ <=o _" [71,71] 70) and
       
    59   sup_loc  ("_ \<turnstile> _ <=l _" [71,71] 70) and
       
    60   sup_state  ("_ \<turnstile> _ <=s _" [71,71] 70) and
       
    61   sup_state_opt  ("_ \<turnstile> _ <=' _" [71,71] 70)
       
    62                    
       
    63 
    56 
    64 lemma JVM_states_unfold: 
    57 lemma JVM_states_unfold: 
    65   "states S maxs maxr == err(opt((\<Union>{list n (types S) |n. n <= maxs}) \<times>
    58   "states S maxs maxr == err(opt((\<Union>{list n (types S) |n. n <= maxs}) \<times>
    66                                   list maxr (err(types S))))"
    59                                   list maxr (err(types S))))"
    67   apply (unfold states_def sl_def Opt.esl_def Err.sl_def
    60   apply (unfold states_def sl_def Opt.esl_def Err.sl_def