src/HOL/MicroJava/JVM/JVMDefensive.thy
author kleing
Tue, 08 Oct 2002 10:49:19 +0200
changeset 13631 23ab136db946
child 13677 5fad004bd9df
permissions -rw-r--r--
defensive machine without obj init and jsr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13631
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     1
(*  Title:      HOL/MicroJava/JVM/JVMDefensive.thy
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     2
    ID:         $Id$
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     3
    Author:     Gerwin Klein
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     4
    Copyright   GPL
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     5
*)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     6
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     7
header {* \isaheader{A Defensive JVM} *}
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     8
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
     9
theory JVMDefensive = JVMExec:
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    10
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    11
text {*
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    12
  Extend the state space by one element indicating a type error (or
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    13
  other abnormal termination) *}
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    14
datatype 'a type_error = TypeError | Normal 'a
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    15
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    16
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    17
syntax "fifth" :: "'a \<times> 'b \<times> 'c \<times> 'd \<times> 'e \<times> 'f \<Rightarrow> 'e"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    18
translations
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    19
  "fifth x" == "fst(snd(snd(snd(snd x))))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    20
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    21
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    22
consts isAddr :: "val \<Rightarrow> bool"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    23
recdef isAddr "{}"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    24
  "isAddr (Addr loc) = True"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    25
  "isAddr v          = False"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    26
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    27
consts isIntg :: "val \<Rightarrow> bool"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    28
recdef isIntg "{}"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    29
  "isIntg (Intg i) = True"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    30
  "isIntg v        = False"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    31
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    32
constdefs
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    33
  isRef :: "val \<Rightarrow> bool"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    34
  "isRef v \<equiv> v = Null \<or> isAddr v"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    35
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    36
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    37
consts
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    38
  check_instr :: "[instr, jvm_prog, aheap, opstack, locvars, 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    39
                  cname, sig, p_count, p_count, frame list] \<Rightarrow> bool"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    40
primrec 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    41
  "check_instr (Load idx) G hp stk vars C sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    42
  (idx < length vars)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    43
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    44
  "check_instr (Store idx) G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    45
  (0 < length stk \<and> idx < length vars)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    46
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    47
  "check_instr (LitPush v) G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    48
  (\<not>isAddr v)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    49
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    50
  "check_instr (New C) G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    51
  is_class G C"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    52
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    53
  "check_instr (Getfield F C) G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    54
  (0 < length stk \<and> is_class G C \<and> field (G,C) F \<noteq> None \<and> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    55
  (let (C', T) = the (field (G,C) F); ref = hd stk in 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    56
    C' = C \<and> isRef ref \<and> (ref \<noteq> Null \<longrightarrow> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    57
      hp (the_Addr ref) \<noteq> None \<and> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    58
      (let (D,vs) = the (hp (the_Addr ref)) in 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    59
        G \<turnstile> D \<preceq>C C \<and> vs (F,C) \<noteq> None \<and> G,hp \<turnstile> the (vs (F,C)) ::\<preceq> T))))" 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    60
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    61
  "check_instr (Putfield F C) G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    62
  (1 < length stk \<and> is_class G C \<and> field (G,C) F \<noteq> None \<and> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    63
  (let (C', T) = the (field (G,C) F); v = hd stk; ref = hd (tl stk) in 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    64
    C' = C \<and> isRef ref \<and> (ref \<noteq> Null \<longrightarrow> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    65
      hp (the_Addr ref) \<noteq> None \<and> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    66
      (let (D,vs) = the (hp (the_Addr ref)) in 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    67
        G \<turnstile> D \<preceq>C C \<and> G,hp \<turnstile> v ::\<preceq> T))))" 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    68
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    69
  "check_instr (Checkcast C) G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    70
  (0 < length stk \<and> is_class G C \<and> isRef (hd stk))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    71
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    72
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    73
  "check_instr (Invoke C mn ps) G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    74
  (length ps < length stk \<and> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    75
  (let n = length ps; v = stk!n in
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    76
  isRef v \<and> (v \<noteq> Null \<longrightarrow> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    77
    hp (the_Addr v) \<noteq> None \<and>
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    78
    method (G,cname_of hp v) (mn,ps) \<noteq> None \<and>
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    79
    list_all2 (\<lambda>v T. G,hp \<turnstile> v ::\<preceq> T) (rev (take n stk)) ps)))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    80
  
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    81
  "check_instr Return G hp stk0 vars Cl sig0 pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    82
  (0 < length stk0 \<and> (0 < length frs \<longrightarrow> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    83
    method (G,Cl) sig0 \<noteq> None \<and>    
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    84
    (let v = hd stk0;  (C, rT, body) = the (method (G,Cl) sig0) in
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    85
    Cl = C \<and> G,hp \<turnstile> v ::\<preceq> rT)))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    86
 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    87
  "check_instr Pop G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    88
  (0 < length stk)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    89
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    90
  "check_instr Dup G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    91
  (0 < length stk)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    92
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    93
  "check_instr Dup_x1 G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    94
  (1 < length stk)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    95
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    96
  "check_instr Dup_x2 G hp stk vars Cl sig pc maxpc frs = 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    97
  (2 < length stk)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    98
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
    99
  "check_instr Swap G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   100
  (1 < length stk)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   101
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   102
  "check_instr IAdd G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   103
  (1 < length stk \<and> isIntg (hd stk) \<and> isIntg (hd (tl stk)))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   104
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   105
  "check_instr (Ifcmpeq b) G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   106
  (1 < length stk \<and> 0 \<le> int pc+b \<and> nat(int pc+b) < maxpc)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   107
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   108
  "check_instr (Goto b) G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   109
  (0 \<le> int pc+b \<and> nat(int pc+b) < maxpc)"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   110
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   111
  "check_instr Throw G hp stk vars Cl sig pc maxpc frs =
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   112
  (0 < length stk \<and> isRef (hd stk))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   113
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   114
constdefs
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   115
  check :: "jvm_prog \<Rightarrow> jvm_state \<Rightarrow> bool"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   116
  "check G s \<equiv> let (xcpt, hp, frs) = s in
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   117
               (case frs of [] \<Rightarrow> True | (stk,loc,C,sig,pc)#frs' \<Rightarrow> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   118
                (let ins = fifth (the (method (G,C) sig)); i = ins!pc in
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   119
                 check_instr i G hp stk loc C sig pc (length ins) frs'))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   120
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   121
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   122
  exec_d :: "jvm_prog \<Rightarrow> jvm_state type_error \<Rightarrow> jvm_state option type_error"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   123
  "exec_d G s \<equiv> case s of 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   124
      TypeError \<Rightarrow> TypeError 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   125
    | Normal s' \<Rightarrow> if check G s' then Normal (exec (G, s')) else TypeError"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   126
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   127
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   128
consts
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   129
  "exec_all_d" :: "jvm_prog \<Rightarrow> jvm_state type_error \<Rightarrow> jvm_state type_error \<Rightarrow> bool" 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   130
                   ("_ |- _ -jvmd-> _" [61,61,61]60)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   131
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   132
syntax (xsymbols)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   133
  "exec_all_d" :: "jvm_prog \<Rightarrow> jvm_state type_error \<Rightarrow> jvm_state type_error \<Rightarrow> bool" 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   134
                   ("_ \<turnstile> _ -jvmd\<rightarrow> _" [61,61,61]60)  
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   135
 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   136
defs
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   137
  exec_all_d_def:
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   138
  "G \<turnstile> s -jvmd\<rightarrow> t \<equiv>
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   139
         (s,t) \<in> ({(s,t). exec_d G s = TypeError \<and> t = TypeError} \<union> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   140
                  {(s,t). \<exists>t'. exec_d G s = Normal (Some t') \<and> t = Normal t'})\<^sup>*"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   141
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   142
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   143
declare split_paired_All [simp del]
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   144
declare split_paired_Ex [simp del]
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   145
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   146
lemma [dest!]:
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   147
  "(if P then A else B) \<noteq> B \<Longrightarrow> P"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   148
  by (cases P, auto)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   149
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   150
lemma exec_d_no_errorI [intro]:
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   151
  "check G s \<Longrightarrow> exec_d G (Normal s) \<noteq> TypeError"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   152
  by (unfold exec_d_def) simp
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   153
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   154
theorem no_type_error_commutes:
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   155
  "exec_d G (Normal s) \<noteq> TypeError \<Longrightarrow> 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   156
  exec_d G (Normal s) = Normal (exec (G, s))"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   157
  by (unfold exec_d_def, auto)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   158
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   159
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   160
lemma defensive_imp_aggressive:
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   161
  "G \<turnstile> (Normal s) -jvmd\<rightarrow> (Normal t) \<Longrightarrow> G \<turnstile> s -jvm\<rightarrow> t"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   162
proof -
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   163
  have "\<And>x y. G \<turnstile> x -jvmd\<rightarrow> y \<Longrightarrow> \<forall>s t. x = Normal s \<longrightarrow> y = Normal t \<longrightarrow>  G \<turnstile> s -jvm\<rightarrow> t"
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   164
    apply (unfold exec_all_d_def)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   165
    apply (erule rtrancl_induct)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   166
     apply (simp add: exec_all_def)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   167
    apply (fold exec_all_d_def)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   168
    apply simp
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   169
    apply (intro allI impI)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   170
    apply (erule disjE, simp)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   171
    apply (elim exE conjE)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   172
    apply (erule allE, erule impE, assumption)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   173
    apply (simp add: exec_all_def exec_d_def split: type_error.splits split_if_asm)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   174
    apply (rule rtrancl_trans, assumption)
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   175
    apply blast
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   176
    done
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   177
  moreover
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   178
  assume "G \<turnstile> (Normal s) -jvmd\<rightarrow> (Normal t)" 
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   179
  ultimately
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   180
  show "G \<turnstile> s -jvm\<rightarrow> t" by blast
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   181
qed
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   182
23ab136db946 defensive machine without obj init and jsr
kleing
parents:
diff changeset
   183
end