1461
|
1 |
(* Title: ZF/IMP/Denotation.ML
|
482
|
2 |
ID: $Id$
|
1461
|
3 |
Author: Heiko Loetzbeyer & Robert Sandner, TUM
|
482
|
4 |
Copyright 1994 TUM
|
|
5 |
*)
|
|
6 |
|
4298
|
7 |
(** Rewrite Rules for A,B,C **)
|
|
8 |
Addsimps [A_nat_def,A_loc_def,A_op1_def,A_op2_def];
|
|
9 |
Addsimps [B_true_def,B_false_def,B_op_def,B_not_def,B_and_def,B_or_def];
|
|
10 |
Addsimps [C_skip_def,C_assign_def,C_comp_def,C_if_def,C_while_def];
|
482
|
11 |
|
4298
|
12 |
(** Type_intr for A **)
|
482
|
13 |
|
9177
|
14 |
Goal "[|a:aexp; sigma:loc->nat|] ==> A(a,sigma):nat";
|
|
15 |
by (etac aexp.induct 1);
|
|
16 |
by (ALLGOALS Asm_simp_tac);
|
|
17 |
by (ALLGOALS (fast_tac (claset() addSIs [apply_type])));
|
|
18 |
qed "A_type";
|
482
|
19 |
|
4298
|
20 |
(** Type_intr for B **)
|
482
|
21 |
|
9177
|
22 |
Goal "[|b:bexp; sigma:loc->nat|] ==> B(b,sigma):bool";
|
|
23 |
by (etac bexp.induct 1);
|
|
24 |
by (ALLGOALS Asm_simp_tac);
|
|
25 |
by (ALLGOALS (fast_tac (claset() addSIs [apply_type,A_type]@bool_typechecks)));
|
|
26 |
qed "B_type";
|
482
|
27 |
|
4298
|
28 |
(** C_subset **)
|
482
|
29 |
|
9177
|
30 |
Goal "c:com ==> C(c) <= (loc->nat)*(loc->nat)";
|
|
31 |
by (etac com.induct 1);
|
|
32 |
by (ALLGOALS Asm_simp_tac);
|
|
33 |
by (ALLGOALS (fast_tac (claset() addDs [lfp_subset RS subsetD])));
|
|
34 |
qed "C_subset";
|
482
|
35 |
|
4298
|
36 |
(** Type_elims for C **)
|
482
|
37 |
|
9177
|
38 |
Goal "[| <x,y>:C(c); c:com |] ==> x:loc->nat & y:loc->nat";
|
|
39 |
by (blast_tac (claset() addDs [C_subset RS subsetD]) 1);
|
|
40 |
qed "C_type_D";
|
482
|
41 |
|
9177
|
42 |
Goal "[| x:C(c); c:com |] ==> fst(x):loc->nat";
|
|
43 |
by (dtac (C_subset RS subsetD) 1);
|
|
44 |
by (atac 1);
|
|
45 |
by (etac SigmaE 1);
|
|
46 |
by (Asm_simp_tac 1);
|
|
47 |
qed "C_type_fst";
|
482
|
48 |
|
9177
|
49 |
AddDs [C_type_D, C_type_fst];
|
482
|
50 |
|
4298
|
51 |
(** bnd_mono (nat->nat*nat->nat,Gamma(b,c) **)
|
482
|
52 |
|
9177
|
53 |
Goalw [bnd_mono_def,Gamma_def]
|
|
54 |
"c:com ==> bnd_mono ((loc->nat)*(loc->nat),Gamma(b,c))";
|
|
55 |
by (Blast_tac 1);
|
|
56 |
qed "Gamma_bnd_mono";
|
482
|
57 |
|
4298
|
58 |
(** End ***)
|