Skip to content

feat(pumpkin-core): Introduce runtime consistency verification of propagators#374

Open
maartenflippo wants to merge 32 commits intomainfrom
feat/propagation-checkers
Open

feat(pumpkin-core): Introduce runtime consistency verification of propagators#374
maartenflippo wants to merge 32 commits intomainfrom
feat/propagation-checkers

Conversation

@maartenflippo
Copy link
Contributor

@maartenflippo maartenflippo commented Feb 27, 2026

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_checkers now returns a ConsistencyChecker implementation. 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_checkers had 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:

  • Bound consistency
  • Domain consistency

TODO

  • Witness generators for bound consistent propagators

    • Linear
    • Maximum
  • Witness generators for domain consistent propagators

    • Binary equals
    • (Binary) Not equals
  • Migrate propagate_from_scratch to custom consistency checkers where bounds or domain consistency is not applicable

  • Witness 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)

Copy link
Contributor

Choose a reason for hiding this comment

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

In my mind, it would be good to explicitly differentiate between InferenceChecker and ConsistencyChecker; naming the module checkers makes this ambiguous

@maartenflippo maartenflippo force-pushed the feat/propagation-checkers branch from 04d580a to 9a528c3 Compare March 3, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants