Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bv_decide benchmarks #6017

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/bench/bv_decide_inequality.lean
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,24 @@ example :
→ (0#64 < c - a ∧ 0#64 < d - a) ∧ d - c < a - c := by
bv_decide

set_option sat.timeout 120 in
example :
n < 18446744073709551615#64 - k →
((a + k - a < a + k + 1#64 - a ∧ a + k - a < a + k + 1#64 + n - a) ∧
a + k + 1#64 + n - (a + k + 1#64) < a - (a + k + 1#64)) ∧
a + k + 1#64 + n - (a + k + 1#64) < a + k - (a + k + 1#64) := by
bv_decide
bv_decide (config := { timeout := 120 })

example :
n < 18446744073709551615 →
(0#64 < addr + 1#64 - addr ∧ 0#64 < addr + 1#64 + n - addr)
∧ addr + 1#64 + n - (addr + 1#64) < addr - (addr + 1#64) := by
bv_decide

set_option sat.timeout 120 in
example :
a2 - a1 < b1 - a1 → a2 - a1 < b2 - a1 →
b2 - b1 < a1 - b1 → b2 - b1 < a2 - b1 →
b2 - b1 = 18446744073709551615#64 ∨ c2 - b1 ≤ b2 - b1 ∧ c1 - b1 ≤ c2 - b1 →
((a2 - a1 < c1 - a1 ∧ a2 - a1 < c2 - a1)
∧ c2 - c1 < a1 - c1)
∧ c2 - c1 < a2 - c1 := by
bv_decide
bv_decide (config := { timeout := 120 })
3 changes: 1 addition & 2 deletions tests/bench/bv_decide_mod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def opt (state : BitVec 32) : BitVec 32 :=
--set_option trace.Meta.Tactic.bv true in
--set_option trace.Meta.Tactic.sat true in
--set_option trace.profiler true in
set_option sat.timeout 120 in
theorem lehmer_correct (state : BitVec 32) (h1 : state > 0) (h2 : state < 0x7fffffff) :
naive state = opt state := by
unfold naive opt
bv_decide
bv_decide (config := { timeout := 120 })
Loading