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