Skip to content
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

Only bv implies check globals #394

Merged
merged 7 commits into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cpmpy/transformations/reification.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ def only_bv_implies(constraints):
else:
# BE0 == BVar1 :: ~BVar1 -> ~BE0, BVar1 -> BE0
newexprs = ((~a1).implies(recurse_negation(a0)), a1.implies(a0))
#newexprs = ((~a1).implies(~a0), a1.implies(a0)) # XXX when push_down_neg is separate, negated_normal no longer needed separately
newcons.extend(only_bv_implies(flatten_constraint(newexprs)))
if isinstance(a0, GlobalConstraint):
newcons.extend(newexprs)
else:
newcons.extend(only_bv_implies(flatten_constraint(newexprs)))
else:
# all other flat normal form expressions are fine
newcons.append(cpm_expr)
Expand Down