Skip to content

feat(PBV): Support Nat literals in width expressions - #1483

Merged
luigirinaldi merged 5 commits into
luigirinaldi/bpbv-fix-width-boundfrom
luigirinaldi/bpbv-width-lit
Sep 21, 2026
Merged

luigirinaldi merged 5 commits into
luigirinaldi/bpbv-fix-width-boundfrom
luigirinaldi/bpbv-width-lit

Conversation

@luigirinaldi

@luigirinaldi luigirinaldi commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Support width literals in pbv_decide. Hypothesis and concrete width terms are now correctly handled and translated into facts that bv_decide can reason about.

The following changes were made:

  • Extend Tm to support width literals, expand reification other Tm related functions accordingly.
  • Generate proofs for literal masks (requires @[expose]ing the maskOfWidth definition)
    • Define a new introMaskLit which constructs the proof about the mask literal
    • Update WidthInfo to remove unused field, and turn MVarId field into an option
      • This led to updating the runGrind function
  • Add some tests.

@luigirinaldi
luigirinaldi added this pull request to stack #1484 September 17, 2026 12:10
@luigirinaldi
luigirinaldi force-pushed the luigirinaldi/bpbv-width-lit branch from efcfa54 to de752e0 Compare September 17, 2026 12:20
@luigirinaldi
luigirinaldi force-pushed the luigirinaldi/bpbv-width-lit branch 5 times, most recently from 12f593a to c871f17 Compare September 17, 2026 22:07
@luigirinaldi
luigirinaldi force-pushed the luigirinaldi/bpbv-width-lit branch from c871f17 to fcc501b Compare September 17, 2026 22:08
@luigirinaldi
luigirinaldi marked this pull request as ready for review September 17, 2026 22:08
@luigirinaldi
luigirinaldi force-pushed the luigirinaldi/bpbv-width-lit branch from fcc501b to 9aba665 Compare September 18, 2026 15:00
@luigirinaldi
luigirinaldi force-pushed the luigirinaldi/bpbv-width-lit branch from 9aba665 to 1f4dbf2 Compare September 21, 2026 09:32
@luigirinaldi
luigirinaldi added this pull request to the merge queue Sep 21, 2026
An error occurred while trying to automatically change base from luigirinaldi/bpbv-fix-width-bound to main September 21, 2026 09:59
Merged via the queue into main with commit 9462999 Sep 21, 2026
12 checks passed
@luigirinaldi
luigirinaldi deleted the luigirinaldi/bpbv-width-lit branch September 21, 2026 10:01
tobiasgrosser pushed a commit that referenced this pull request Sep 24, 2026
Support width literals in `pbv_decide`. Hypothesis and concrete width
terms are now correctly handled and translated into facts that
`bv_decide` can reason about.

The following changes were made: 
- Extend `Tm` to support width literals, expand reification other `Tm`
related functions accordingly.
- Generate proofs for literal masks (requires `@[expose]`ing the
`maskOfWidth` definition)
- Define a new `introMaskLit` which constructs the proof about the mask
literal
- Update `WidthInfo` to remove unused field, and turn `MVarId` field
into an option
    - This led to updating the `runGrind` function
- Add some tests.

---------

Co-authored-by: luigirinaldi <luigirinaldi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants