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.
22 lines
664 B
Text
22 lines
664 B
Text
/-
|
||
This test case explores the interaction between the `split` tactic and the
|
||
tailrecursion checking:
|
||
|
||
If `split` would rewrite matches with identical targets together, and thus clear out
|
||
dead code, this would be accepted, despite a non-tailrecursive call there.
|
||
-/
|
||
|
||
/--
|
||
error: Could not prove 'whileSome' to be monotone in its recursive calls:
|
||
Cannot eliminate recursive call `whileSome some x'` enclosed in
|
||
id (whileSome some x'✝)
|
||
-/
|
||
#guard_msgs in
|
||
def whileSome (f : α → Option α) (x : α) : α :=
|
||
match f x with
|
||
| none => x
|
||
| some x' =>
|
||
match f x with
|
||
| none => id $ whileSome some x'
|
||
| some x' => whileSome f x'
|
||
partial_fixpoint
|