[SMT] Implicit overflow when parsing `!smt.bv` type?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
When providing the following as input to `circt-opt`
```
hw.module @ImplicitOverflow() {
%0 = smt.bv.constant #smt.bv<1> : !smt.bv<18446744073709551615>
}
```
it outputs
```
hw.module @ImplicitOverflow() {
%c1_bv4294967295 = smt.bv.constant #smt.bv<1> : !smt.bv<4294967295>
hw.output
}
```
Using `!smt.bv<18446744073709551616>` as input expectedly triggers an error that the integer is too large.
Seems like we store it in some 32 bit integer at some point?
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the issue with the provided input using circt-opt, then trace parsing and storage of the !smt.bv width. Ensure 18446744073709551615 is preserved rather than truncated, while 18446744073709551616 still reports that the integer is too large.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100