definition hext :: "aheap => aheap => bool" (‹_ ≤| _› [51,51] 50) where "h≤|h' == ∀a C fs. h a = Some(C,fs) --> (∃fs'. h' a = Some(C,fs'))"
definition conf :: "'c prog => aheap => val => ty => bool"
(‹_,_ ⊨ _ ::⪯ _› [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"
(‹_,_ ⊨ _ [::⪯] _› [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 new_locD: "[|h a = None; G,h⊨Addr t::⪯T|] ==> t≠a" apply (unfold conf_def) apply auto done
lemma conf_RefTD [rule_format]: "G,h⊨a'::⪯RefT T ==> a' = Null ∨ (∃a obj T'. a' = Addr a ∧ h a = Some obj ∧ obj_ty obj = T' ∧ G⊨T'⪯RefT T)" unfolding conf_def by (induct a') auto
lemma conf_NullTD: "G,h⊨a'::⪯RefT NullT ==> a' = Null" apply (drule conf_RefTD) apply auto done
lemma non_npD: "[|a' ≠ Null; G,h⊨a'::⪯RefT t|] ==> ∃a C fs. a' = Addr a ∧ h a = Some (C,fs) ∧ G⊨Class C⪯RefT t" apply (drule conf_RefTD) apply auto done
lemma non_np_objD: "!!G. [|a' ≠ Null; G,h⊨a'::⪯ Class C|] ==> (∃a C' fs. a' = Addr a ∧ h a = Some (C',fs) ∧ G⊨C'⪯C C)" apply (fast dest: non_npD) done
lemma non_np_objD' [rule_format (no_asm)]: "a' ≠ Null ==> wf_prog wf_mb G ==> G,h⊨a'::⪯RefT t --> (∃a C fs. a' = Addr a ∧ h a = Some (C,fs) ∧ G⊨Class C⪯RefT t)" apply(rule_tac y = "t"in ref_ty.exhaust) apply (fast dest: conf_NullTD) apply (fast dest: non_np_objD) done
lemma lconf_upd: "!!X. [| G,h⊨l[::⪯]lT; G,h⊨v::⪯T; lT va = Some T |] ==> G,h⊨l(va↦v)[::⪯]lT" apply (unfold lconf_def) apply auto done
lemma lconf_init_vars_lemma [rule_format (no_asm)]: "∀x. P x --> R (dv x) x ==> (∀x. map_of fs f = Some x --> P x) --> (∀T. map_of fs f = Some T --> (∃v. map_of (map (λ(f,ft). (f, dv ft)) fs) f = Some v ∧ R v T))" apply( induct_tac "fs") apply auto done
lemma lconf_init_vars [intro!]: "∀n. ∀T. map_of fs n = Some T --> is_type G T ==> G,h⊨init_vars fs[::⪯]map_of fs" apply (unfold lconf_def init_vars_def) apply auto apply( rule lconf_init_vars_lemma) apply( erule_tac [3] asm_rl) apply( intro strip) apply( erule defval_conf) apply auto done
lemma oconf_obj: "G,h⊨(C,fs)√ = (∀T f. map_of(fields (G,C)) f = Some T --> (∃v. fs f = Some v ∧ G,h⊨v::⪯T))" apply (unfold oconf_def lconf_def) apply auto done
lemmas oconf_objD = oconf_obj [THEN iffD1, THEN spec, THEN spec, THEN mp]
subsection"hconf"
lemma hconfD: "[|G⊨h h√; h a = Some obj|] ==> G,h⊨obj√" apply (unfold hconf_def) apply (fast) done
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 und die Messung sind noch experimentell.