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
646 B
Text
22 lines
646 B
Text
import Std.Tactic.BVDecide
|
|
|
|
-- Demonstrate some arbitrary width reasoning
|
|
example {x y z : BitVec w} :
|
|
(x &&& y) ||| (x &&& z) ||| (y &&& z) ||| x ||| y ||| z
|
|
=
|
|
~~~ ((~~~ x) &&& (~~~ y) &&& (~~~ z)) := by
|
|
ext i h
|
|
simp [h]
|
|
bv_decide
|
|
|
|
@[irreducible]
|
|
def ufBv (x : BitVec w) : BitVec w := x
|
|
|
|
example (x y : BitVec 16) : (ufBv x) + (ufBv y) = (ufBv y) + (ufBv x) := by bv_decide
|
|
|
|
@[irreducible]
|
|
def ufBool (x : Bool) : Bool := x
|
|
|
|
example (x y : BitVec 16) (z : Bool) : ((ufBool (x < y)) ∧ z) ↔ (z ∧ ufBool (x < y)) := by bv_decide
|
|
|
|
example (x y z : BitVec 16) (h1 : x < z) (h2 : z < (ufBv y)) : x < (ufBv y) := by bv_decide
|