Skip to content

Boole feature request seeds + bitwise operator lowering#970

Open
kondylidou wants to merge 50 commits intostrata-org:mainfrom
kondylidou:pr/feature-requests
Open

Boole feature request seeds + bitwise operator lowering#970
kondylidou wants to merge 50 commits intostrata-org:mainfrom
kondylidou:pr/feature-requests

Conversation

@kondylidou
Copy link
Copy Markdown
Contributor

@kondylidou kondylidou commented Apr 19, 2026

Summary

Adds a curated set of one-gap Boole feature-request seeds anchored to two real Verus verification repositories — dalek-lite (Curve25519/Ristretto crypto) and VeruSAGE-Bench Vest (binary parser/serializer combinators) — and implements the first of them: bitwise operators on bvN types.

Real-world motivation

dalek-lite (curve25519-dalek/src/specs/): every spec function uses bv8/bv64 bitwise ops for scalar clamping, fixed-size field arithmetic on FieldElement51 (5 × u64 limbs), NAF scalar reconstruction via Seq::skip(1), and .X/.Y/.Z/.T field access on EdwardsPoint.

VeruSAGE-Bench Vest (SecureSpecCombinator, leb128, repetition): parsers return Option<(int, T)>, postconditions use matches destructuring, by (bit_vector) discharges bitvector identities in LEB128, and RepeatN uses Sequence::drop_first() / skip.

Both repositories share the same core gaps: bitvector operators, sequence slicing, struct field access, Option in spec functions, and trait/interface declarations.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

kondylidou and others added 30 commits March 27, 2026 13:32
shigoel
shigoel previously approved these changes Apr 22, 2026
@shigoel shigoel added the CSLib PRs and issues marked with this label indicate contributions from/for the CSLib community. label Apr 22, 2026
@shigoel shigoel enabled auto-merge April 22, 2026 18:25
Copy link
Copy Markdown
Contributor

@joscoh joscoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking comments (once previous comments are resolved), just a few questions/suggestions

Comment thread docs/BooleFeatureRequests.md
Comment thread docs/BooleFeatureRequests.md Outdated
Comment thread docs/BooleFeatureRequests.md
auto-merge was automatically disabled April 23, 2026 16:03

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor

@shigoel shigoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Overall: Well-structured PR. The bitwise operator lowering follows existing patterns cleanly, and the mutual recursion fix is a real improvement with good test coverage. The new seed files for future features are useful documentation.

Lean invariant coverage: The two non-trivial modifications (casesIdx/inlineIfConstr propagation and sibling bvar injection) are tested indirectly by the mutual recursion test (even/odd over MyNat) which exercises both paths via solver and gen_smt_vcs + grind. No formal invariant, but indirect test coverage is adequate.

Performance: Minor O(n²) list appends in foldlM — acceptable for small mutual recursion blocks.

See inline comments for specific items (4 total).

Comment thread Strata/Languages/Boole/Verify.lean
Comment thread Strata/Languages/Boole/Verify.lean Outdated
Comment thread StrataTest/Languages/Boole/FeatureRequests/bitvector_ops.lean
Comment thread docs/BooleFeatureRequests.md
joscoh
joscoh previously approved these changes Apr 23, 2026
@shigoel shigoel enabled auto-merge April 24, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSLib PRs and issues marked with this label indicate contributions from/for the CSLib community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants