-
Notifications
You must be signed in to change notification settings - Fork 119
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
Introduce BoolVar struct #94
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxiong Nice work. There is one subtlety that needs to be addressed though.
In general I want to advocate my "circuit ref" idea. For example struct BoolVar<'a> {
index: Variable,
cs: &'a ConstraintSystem
} On top of overloading operators here are some additional thoughts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we can wait for Zhenfei's approval before merging.
LGTM2 |
Description
Introducing
struct BoolVar
whose creation automatically enforces abool_gate()
, distinguishing from normalVariable
to avoid repeated checks and make API clearer.closes: #91
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Wrote unit testsPending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer