This document is made for anyone who wants to learn constraint programming using Mini-CP as a support.

This tutorial will continuously evolve. Don’t hesitate to give us feedback or suggestions for improvement. You are also welcome to report any mistake or bug.

What is Mini-CP

The success of the MiniSAT solver has largely contributed to the dissemination of (CDCL) SAT solvers. The MiniSAT solver has a neat and minimalist architecture that is well documented. We believe the CP community is currently missing such a solver that would permit newcomers to demystify the internals of CP technology. We introduce Mini-CP, a white-box bottom-up teaching framework for CP implemented in Java. Mini-CP is voluntarily missing many features that you would find in a commercial or complete open-source solver. The implementation, although inspired by state-of-the-art solvers, is not focused on efficiency but rather on readability to convey the concepts as clearly as possible. Mini-CP is small and well tested.


The Javadoc API.

Install Mini-CP

Mini-CP source-code is available from bitbucket.

Using an IDE

We recommend using IntelliJ or Eclipse.

From IntelliJ you can import the project:

Open > (select pom.xml in the minicp directory and open as new project)

From Eclipse you can import the project:

Import > Maven > Existing Maven Projects (select minicp directory)

From the command line

Using maven command line you can do:

$mvn compile # compile all the project
$mvn test    # run all the test suite

Some other useful commands:

$mvn checkstyle:checktyle   # generates a report in target/site/checkstyle.html
$mvn findbugs:gui           # opens a gui with potential source of bugs in your code
$mvn jacoco:report          # creates a cover report in target/site/jacoco/index.html
$mvn javadoc:javadoc        # creates javadoc in target/site/apidocs/index.html

Getting Help with Mini-CP

You’ll get the greatest chance of getting answers to your questions by using the Mini-CP usergroup.

Who uses Mini-CP

If you use it for teaching or for research, please let us know and we will add you in this list.

  • UCLouvain, INGI2365 Teacher: Pierre Schaus.
  • ACP, Summer School 2017, Porquerolles, France, Teacher: Pierre Schaus.
  • Université de Nice Master in CS Teacher: Arnaud Malapert and Marie Pelleau

Citing Mini-CP

If you find Mini-CP useful for your research or teaching you can cite:

        Author = {Michel, L. and Schaus, P. and Van Hentenryck, P.},
        Doi = {10.1007/s12532-020-00190-7},
        Id = {Michel2021},
        Isbn = {1867-2957},
        Journal = {Mathematical Programming Computation},
        Number = {1},
        Pages = {133-184},
        Title = {MiniCP : a lightweight solver for constraint programming},
        Ty = {JOUR},
        Url = {},
        Volume = {13},
        Year = {2021}}