`bv_decide`: better failure message
Open
Nobody has claimed this yet.
bug
feature
P-high
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
bv_decide currently generates error messages such as
None of the hypotheses are in the supported BitVec fragment.
There are two potential fixes for this:
1. If you are using custom BitVec constructs simplify them to built-in ones.
2. If your problem is using only built-in ones it might currently be out of reach.
Consider expressing it in terms of different operations that are better supported.
We should include the term that triggered the error message. Otherwise, it may be quite hard to diagnose the issue.
Here is an example that triggers this issue.
theorem ushiftRight_symbolic_shift (x : BitVec 64) (n : Nat) (h : n < 64) :
x >>> n = (BitVec.extractLsb 63 n x).zeroExtend 64 := by
bv_decide
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the ushiftRight_symbolic_shift theorem and its bv_decide failure. Trace where the unsupported BitVec-fragment diagnostic is produced, then update it so the triggering term is included; the example should produce a more actionable message when the change is done.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100