Poirot is a Scala front-end for the JaCoP constraints solver library. It was originally based on the Scala DSL included with JaCoP, written and (C)opyright by Krzysztof Kuchcinski and Radoslaw Szymanek. All modifications and new interface (C)opyright 2013–2016 by Hanns Holger Rutz. All rights reserved.
Poirot is released under the GNU Affero General Public License
and comes with absolutely no warranties. Please see the JaCoP
website for supplementary AGPL terms. To contact the author, send an email to
contact at sciss.de
To use this project as a library, use the following artifact:
"de.sciss" %% "poirot" % v
The current version
This project currently builds with sbt 0.13 against Scala 2.11 and 2.10. It requires the JaCoP 3.4.0 artifact published under
de.sciss group ID. It should be automatically retrieved from Maven Central.
To compile, use
sbt compile, for the API docs
sbt doc, to jump into a REPL
Please see the file CONTRIBUTING.md
differences to the original Scala DSL
- You must use an implicit instance of
- Operators follow standard Scala naming, e.g.
xorfor boolean combinators
- Standard Scala style, e.g. argument names, camel case etc.; more consistent use of empty parens
- Removing unnecessary things such as
- Removing global state when possible
## getting started
You need evidence of a
Model instance for most operations. Constraints are automatically posted to that model.
Examples are provided in the test directory, you can selectively run them via
sbt test:run. If you write small
self containing problems, you may mix in the
Problem trait which provides exactly one model (store).
For example, have a look at the standard n-Queens problem,
I am currently figuring out how to best handle the syntax. No all methods from the original Scala DSL are implemented.
I have only worked with int and boolean variables, so pretty much everything regarding
Network is not tested or cleaned up.