42 by Auto_tac ; |
42 by Auto_tac ; |
43 by( ALLGOALS (rtac conf_AddrI)); |
43 by( ALLGOALS (rtac conf_AddrI)); |
44 by Auto_tac; |
44 by Auto_tac; |
45 qed "Cast_conf"; |
45 qed "Cast_conf"; |
46 |
46 |
47 Goal "\\<lbrakk> wf_prog wtm G; cfield (G,C) fn = Some (fd, ft); (h,l)\\<Colon>\\<preceq>(G,lT); \ |
47 Goal "\\<lbrakk> wf_prog wtm G; field (G,C) fn = Some (fd, ft); (h,l)\\<Colon>\\<preceq>(G,lT); \ |
48 \ x' = None \\<longrightarrow> G,h\\<turnstile>a'\\<Colon>\\<preceq>Class C; np a' x' = None \\<rbrakk> \\<Longrightarrow> \ |
48 \ x' = None \\<longrightarrow> G,h\\<turnstile>a'\\<Colon>\\<preceq>Class C; np a' x' = None \\<rbrakk> \\<Longrightarrow> \ |
49 \ G,h\\<turnstile>the (snd (the (h (the_Addr a'))) (fn, fd))\\<Colon>\\<preceq>ft"; |
49 \ G,h\\<turnstile>the (snd (the (h (the_Addr a'))) (fn, fd))\\<Colon>\\<preceq>ft"; |
50 by( dtac np_NoneD 1); |
50 by( dtac np_NoneD 1); |
51 by( etac conjE 1); |
51 by( etac conjE 1); |
52 by( mp_tac 1); |
52 by( mp_tac 1); |
64 |
64 |
65 Goal |
65 Goal |
66 "\\<lbrakk> wf_prog wtm G; a = the_Addr a'; (c, fs) = the (h a); \ |
66 "\\<lbrakk> wf_prog wtm G; a = the_Addr a'; (c, fs) = the (h a); \ |
67 \ (G, lT)\\<turnstile>v\\<Colon>T'; G\\<turnstile>T'\\<preceq>ft; \ |
67 \ (G, lT)\\<turnstile>v\\<Colon>T'; G\\<turnstile>T'\\<preceq>ft; \ |
68 \ (G, lT)\\<turnstile>aa\\<Colon>Class C; \ |
68 \ (G, lT)\\<turnstile>aa\\<Colon>Class C; \ |
69 \ cfield (G,C) fn = Some (fd, ft); h''\\<le>|h'; \ |
69 \ field (G,C) fn = Some (fd, ft); h''\\<le>|h'; \ |
70 \ x' = None \\<longrightarrow> G,h'\\<turnstile>a'\\<Colon>\\<preceq>Class C; h'\\<le>|h; \ |
70 \ x' = None \\<longrightarrow> G,h'\\<turnstile>a'\\<Colon>\\<preceq>Class C; h'\\<le>|h; \ |
71 \ (h, l)\\<Colon>\\<preceq>(G, lT); G,h\\<turnstile>x\\<Colon>\\<preceq>T'; np a' x' = None\\<rbrakk> \\<Longrightarrow> \ |
71 \ (h, l)\\<Colon>\\<preceq>(G, lT); G,h\\<turnstile>x\\<Colon>\\<preceq>T'; np a' x' = None\\<rbrakk> \\<Longrightarrow> \ |
72 \ h''\\<le>|h(a\\<mapsto>(c,(fs((fn,fd)\\<mapsto>x)))) \\<and> \ |
72 \ h''\\<le>|h(a\\<mapsto>(c,(fs((fn,fd)\\<mapsto>x)))) \\<and> \ |
73 \ (h(a\\<mapsto>(c,(fs((fn,fd)\\<mapsto>x)))), l)\\<Colon>\\<preceq>(G, lT) \\<and> \ |
73 \ (h(a\\<mapsto>(c,(fs((fn,fd)\\<mapsto>x)))), l)\\<Colon>\\<preceq>(G, lT) \\<and> \ |
74 \ G,h(a\\<mapsto>(c,(fs((fn,fd)\\<mapsto>x))))\\<turnstile>x\\<Colon>\\<preceq>T'"; |
74 \ G,h(a\\<mapsto>(c,(fs((fn,fd)\\<mapsto>x))))\\<turnstile>x\\<Colon>\\<preceq>T'"; |
124 Goalw [wf_java_prog_def] |
124 Goalw [wf_java_prog_def] |
125 "\\<lbrakk> wf_java_prog G; a' \\<noteq> Null; (h, l)\\<Colon>\\<preceq>(G, lT); \ |
125 "\\<lbrakk> wf_java_prog G; a' \\<noteq> Null; (h, l)\\<Colon>\\<preceq>(G, lT); \ |
126 \ max_spec G T (mn,pTsa) = {((mda,rTa),pTs')}; xc\\<le>|xh; xh\\<le>|h; \ |
126 \ max_spec G T (mn,pTsa) = {((mda,rTa),pTs')}; xc\\<le>|xh; xh\\<le>|h; \ |
127 \ list_all2 (conf G h) pvs pTsa;\ |
127 \ list_all2 (conf G h) pvs pTsa;\ |
128 \ (md, rT, pns, lvars, blk, res) = \ |
128 \ (md, rT, pns, lvars, blk, res) = \ |
129 \ the (cmethd (G,fst (the (h (the_Addr a')))) (mn, pTs'));\ |
129 \ the (method (G,fst (the (h (the_Addr a')))) (mn, pTs'));\ |
130 \ \\<forall>lT. (h, init_vars lvars(pns[\\<mapsto>]pvs)(This\\<mapsto>a'))\\<Colon>\\<preceq>(G, lT) \\<longrightarrow> \ |
130 \ \\<forall>lT. (h, init_vars lvars(pns[\\<mapsto>]pvs)(This\\<mapsto>a'))\\<Colon>\\<preceq>(G, lT) \\<longrightarrow> \ |
131 \ (G, lT)\\<turnstile>blk\\<surd> \\<longrightarrow> h\\<le>|xi \\<and> (xi, xl)\\<Colon>\\<preceq>(G, lT); \ |
131 \ (G, lT)\\<turnstile>blk\\<surd> \\<longrightarrow> h\\<le>|xi \\<and> (xi, xl)\\<Colon>\\<preceq>(G, lT); \ |
132 \ \\<forall>lT. (xi, xl)\\<Colon>\\<preceq>(G, lT) \\<longrightarrow> (\\<forall>T. (G, lT)\\<turnstile>res\\<Colon>T \\<longrightarrow> \ |
132 \ \\<forall>lT. (xi, xl)\\<Colon>\\<preceq>(G, lT) \\<longrightarrow> (\\<forall>T. (G, lT)\\<turnstile>res\\<Colon>T \\<longrightarrow> \ |
133 \ xi\\<le>|h' \\<and> (h', xj)\\<Colon>\\<preceq>(G, lT) \\<and> (x' = None \\<longrightarrow> G,h'\\<turnstile>v\\<Colon>\\<preceq>T)); \ |
133 \ xi\\<le>|h' \\<and> (h', xj)\\<Colon>\\<preceq>(G, lT) \\<and> (x' = None \\<longrightarrow> G,h'\\<turnstile>v\\<Colon>\\<preceq>T)); \ |
134 \ G,xh\\<turnstile>a'\\<Colon>\\<preceq>RefT T \\<rbrakk> \\<Longrightarrow> \ |
134 \ G,xh\\<turnstile>a'\\<Colon>\\<preceq>RefT T \\<rbrakk> \\<Longrightarrow> \ |
144 by( Clarsimp_tac 1); |
144 by( Clarsimp_tac 1); |
145 by( EVERY'[forward_tac [hext_objD], atac] 1); |
145 by( EVERY'[forward_tac [hext_objD], atac] 1); |
146 by( Clarsimp_tac 1); |
146 by( Clarsimp_tac 1); |
147 by( EVERY'[dtac Call_lemma, atac, atac] 1); |
147 by( EVERY'[dtac Call_lemma, atac, atac] 1); |
148 by( clarsimp_tac (claset(),simpset() addsimps [wt_java_mdecl_def])1); |
148 by( clarsimp_tac (claset(),simpset() addsimps [wt_java_mdecl_def])1); |
149 by( thin_tac "cmethd ?sig ?x = ?y" 1); |
149 by( thin_tac "method ?sig ?x = ?y" 1); |
150 by( EVERY'[dtac spec, etac impE] 1); |
150 by( EVERY'[dtac spec, etac impE] 1); |
151 by( mp_tac 2); |
151 by( mp_tac 2); |
152 by( rtac conformsI 1); |
152 by( rtac conformsI 1); |
153 by( etac conforms_heapD 1); |
153 by( etac conforms_heapD 1); |
154 by( rtac lconf_ext 1); |
154 by( rtac lconf_ext 1); |
324 by Auto_tac; |
324 by Auto_tac; |
325 qed "exec_type_sound"; |
325 qed "exec_type_sound"; |
326 |
326 |
327 Goal "\\<lbrakk>G=prg E; wf_java_prog G; G\\<turnstile>(x,s) -e\\<succ>a'\\<rightarrow> Norm s'; a' \\<noteq> Null;\ |
327 Goal "\\<lbrakk>G=prg E; wf_java_prog G; G\\<turnstile>(x,s) -e\\<succ>a'\\<rightarrow> Norm s'; a' \\<noteq> Null;\ |
328 \ s\\<Colon>\\<preceq>E; E\\<turnstile>e\\<Colon>RefT T; m_head G T sig \\<noteq> None\\<rbrakk> \\<Longrightarrow> \ |
328 \ s\\<Colon>\\<preceq>E; E\\<turnstile>e\\<Colon>RefT T; m_head G T sig \\<noteq> None\\<rbrakk> \\<Longrightarrow> \ |
329 \ cmethd (G,fst (the (heap s' (the_Addr a')))) sig \\<noteq> None"; |
329 \ method (G,fst (the (heap s' (the_Addr a')))) sig \\<noteq> None"; |
330 by( dtac eval_type_sound 1); |
330 by( dtac eval_type_sound 1); |
331 by( atac 1); |
331 by( atac 1); |
332 by( atac 1); |
332 by( atac 1); |
333 by( atac 1); |
333 by( atac 1); |
334 by( atac 1); |
334 by( atac 1); |