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.
16 lines
489 B
Text
16 lines
489 B
Text
inductive Term (α: Type): Type where
|
||
| Composite : Array (Term α) → Term α
|
||
| Atom: α → Term α
|
||
|
||
-- height of a term
|
||
def height (f: Term α): Nat :=
|
||
let rec max_height (a: Array (Term α)) (i: Nat) (m: Nat): Nat :=
|
||
if h: i < a.size then
|
||
-- The recursive call to height used to fail because of a too weak
|
||
-- array_get_dec
|
||
max_height a (i + 1) (max (height a[i]) m)
|
||
else
|
||
m
|
||
match f with
|
||
| .Composite a => 1 + max_height a 0 0
|
||
| .Atom _ => 1
|