512 |
512 |
513 |
513 |
514 Goal |
514 Goal |
515 "\\<lbrakk> wf_prog wt G; \ |
515 "\\<lbrakk> wf_prog wt G; \ |
516 \ method (G,C) sig = Some (C,rT,maxl,ins); \ |
516 \ method (G,C) sig = Some (C,rT,maxl,ins); \ |
517 \ ins ! pc = OS ADD; \ |
517 \ ins ! pc = OS IAdd; \ |
518 \ wt_instr (ins!pc) G rT (phi C sig) (length ins) pc; \ |
518 \ wt_instr (ins!pc) G rT (phi C sig) (length ins) pc; \ |
519 \ Some state' = exec (G, None, hp, (stk,loc,C,sig,pc)#frs) ; \ |
519 \ Some state' = exec (G, None, hp, (stk,loc,C,sig,pc)#frs) ; \ |
520 \ G,phi \\<turnstile>JVM (None, hp, (stk,loc,C,sig,pc)#frs)\\<surd> \\<rbrakk> \ |
520 \ G,phi \\<turnstile>JVM (None, hp, (stk,loc,C,sig,pc)#frs)\\<surd> \\<rbrakk> \ |
521 \\\<Longrightarrow> G,phi \\<turnstile>JVM state'\\<surd>"; |
521 \\\<Longrightarrow> G,phi \\<turnstile>JVM state'\\<surd>"; |
522 by (fast_tac (claset() addIs [approx_stk_imp_approx_stk_sup,approx_val_imp_approx_val_sup,approx_loc_imp_approx_loc_sup] |
522 by (fast_tac (claset() addIs [approx_stk_imp_approx_stk_sup,approx_val_imp_approx_val_sup,approx_loc_imp_approx_loc_sup] |
523 addss (simpset() addsimps [map_eq_Cons, approx_val_def]@defs1)) 1); |
523 addss (simpset() addsimps [map_eq_Cons, approx_val_def]@defs1)) 1); |
524 qed "ADD_correct"; |
524 qed "IAdd_correct"; |
525 |
525 |
526 |
526 |
527 Goal |
527 Goal |
528 "\\<lbrakk> wt_jvm_prog G phi; \ |
528 "\\<lbrakk> wt_jvm_prog G phi; \ |
529 \ method (G,C) sig = Some (C,rT,maxl,ins); \ |
529 \ method (G,C) sig = Some (C,rT,maxl,ins); \ |
534 by(forward_tac [wt_jvm_prog_impl_wt_instr_cor] 1); |
534 by(forward_tac [wt_jvm_prog_impl_wt_instr_cor] 1); |
535 ba 1; |
535 ba 1; |
536 ba 1; |
536 ba 1; |
537 by(rewtac wt_jvm_prog_def); |
537 by(rewtac wt_jvm_prog_def); |
538 by (case_tac "os_com" 1); |
538 by (case_tac "os_com" 1); |
539 by (ALLGOALS (fast_tac (claset() addIs [Pop_correct,Dup_correct,Dup_x1_correct,Dup_x2_correct,Swap_correct,ADD_correct]))); |
539 by (ALLGOALS (fast_tac (claset() addIs [Pop_correct,Dup_correct,Dup_x1_correct,Dup_x2_correct,Swap_correct,IAdd_correct]))); |
540 qed "OS_correct"; |
540 qed "OS_correct"; |
541 |
541 |
542 (** Main **) |
542 (** Main **) |
543 |
543 |
544 Goalw [correct_state_def,Let_def] |
544 Goalw [correct_state_def,Let_def] |