feat(pumpkin-core): Introduce runtime consistency verification of propagators#374
Open
maartenflippo wants to merge 32 commits intomainfrom
Open
feat(pumpkin-core): Introduce runtime consistency verification of propagators#374maartenflippo wants to merge 32 commits intomainfrom
maartenflippo wants to merge 32 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
In my mind, it would be good to explicitly differentiate between InferenceChecker and ConsistencyChecker; naming the module checkers makes this ambiguous
Witness generators now immediately provide all witnesses
04d580a to
9a528c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To increase the trust in propagator implementations, we complement the existing inference checkers with consistency checkers. A consistency checker verifies that a propagator is at its intended consistency level.
The function
PropagatorConstructor::add_inference_checkersnow returns aConsistencyCheckerimplementation. This means there is one ConsistencyChecker per propagator. The interface forces propagator implementations to return a consistency checker if they want to run any checkers at all.Since the
add_inference_checkershad a default implementation, that now returns a consistency checker that always indicates the desired consistency level is achieved. For any new propagators, we do not want to expose that, so the implementation is marked deprecated and is hidden from the documentation. However, it reduces the size of this already significant PR as we don't have to implement consistency checkers for every propagator as well.In this PR, we also implement reusable checkers for:
TODO
Witness generators for bound consistent propagators
Witness generators for domain consistent propagators
Migrate
propagate_from_scratchto custom consistency checkers where bounds or domain consistency is not applicableWitness generators for non-bound consistent propagators
Division (Not bound-consistent since it only propagates when the denominator spans 0)
Multiplication (Only propagates in certain situations)