@@ -96,7 +96,7 @@ private theorem func0_term (env : HostEnv Unit) (st : Store Unit) (sp x : UInt32
9696 st'.globals.globals[0 ]? = some (.i32 sp) ∧ st'.mem.pages = 16 ) := by
9797 apply TerminatesWith.of_wp_entry_for (f := ⟨[.f32], [], func0, [.f32], none⟩) rfl
9898 unfold func0; wp_run
99- apply wp_call_of_terminates (func1_term env st sp x [] hg hp h16 hb)
99+ apply wp_call_tw (func1_term env st sp x [] hg hp h16 hb)
100100 rintro st1 vs1 ⟨v1, rfl, hg1, hp1⟩
101101 wp_run
102102 exact ⟨v1, rfl, hg1, hp1⟩
@@ -112,7 +112,7 @@ private theorem func2_term (env : HostEnv Unit) (st : Store Unit) (sp x : UInt32
112112 st'.globals.globals[0 ]? = some (.i32 sp) ∧ st'.mem.pages = 16 ) := by
113113 apply TerminatesWith.of_wp_entry_for (f := ⟨[.f32], [], func2, [.f32], none⟩) rfl
114114 unfold func2; wp_run
115- apply wp_call_of_terminates (func3_term env st sp (f64PromoteF32 x) [] hg hp h16 hb)
115+ apply wp_call_tw (func3_term env st sp (f64PromoteF32 x) [] hg hp h16 hb)
116116 rintro st3 vs3 ⟨v3, rfl, hg3, hp3⟩
117117 wp_run
118118 exact ⟨f32DemoteF64 v3, rfl, hg3, hp3⟩
@@ -144,7 +144,7 @@ private theorem func7_term (env : HostEnv Unit) (st : Store Unit) (sp x y : UInt
144144 st'.globals.globals[0 ]? = some (.i32 sp) ∧ st'.mem.pages = 16 ) := by
145145 apply TerminatesWith.of_wp_entry_for (f := ⟨[.f32, .f32], [], func7, [.f32], none⟩) rfl
146146 unfold func7; wp_run
147- apply wp_call_of_terminates (func8_term env st sp x y [] hg hp h16 hb)
147+ apply wp_call_tw (func8_term env st sp x y [] hg hp h16 hb)
148148 rintro st8 vs8 ⟨v8, rfl, hg8, hp8⟩
149149 wp_run
150150 exact ⟨v8, rfl, hg8, hp8⟩
@@ -160,10 +160,10 @@ private theorem func9_term (env : HostEnv Unit) (st : Store Unit) (sp x : UInt32
160160 st'.globals.globals[0 ]? = some (.i32 sp) ∧ st'.mem.pages = 16 ) := by
161161 apply TerminatesWith.of_wp_entry_for (f := ⟨[.f32], [], func9, [.f32], none⟩) rfl
162162 unfold func9; wp_run
163- apply wp_call_of_terminates (func5_term env st sp x [] hg hp)
163+ apply wp_call_tw (func5_term env st sp x [] hg hp)
164164 rintro st5 vs5 ⟨v5, rfl, hg5, hp5⟩
165165 wp_run
166- apply wp_call_of_terminates (func6_term env st5 sp (2147483647 &&& v5) [] hg5 hp5)
166+ apply wp_call_tw (func6_term env st5 sp (2147483647 &&& v5) [] hg5 hp5)
167167 rintro st6 vs6 ⟨v6, rfl, hg6, hp6⟩
168168 wp_run
169169 exact ⟨v6, rfl, hg6, hp6⟩
@@ -179,13 +179,13 @@ private theorem func4_term (env : HostEnv Unit) (st : Store Unit) (sp x y : UInt
179179 st'.globals.globals[0 ]? = some (.i32 sp) ∧ st'.mem.pages = 16 ) := by
180180 apply TerminatesWith.of_wp_entry_for (f := ⟨[.f32, .f32], [], func4, [.f32], none⟩) rfl
181181 unfold func4; wp_run
182- apply wp_call_of_terminates (func5_term env st sp y [] hg hp)
182+ apply wp_call_tw (func5_term env st sp y [] hg hp)
183183 rintro st5 vs5 ⟨v5, rfl, hg5, hp5⟩
184184 wp_run
185- apply wp_call_of_terminates (func5_term env st5 sp x [.i32 (2147483648 &&& v5)] hg5 hp5)
185+ apply wp_call_tw (func5_term env st5 sp x [.i32 (2147483648 &&& v5)] hg5 hp5)
186186 rintro st5' vs5' ⟨v5', rfl, hg5', hp5'⟩
187187 wp_run
188- apply wp_call_of_terminates
188+ apply wp_call_tw
189189 (func6_term env st5' sp ((2147483648 &&& v5) ||| (2147483647 &&& v5')) [] hg5' hp5')
190190 rintro st6 vs6 ⟨v6, rfl, hg6, hp6⟩
191191 wp_run
@@ -215,11 +215,11 @@ theorem check_terminates : FloatReinterpretSpec := by
215215 globals_set0 (1048576 - 16 ) hg
216216 apply wp_block_cons; apply wp_block_cons
217217 wp_run
218- apply wp_call_of_terminates
218+ apply wp_call_tw
219219 (func0_term env _ (1048576 - 16 ) x [] hg10 (by rfl) (by decide) (by decide))
220220 rintro st0 vs0 ⟨v0, rfl, hg0, hp0⟩
221221 wp_run
222- apply wp_call_of_terminates (func9_term env st0 (1048576 - 16 ) x [.f32 v0] hg0 hp0)
222+ apply wp_call_tw (func9_term env st0 (1048576 - 16 ) x [.f32 v0] hg0 hp0)
223223 rintro st9 vs9 ⟨v9, rfl, hg9, hp9⟩
224224 wp_run
225225 have hnt : ¬ ((1048576 - 16 : UInt32).toNat + 12 + 4 > 16 * 65536 ) := by decide
@@ -230,11 +230,11 @@ theorem check_terminates : FloatReinterpretSpec := by
230230 simp [hp9, hg9]
231231 · -- v0 = v9: continue; second comparison
232232 simp [heq09]
233- apply wp_call_of_terminates
233+ apply wp_call_tw
234234 (func0_term env st9 (1048576 - 16 ) x [] hg9 hp9 (by decide) (by decide))
235235 rintro st0' vs0' ⟨v0', rfl, hg0', hp0'⟩
236236 wp_run
237- apply wp_call_of_terminates
237+ apply wp_call_tw
238238 (func2_term env st0' (1048576 - 16 ) x [.f32 v0'] hg0' hp0' (by decide) (by decide))
239239 rintro st2 vs2 ⟨v2, rfl, hg2, hp2⟩
240240 wp_run
@@ -255,11 +255,11 @@ theorem check_terminates : FloatReinterpretSpec := by
255255 globals_set0 (1048576 - 16 ) hg
256256 apply wp_block_cons; apply wp_block_cons
257257 wp_run
258- apply wp_call_of_terminates
258+ apply wp_call_tw
259259 (func7_term env _ (1048576 - 16 ) x y [] hg11 (by rfl) (by decide) (by decide))
260260 rintro st7 vs7 ⟨v7, rfl, hg7, hp7⟩
261261 wp_run
262- apply wp_call_of_terminates (func4_term env st7 (1048576 - 16 ) x y [.f32 v7] hg7 hp7)
262+ apply wp_call_tw (func4_term env st7 (1048576 - 16 ) x y [.f32 v7] hg7 hp7)
263263 rintro st4 vs4 ⟨v4, rfl, hg4, hp4⟩
264264 wp_run
265265 have hnt : ¬ ((1048576 - 16 : UInt32).toNat + 12 + 4 > 16 * 65536 ) := by decide
0 commit comments