This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
38 lines
816 B
Text
38 lines
816 B
Text
import Std.Tactic.Do
|
|
|
|
open Std.Do
|
|
|
|
set_option mvcgen.warning false
|
|
|
|
structure MyException where
|
|
def F : EStateM MyException Unit Unit := do
|
|
for _ in [0:5] do
|
|
pure ()
|
|
|
|
theorem F_spec :
|
|
⦃⌜True⌝⦄
|
|
F
|
|
⦃⇓ _ => ⌜1 < 2⌝⦄ := by
|
|
mvcgen [F]
|
|
|
|
case inv1 => exact ⇓ _ => ⌜1 < 2⌝
|
|
-- it would be nice if we had a tactic wrapper around `case inv => exact ...` that does `mleave`
|
|
-- on all subgoals afterwards.
|
|
|
|
· mleave
|
|
omega
|
|
· mleave
|
|
omega
|
|
-- Goal that could be discharged completely automatically:
|
|
-- case post.except
|
|
-- ⊢ (⇓x => ⌜1 < 2⌝).snd ⊢ₑ (⇓x => ⌜1 < 2⌝).snd
|
|
· assumption
|
|
· mleave
|
|
|
|
theorem F_spec_using_with :
|
|
⦃⌜True⌝⦄
|
|
F
|
|
⦃⇓ _ => ⌜1 < 2⌝⦄ := by
|
|
mvcgen [F]
|
|
invariants · ⇓ _ => ⌜1 < 2⌝
|
|
with omega
|