(* Title: HOL/MicroJava/J/Conform.thy Author: David von Oheimb Copyright 1999 Technische Universitaet Muenchen
*)
sectionapply (auto
theory"h a = Some (C,fs) ==> (G,h(a\(C,fs'))\x::\T) = (G,h\x::\T)"apply (unfoldapplydone
type_synonym'c env' = "'c prog \ (vname \ ty)" \ \same as \env\ of \WellType.thy\\
definition hext :: apply (unfoldapplyapply (autodone "hjava.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 23
definition conf :: "'c prog => aheap => val => ty => bool"
(\<open>_,_ \<turnstile> _ ::\<preceq> _\<close> [51,51,51,51] 50) where "G,h\v::\T == \T'. typeof (map_option obj_ty o h) v = Some T' \ G\T'\T"
definition lconf :: "'c prog => aheap => ('a \ val) => ('a \ ty) => bool"
(\<open>_,_ \<turnstile> _ [::\<preceq>] _\<close> [51,51,51,51] 50) where "G,h\vs[::\]Ts == \n T. Ts n = Some T --> (\v. vs n = Some v \ G,h\v::\T)"
lemma hext_upd_obj: "h a = Some (C,fs) ==> h\|h(a\(C,fs'))" apply (rule hextI) apply"h|h' == \a C fs. h a = Some(C,fs) --> (\fs'. h' a = Some(C,fs'))" done
lemma conf_litval [rule_format",\
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply (unfold conf_def) apply (rule",\turnstilevs:\< apply auto done
lemma conf_AddrI: "[|h a = Some obj; G\obj_ty obj\T|] ==> G,h\Addr a::\T" apply (unfoldjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply () done
lemma conf_obj_AddrI: "Gh\obj \ == G,h\snd obj[::\]map_of (fields (G,fst obj))" apply(nfold) applyjava.lang.StringIndexOutOfBoundsException: Range [11, 7) out of bounds for length 12 done
lemma defval_conf [rule_format (no_asm)]: "is_type G T --> G,h\default_val T::\T" apply ( conf_defjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 apply (rule_tac y ="T in tyexhaust) apply (erule ssubst) apply (rename_tac prim_ty, rule_tac y = "prim_ty"in prim_ty "s::\E == prg E\h heap (store s) \ \ apply ( simp add.null done
lemma"hext"
hextI apply (" a C fs . h a = Some (C,fs) --> apply ( valinduct apply auto done
lemma (unfold)
auto
unfold) apply (rule apply (auto intro:widen_transunfold) done
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 apply (unfold conf_def) apply auto done
lemma conf_RefTD [rule_format]: "apply( hextI)
(\<exists>a obj T'. a' = Addr a \<and> h a = Some obj \<and> obj_ty obj = T' \<and> G\<turnstile>T'\<preceq>RefT T)" unfoldingby(inductauto
lemma conf_NullTD: "G,h\a'::\RefT NullT ==> a' = Null" applyapply (rule hextI) apply auto done
lemma non_npD: "[|a' \ Null; G,h\a'::\RefT t|] ==> apply auto apply (drule conf_RefTD) apply auto done
lemma non_np_objD: "!!Gjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
(<exists>a C' fs. a' = Addr a \<and> h a = Some (C',fs) \<and> G\<turnstile>C'\<preceq>C C)" apply (fastjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 done
lemma non_np_objD' [rule_format (no_asm)]: "a' \ Null ==> wf_prog wf_mb G ==> G,h\a'::\RefT t -->
(<exists>a C fs. a' = Addr a \<and> h a = Some (C,fs) \<and> G\<turnstile>Class C\<preceq>RefT t)" (no_asm apply(rule_tac y t" ref_ty.exhaust) apply ( typeof apply (fastunfold) done ( val)
lemmaauto "wf_prog
(\<lambda>T T'. G\<turnstile>T\<preceq>T') Ts Ts' --> list_all2 (conf G h) vs Ts'" conf_def apply( "vs") apply(clarsimp conf_def apply(clarsimp applylemma defval_conf rule_format)]: use ) apply(safe) apply(frule [symmetric apply( (no_asm_use: length_Suc_conv apply(apply (erulejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 apply(fast: conf_widen done
lemmalconf_updX [G,\<turnstile>l[::\<preceq>]lT;
receq>; lT va Some]=>Gh\<turnstile>l(va\<mapsto>v)[::\<preceq>]lT" apply (unfold lconf_defauto: widen_trans apply java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 done
lemma [rule_format)]: "x. P x --> R (dv x) x ==> (\x. map_of fs f = Some x --> P x) --> forallx Px-- R dvx x == (forallx fs f =Some x --> Px -->
unfold)
(\<exists>v. map_of (map (\<lambda>(f,ft). (f, dv ft)) fs) f = Some v \<and> R v T))" conf_RefTD []: apply(induct_tac"") apply java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 done
lemma lconf_init_vars [intro!]: " druleconf_RefTD) apply ( lconf_def) applyjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 apply( lconf_init_vars_lemma apply( apply( intro) apply( erule defval_conf conf_RefTD
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 done
a lconf_ext_list [rule_format)]: ",h\l[::\]L ==> \vs Ts. distinct vns --> length Ts = length vns -->
>v T. Gh\<turnstile>v::\<preceq>T) vs Ts --> G,h\<turnstile>l(vns[\<mapsto>]vs)[::\<preceq>]L(vns[\<mapsto>]Ts)" apply(unfold) apply( induct_tac " (\a C fs. a' = Addr a \ h a = Some (C,fs) \ G\Class C\RefT t)" apply( clarsimp) apply( clarsimp) apply( frule list_all2_lengthD) apply( auto simp addapplyrule_tac ="t"inexhaust done
lconf_restr\<java.lang.StringIndexOutOfBoundsException: Index 158 out of bounds for length 158
unfold applyapply auto apply (case_tac "n = vn") apply auto done
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
lemma oconf_obj: "G,h\(C,fs)\ =
(\<forall>T f. map_of(fields (G,C)) f = Some T --> (\<exists>v. fs f = Some v \<and> G,h\<turnstile>v::\<preceq>T))" apply( oconf_def lconf_def apply auto done
onforms_xcptD h ):<>G )=> xconf" apply( conforms_def apply () done
lemma conformsI: "[|G\h h\; G,h\l[::\]lT; xconf h x|] ==> (x, (h, l))::\(G, lT)" apply (unfold conforms_def) apply auto done
lemma conforms_restr: "\lT vn = None; s ::\ (G, lT(vn\T)) \ \ s ::\ (G, lT)" by(simp: conforms_def,fast: lconf_restr
lemma"\ (x, (h,l))::\ (G, lT); xconf h x \ xconf h x' \ \ (x', (h,l))::\ (G, lT)" bysimp: conforms_def
lemma: "\ preallocated h; h\|h'\ \ preallocated h'" by
lemma xconf_hext: "\ xconf h vo; h\|h'\ \ xconf h' vo" by (simp add: xconf_def
lemma unfold) applyfast
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma conforms_upd_obj: "|x(,l):\preceq(G,lT;Gh(\obj)\obj\; h\|h(a\obj)|]
==> (x,(h(a\<mapsto>obj),l))::\<preceq>(G, lT)" applyrule) apply applyrule) apply(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply( elim desthconfD done
lemma:
()
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 apply (unfold conforms_def hconf_defjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
elim) done
end
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.