Skip to content

feat: add popCount using Kernighan's algorithm to the bitblaster #9416

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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

luisacicolini
Copy link
Contributor

@luisacicolini luisacicolini commented Jul 17, 2025

This PR adds a new BitVec.popCount operation and a corresponding circuit to bv_decide, allowing to bitblast the population count (popCount) operation. The AIG circuit is implemented according to Brian Kernighan's popCount algorithm in the bitblaster, to count the numbers of bits set in a bitvector (popCount).
popCount is common in numerous compiler intrinsics (see here) and architectures (see here).

@luisacicolini luisacicolini changed the title feat: add popCount usingKernighan algorithm to the bitblaster feat: add popCount using Kernighan's algorithm to the bitblaster Jul 17, 2025
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.

1 participant