Skip to content

Commit a3be900

Browse files
committedDec 4, 2024
Add bool to Loc values
1 parent 247f83e commit a3be900

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed
 

‎characteristic/cfHeapsBaseScript.sml

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,19 @@ End
233233
(* A reference cell, as a convenience wrapper over cell and Refv *)
234234
Definition REF_def:
235235
REF rv xv =
236-
SEP_EXISTS loc. cond (rv = Loc loc) * cell loc (Refv xv)
236+
SEP_EXISTS loc. cond (rv = Loc T loc) * cell loc (Refv xv)
237237
End
238238

239239
(* An array cell, as a wrapper over cell and Varray *)
240240
Definition ARRAY_def:
241241
ARRAY av vl =
242-
SEP_EXISTS loc. cond (av = Loc loc) * cell loc (Varray vl)
242+
SEP_EXISTS loc. cond (av = Loc T loc) * cell loc (Varray vl)
243243
End
244244

245245
(* A bytearray cell, as a wrapper over cell and W8array *)
246246
Definition W8ARRAY_def:
247247
W8ARRAY av wl =
248-
SEP_EXISTS loc. cond (av = Loc loc) * cell loc (W8array wl)
248+
SEP_EXISTS loc. cond (av = Loc T loc) * cell loc (W8array wl)
249249
End
250250

251251
Definition IO_def:

‎characteristic/cfLetAutoScript.sml

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ metis_tac[HEAP_FROM_STATE_def, UNIQUE_PTRS_HFS]
143143
QED
144144

145145
Theorem PTR_IN_HEAP:
146-
!l xv H s. (REF (Loc l) xv * H) s ==> Mem l (Refv xv) IN s
146+
!l xv H s. (REF (Loc T l) xv * H) s ==> Mem l (Refv xv) IN s
147147
Proof
148148
fs[STAR_def, SPLIT_def] >>
149149
fs[REF_def, SEP_EXISTS] >>

‎characteristic/cfScript.sml

+11-11
Original file line numberDiff line numberDiff line change
@@ -3053,7 +3053,7 @@ Proof
30533053
cf_exp2v_evaluate_tac `st` \\ first_assum progress \\
30543054
rename1 `SPLIT h_i (h_i', _)` \\ rename1 `FF h_i'` \\
30553055
fs [do_app_def, store_assign_def] \\
3056-
rename1 `rv = Loc r` \\ rw [] \\
3056+
rename1 `rv = Loc T r` \\ rw [] \\
30573057
`Mem r (Refv x') IN (st2heap p st)` by SPLIT_TAC \\
30583058
`Mem r (Refv x') IN (store2heap st.refs)` by
30593059
fs [st2heap_def,Mem_NOT_IN_ffi2heap] \\
@@ -3080,7 +3080,7 @@ Proof
30803080
fs [st2heap_def, cond_def, SEP_IMP_def, STAR_def, one_def, cell_def] \\
30813081
GEN_EXISTS_TAC "ck" `st.clock` \\ fs [with_clock_self] \\
30823082
cf_exp2v_evaluate_tac `st` \\
3083-
first_x_assum (qspec_then `Loc (LENGTH st.refs)` strip_assume_tac) \\
3083+
first_x_assum (qspec_then `Loc T (LENGTH st.refs)` strip_assume_tac) \\
30843084
first_x_assum (qspec_then `Mem (LENGTH st.refs) (Refv xv) INSERT h_i` mp_tac) \\
30853085
assume_tac store2heap_alloc_disjoint \\
30863086
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
@@ -3102,7 +3102,7 @@ Proof
31023102
rpt (first_x_assum progress) \\
31033103
fs [do_app_def, store_lookup_def] \\
31043104
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
3105-
rename1 `rv = Loc r` \\ rw [] \\
3105+
rename1 `rv = Loc T r` \\ rw [] \\
31063106
`Mem r (Refv x) IN (store2heap st.refs)` by SPLIT_TAC \\
31073107
progress store2heap_IN_LENGTH \\ progress store2heap_IN_EL \\
31083108
fs [state_component_equality]
@@ -3115,7 +3115,7 @@ Proof
31153115
fs [do_app_def, store_alloc_def, st2heap_def] \\
31163116
fs [app_aalloc_def, app_aw8alloc_def, W8ARRAY_def, ARRAY_def] \\
31173117
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, cell_def, one_def] \\
3118-
first_x_assum (qspec_then `Loc (LENGTH st.refs)` strip_assume_tac) \\
3118+
first_x_assum (qspec_then `Loc T (LENGTH st.refs)` strip_assume_tac) \\
31193119
qmatch_asmsub_rename_tac(`REPLICATE (Num n) vv`) \\
31203120
((rename1 `W8array _` \\ (fn l => first_x_assum (qspecl_then l mp_tac))
31213121
[`Mem (LENGTH st.refs) (W8array (REPLICATE (Num n) vv)) INSERT h_i`])
@@ -3141,7 +3141,7 @@ Proof
31413141
fs [do_app_def, store_alloc_def, st2heap_def] \\
31423142
fs [app_aalloc_def, app_aw8alloc_def, W8ARRAY_def, ARRAY_def] \\
31433143
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, cell_def, one_def] \\
3144-
first_x_assum (qspec_then `Loc (LENGTH st.refs)` strip_assume_tac) \\
3144+
first_x_assum (qspec_then `Loc T (LENGTH st.refs)` strip_assume_tac) \\
31453145
((rename1 `W8array _` \\ (fn l => first_x_assum (qspecl_then l mp_tac))
31463146
[`Mem (LENGTH st.refs) (W8array []) INSERT h_i`])
31473147
ORELSE (fn l => first_x_assum (qspecl_then l mp_tac))
@@ -3166,7 +3166,7 @@ Proof
31663166
fs [st2heap_def, app_aw8sub_def, app_asub_def, W8ARRAY_def, ARRAY_def] \\
31673167
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, one_def, cell_def] \\
31683168
progress SPLIT3_of_SPLIT_emp3 \\ instantiate \\
3169-
rpt (first_x_assum progress) \\ rename1 `a = Loc l` \\ rw [] \\
3169+
rpt (first_x_assum progress) \\ rename1 `a = Loc T l` \\ rw [] \\
31703170
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
31713171
fs [do_app_def, store_lookup_def] \\
31723172
((`Mem l (W8array ws) IN (store2heap st.refs)` by SPLIT_TAC) ORELSE
@@ -3186,7 +3186,7 @@ Proof
31863186
fs [SEP_EXISTS, SEP_IMP_def, STAR_def, one_def, cell_def, cond_def] \\
31873187
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
31883188
progress SPLIT3_of_SPLIT_emp3 \\ instantiate \\
3189-
rpt (first_x_assum progress) \\ rename1 `a = Loc l` \\ rw [] \\
3189+
rpt (first_x_assum progress) \\ rename1 `a = Loc T l` \\ rw [] \\
31903190
fs [do_app_def, store_lookup_def] \\
31913191
((`Mem l (W8array ws) IN (store2heap st.refs)` by SPLIT_TAC) ORELSE
31923192
(`Mem l (Varray vs) IN (store2heap st.refs)` by SPLIT_TAC)) \\
@@ -3201,7 +3201,7 @@ Proof
32013201
fs [st2heap_def, app_aw8update_def, app_aupdate_def] \\
32023202
fs [W8ARRAY_def, ARRAY_def] \\
32033203
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, one_def, cell_def] \\
3204-
first_x_assum progress \\ rename1 `a = Loc l` \\ rw [] \\
3204+
first_x_assum progress \\ rename1 `a = Loc T l` \\ rw [] \\
32053205
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
32063206
((rename1 `W8array _` \\
32073207
`Mem l (W8array ws) IN (store2heap st.refs)` by SPLIT_TAC) ORELSE
@@ -3237,7 +3237,7 @@ Proof
32373237
fs [W8ARRAY_def] \\
32383238
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, one_def, cell_def] \\
32393239
first_x_assum progress
3240-
\\ rename1 `d = Loc ld` \\ rw [] \\
3240+
\\ rename1 `d = Loc T ld` \\ rw [] \\
32413241
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
32423242
(rename1 `W8array _` \\
32433243
`Mem ld (W8array wd) IN (store2heap st.refs)` by SPLIT_TAC) \\
@@ -3271,7 +3271,7 @@ Proof
32713271
fs [W8ARRAY_def] \\
32723272
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, one_def, cell_def] \\
32733273
first_x_assum progress
3274-
\\ rename1 `s = Loc ls` \\ rw [] \\
3274+
\\ rename1 `s = Loc T ls` \\ rw [] \\
32753275
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
32763276
(rename1 `W8array _` \\
32773277
`Mem ls (W8array ws) IN (store2heap st.refs)` by SPLIT_TAC) \\
@@ -3297,7 +3297,7 @@ Proof
32973297
fs [W8ARRAY_def] \\
32983298
fs [SEP_EXISTS, cond_def, SEP_IMP_def, STAR_def, one_def, cell_def] \\
32993299
first_x_assum progress
3300-
\\ rename1 `s = Loc ls` \\ rename1 `d = Loc ld` \\ rw [] \\
3300+
\\ rename1 `s = Loc T ls` \\ rename1 `d = Loc T ld` \\ rw [] \\
33013301
assume_tac (GEN_ALL Mem_NOT_IN_ffi2heap) \\
33023302
rename1`Mem ls (W8array ws)` \\
33033303
(rename1 `W8array _` \\

0 commit comments

Comments
 (0)
Please sign in to comment.