[FR] Proposition Uniqueness #108
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Willingness to contribute
The Bauhaus Community encourages new feature contributions. Would you be willing to contribute an implementation of this feature?
Proposal Summary
Proposition objects are created as unique, and so if you create multiple copies for various constraints, then it can lead to unintuitive bugs. By default, we should have a proposition be uniquely identified by it's representation (or a hash of that), and then we can create the object repeatedly and refer to the same proposition in the code.
Motivation
Is your feature request related to a problem? Please describe.
This shows what currently doesn't work, but should:
While it doesn't seem like that much of a difference here, it can be largely problematic for large encodings with several variables.
Describe the solution you'd like
_prop_name
on their objects using@proposition
. If it's not there, throw an error.__repr__
.__hash__
and__eq__
appropriately (e.g., [this hack]).Why is it currently difficult to achieve this with Bauhaus?
It's not implemented.
The text was updated successfully, but these errors were encountered: