theory BVConform imports BVSpec "../JVM/JVMExec""../Common/Conform" begin
definition confT :: "'c prog ==> heap ==> val ==> ty err ==> bool"
(‹_,_ ⊨ _ :≤\⊤ _› [51,51,51,51] 50) where "P,h ⊨ v :≤\<top> E ≡ case E of Err ==> True | OK T ==> P,h ⊨ v :≤ T"
definition conf_f :: "jvm_prog ==> heap ==> tyi==> bytecode ==> frame ==> bool" where "conf_f P h ≡ λ(ST,LT) is (stk,loc,C,M,pc). P,h ⊨ stk [:≤] ST ∧ P,h ⊨ loc [:≤\<top>] LT ∧ pc < size is"
lemma conf_f_def2: "conf_f P h (ST,LT) is (stk,loc,C,M,pc) ≡ P,h ⊨ stk [:≤] ST ∧ P,h ⊨ loc [:≤\<top>] LT ∧ pc < size is" by (simp add: conf_f_def)
primrec conf_fs :: "[jvm_prog,heap,tyP,mname,nat,ty,frame list] ==> bool" where "conf_fs P h Φ M0 n0 T0 [] = True"
| "conf_fs P h Φ M0 n0 T0 (f#frs) = (let (stk,loc,C,M,pc) = f in (∃ST LT Ts T mxs mxl0 is xt. Φ C M ! pc = Some (ST,LT) ∧ (P ⊨ C sees M:Ts → T = (mxs,mxl0,is,xt) in C) ∧ (∃D Ts' T' m D'. is!pc = (Invoke M0 n0) ∧ ST!n0 = Class D ∧ P ⊨ D sees M0:Ts' → T' = m in D' ∧ P ⊨ T0≤ T') ∧ conf_f P h (ST, LT) is f ∧ conf_fs P h Φ M (size Ts) T frs))"
definition correct_state :: "[jvm_prog,tyP,jvm_state] ==> bool" (‹_,_ ⊨ _ √› [61,0,0] 61) where "correct_state P Φ ≡ λ(xp,h,frs). case xp of None ==> (case frs of [] ==> True | (f#fs) ==> P⊨ h√∧ (let (stk,loc,C,M,pc) = f in ∃Ts T mxs mxl0 is xt τ. (P ⊨ C sees M:Ts→T = (mxs,mxl0,is,xt) in C) ∧ Φ C M ! pc = Some τ ∧ conf_f P h τ is f ∧ conf_fs P h Φ M (size Ts) T fs)) | Some x ==> frs = []"
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.