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

CPModification upgrade #140

Merged
merged 11 commits into from
May 27, 2021
Merged

CPModification upgrade #140

merged 11 commits into from
May 27, 2021

Conversation

PierreTsr
Copy link
Contributor

As proposed in #128, this PR brings new features to ensure the correctness of prunedDomains during each propagation. Thus te mains contributions are:

  • the struct SetModification to make it possible to track changes in a set domain;
  • a proof-read of every constraint to make sure that each domain change is followed by an addToPrunedDomains!;
  • a testset dedicated to CPModification, to ensure that each constraint is updating it well.

During this work I encountered a few undetected bugs and made some minor changes:

  • missing cases in SetEqualConstant;
  • a few display error;
  • prevent Absolute to prune values before the beginning of the execution, as this pruning is intractable for the other constraints.

If this PR is approved, we should now have a reliable prunedDomains variable, as long as all the new constraints follow a few guidelines. It would be great to write a few instructions about this for potential contributors.

Closes #128

@PierreTsr PierreTsr requested a review from qcappart May 25, 2021 16:20
@PierreTsr PierreTsr self-assigned this May 25, 2021
@PierreTsr PierreTsr added bug Something isn't working enhancement New feature or request labels May 25, 2021
Copy link
Collaborator

@qcappart qcappart left a comment

Choose a reason for hiding this comment

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

Very useful PR ! :-) Thanks for this refactoring

@PierreTsr PierreTsr merged commit 09361dc into master May 27, 2021
@PierreTsr PierreTsr deleted the fix/cpmodification branch May 27, 2021 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prunedDomains update check
3 participants