Part 1: Overview of CP, Filtering, Search, Consistency, Fix-point

We propose a set of exercises to extend Mini-CP with useful features. By doing these exercises you will gradually progress in your understanding of CP. For each exercise, we ask you to implement JUnit tests to make sure that your implementation works as expected. If you don’t test each feature independently you take the risk to loose a lot of time finding very difficult bugs.

We ask you not to publish your solutions on a public repository. The instructors interested to get the source-code of the solutions can contact us.

Theoretical questions

Forking Mini-CP to do the programming exercices

Follow this tutorial then clone your repository.

Then, follow this tutorial to import it in your IDE.

Less or equal reified constraint


This is a reified constraint for b iff x <= c that is boolean variable b is set true if and only if x variable is less or equal to value c.

For example the constraint holds for

b = true , x = 4, c = 5
b = false, x = 4, c = 2

but is violated for

b = true , x = 5, c = 4
b = false, x = 2, c = 4

Check that your implementation passes the tests