Skip to content

Commit 0311f57

Browse files
committed
Fix compiler/binary
1 parent 917417d commit 0311f57

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

compiler/binary/pure_inferProgScript.sml

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ QED
9090

9191
val r = translate (def_of_const “isubst” |> RW [LLOOKUP_INTRO]);
9292

93+
val isubst_side = Q.prove (
94+
‘∀b a. isubst_side a b ⇔ T’,
95+
Induct using pure_inference_commonTheory.itype_ind >> rw[] >>
96+
simp[Once $ fetch "-" "isubst_side_def"] >> gvs[oEL_THM])
97+
|> update_precondition;
98+
9399
val r = translate (pure_inferenceTheory.get_typedef_def
94100
|> DefnBase.one_line_ify NONE |> RW [ADD1]);
95101

compiler/binary/pure_parseProgScript.sml

+11-10
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,6 @@ val num_from_hex_string_alt_side = Q.prove(`
104104

105105
val r = translate pure_lexer_implTheory.read_string_def;
106106

107-
val read_string_side = Q.prove(`
108-
∀x y l.
109-
read_string_side x y l ⇔ T`,
110-
ho_match_mp_tac pure_lexer_implTheory.read_string_ind>>
111-
rw[]>>
112-
simp[Once (fetch"-""read_string_side_def")])
113-
|> update_precondition;
114-
115107
val r = translate EL;
116108

117109
val el_side = Q.prove(`
@@ -130,12 +122,21 @@ QED
130122

131123
val r = translate (pure_lexer_implTheory.next_sym_alt_def |> RW [and_to_if]);
132124

125+
Triviality read_while_thm':
126+
∀cs s cs' s'. read_while P cs s = (s', cs') ⇒ STRLEN s' ≥ STRLEN s
127+
Proof
128+
Induct >> rw[] >>
129+
gvs[pure_lexer_implTheory.read_while_def, IMPLODE_EXPLODE_I] >>
130+
gvs[AllCaseEqs()] >> last_x_assum drule >> simp[]
131+
QED
132+
133133
val next_sym_alt_side = Q.prove(`
134134
∀x l. next_sym_alt_side x l ⇔ T`,
135135
ho_match_mp_tac pure_lexer_implTheory.next_sym_alt_ind>>rw[]>>
136136
simp[Once (fetch"-""next_sym_alt_side_def"),num_from_dec_string_alt_side,
137-
read_string_side,num_from_hex_string_alt_side]>>
138-
rw[]>> gvs []) |> update_precondition;
137+
num_from_hex_string_alt_side] >>
138+
rw[] >> gvs[pure_lexer_implTheory.read_while_def] >>
139+
imp_res_tac read_while_thm' >> gvs[]) |> update_precondition;
139140

140141
val r = translate pure_lexer_implTheory.lexer_fun_def;
141142

0 commit comments

Comments
 (0)