section‹The Typing Framework for the JVM \label{sec:JVM}›
theory TF_JVM imports "../DFA/Typing_Framework_err"
EffectMono
BVSpec "../Common/ExternalCallWF" begin
definition exec :: "'addr jvm_prog ==> nat ==> ty ==> ex_table ==> 'addr instr list==> tyi' err step_type" where "exec G maxs rT et bs ≡ err_step (size bs) (λpc. app (bs!pc) G maxs rT pc (size bs) et) (λpc. eff (bs!pc) G pc et)"
locale JVM_sl = fixes P :: "'addr jvm_prog"and mxs and mxl0 fixes Ts :: "ty list"and"is" :: "'addr instr list"and xt and Tr
fixes mxl and A and r and f and app and eff and step defines [simp]: "mxl ≡ 1+size Ts+mxl0" defines [simp]: "A ≡ states P mxs mxl" defines [simp]: "r ≡ JVM_SemiType.le P mxs mxl" defines [simp]: "f ≡ JVM_SemiType.sup P mxs mxl"
defines [simp]: "app ≡ λpc. Effect.app (is!pc) P mxs Tr pc (size is) xt" defines [simp]: "eff ≡ λpc. Effect.eff (is!pc) P pc xt" defines [simp]: "step ≡ err_step (size is) app eff"
locale start_context = JVM_sl + fixes p and C assumes wf: "wf_prog p P" assumes C: "is_class P C" assumes Ts: "set Ts ⊆ types P"
fixes first :: tyi' and start defines [simp]: "first ≡ Some ([],OK (Class C) # map OK Ts @ replicate mxl0 Err)" defines [simp]: "start ≡ OK first # replicate (size is - 1) (OK None)"
subsection‹Connecting JVM and Framework›
lemma (in JVM_sl) step_def_exec: "step ≡ exec P mxs Tr xt is" by (simp add: exec_def)
lemma special_ex_swap_lemma [iff]: "(∃X. (∃n. X = A n ∧ P n) ∧ Q X) = (∃n. Q(A n) ∧ P n)" by blast
lemma ex_in_list [iff]: "(∃n. ST ∈ list n A ∧ n ≤ mxs) = (set ST ⊆ A ∧ size ST ≤ mxs)" by (unfold list_def) auto
lemma singleton_list: "(∃n. [Class C] ∈ list n (types P) ∧ n ≤ mxs) = (is_class P C ∧ 0 < mxs)" by(auto)
lemma set_drop_subset: "set xs ⊆ A ==> set (drop n xs) ⊆ A" by (auto dest: in_set_dropD)
lemma (in start_context) first_in_A [iff]: "OK first ∈ A" using Ts C by (force intro!: list_appendI simp add: JVM_states_unfold)
lemma (in JVM_sl) wt_method_def2: "wt_method P C' Ts Tr mxs mxl0 is xt τs = (is ≠ [] ∧ size τs = size is ∧ OK ` set τs ⊆ states P mxs mxl ∧ wt_start P C' Ts mxl0 τs ∧ wt_app_eff (sup_state_opt P) app eff τs)" (*<*) apply (unfold wt_method_def wt_app_eff_def wt_instr_def lesub_def check_types_def) apply auto done (*>*)
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.