Skip to content

Commit 917417d

Browse files
committed
Fix state_to_cakeProof after updates to CakeML's Loc
Following changes in CakeML/cakeml#1107
1 parent 6636ae1 commit 917417d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/backend/passes/proofs/state_to_cakeProofScript.sml

+5-5
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ Theorem strle_v_def[local] = SRULE [strle_exp_def] strle_v_def;
392392

393393
Definition env_ok_def:
394394
env_ok env ⇔
395-
nsLookup env.v (Short "ffi_array") = SOME (semanticPrimitives$Loc 0) ∧
395+
nsLookup env.v (Short "ffi_array") = SOME (semanticPrimitives$Loc T 0) ∧
396396
(∃env'.
397397
nsLookup env.v (Short "strle") = SOME $ strle_v env' ∧
398398
nsLookup env'.c (Short $ "True") = SOME (0n, TypeStamp "True" bool_type_num) ∧
@@ -435,7 +435,7 @@ Inductive v_rel:
435435
v_rel cnenv (Atom $ Str s) (Litv $ StrLit s)
436436

437437
[~Loc:]
438-
v_rel cnenv (Atom $ Loc n) (Loc (n + 1)) (* leave space for FFI array *)
438+
v_rel cnenv (Atom $ Loc n) (Loc T (n + 1)) (* leave space for FFI array *)
439439

440440
[~env_rel:]
441441
(cnenv_rel cnenv cenv.c ∧
@@ -709,7 +709,7 @@ Definition get_ffi_ch_def[simp]:
709709
End
710710

711711
Definition get_ffi_args_def[simp]:
712-
get_ffi_args [Litv (StrLit conf); Loc lnum] = SOME (conf, lnum) ∧
712+
get_ffi_args [Litv (StrLit conf); Loc b lnum] = SOME (conf, lnum) ∧
713713
get_ffi_args _ = NONE
714714
End
715715

@@ -2274,7 +2274,7 @@ Proof
22742274
first_x_assum $ qspec_then `1` assume_tac >> gvs[sstep] >>
22752275
TOP_CASE_TAC >> gvs[] >>
22762276
ntac 3 (qrefine `SUC n` >> simp[cstep_n_def, cstep]) >>
2277-
`nsLookup cenv'.v (Short "ffi_array") = SOME (Loc 0)` by gvs[env_ok_def] >>
2277+
`nsLookup cenv'.v (Short "ffi_array") = SOME (Loc T 0)` by gvs[env_ok_def] >>
22782278
simp[] >>
22792279
ntac 3 (qrefine `SUC n` >> simp[cstep_n_def, cstep]) >>
22802280
`∃ws. store_lookup 0 cst = SOME $ W8array ws ∧
@@ -2432,7 +2432,7 @@ Proof
24322432
unabbrev_all_tac >>
24332433
ntac 7 (qrefine `SUC m` >> simp[dstep, cstep]) >>
24342434
simp[namespaceTheory.nsOptBind_def] >>
2435-
`nsLookup cenv.v (Short "ffi_array") = SOME (Loc 0)` by gvs[env_ok_def] >>
2435+
`nsLookup cenv.v (Short "ffi_array") = SOME (Loc T 0)` by gvs[env_ok_def] >>
24362436
simp[] >> qrefine `SUC m` >> simp[dstep, cstep, do_app_def] >>
24372437
Cases_on `dst.refs` >> gvs[store_lookup_def, LUPDATE_DEF] >>
24382438
ntac 9 (qrefine `SUC m` >> simp[dstep, cstep, do_app_def]) >>

0 commit comments

Comments
 (0)