[ANN] CloCoP - constraint programming for Clojure

473 views
Skip to first unread message

Alex Engelberg

unread,
Sep 9, 2013, 9:39:46 PM9/9/13
to clo...@googlegroups.com
http://github.com/aengelberg/clocop

CloCoP is a Clojure wrapper of the Java library JaCoP. The acronyms stand for "Clojure/Java Constraint Programming". This invites comparison to the core.logic library, and you may wonder why we need both. There are a few ways in which, in my opinion, the JaCoP system is better than core.logic:
  • JaCoP is more "plug-in-able," with an extensive set of customizations to the way that the search operates. There are interfaces for different components of the search, and each has several implementations.
  • I found that with core.logic, I was somewhat limited by the set of available constraints. JaCoP has many different constraints that seem to more suit my needs for solving challenging problems.
  • As the core.logic people say, JaCoP is anywhere from 10X-100X faster than core.logic at solving Finite Domain problems.
JaCoP has a lot of "global constraints" which are very powerful and essential for describing certain problems. As Radoslaw Szymanek (an author of JaCoP) says, "CP without global constraints is just [a] plain academic toy. Using problems with arithmetic constraints is doing CP bad publicity."

If you'd like to see implementations of sample problems in CloCoP, check out the test cases (https://github.com/aengelberg/clocop/tree/master/test/clocop).

David Nolen

unread,
Sep 10, 2013, 1:59:10 AM9/10/13
to clojure
Nice work! :)


--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

sesm

unread,
Sep 11, 2013, 4:47:44 PM9/11/13
to clo...@googlegroups.com
Great stuff!
Unfortunately, README doesn't say anything about license and contributing, so I've sent a pull request to check it :) If you accept contributing tests/examples, I would send a lot more.

вторник, 10 сентября 2013 г., 5:39:46 UTC+4 пользователь Alex Engelberg написал:

Alex Engelberg

unread,
Sep 12, 2013, 4:21:11 PM9/12/13
to clo...@googlegroups.com
It's under the Eclipse Public License (as stated in project.clj), with pull requests welcome. I just added the license info to the Readme as well. Sorry about the confusion.

I've also created a 0.2.1 branch (without any changes yet) for people to pull-request new features into. (Though if you're just submitting examples/tests, the master branch is fine.)

Thanks,
--Alex

Daniel Jomphe

unread,
Sep 13, 2013, 12:03:02 AM9/13/13
to clo...@googlegroups.com
So then you'd also need a 0.3.0 branch to allow people to pull-request new features and/or breaking changes, since those things are not semantically ok to do in a patch release (the 1 in 0.2.1).

Of course there are many other ways to look at this workflow thing around pull requests, versioning and etc. I hope my tone felt helpful. :)

Dmitry Groshev

unread,
Sep 13, 2013, 3:32:31 AM9/13/13
to clo...@googlegroups.com
Great stuff!

I'm wondering what's the "realworld" difference between JaCoP and CHOCO. Why did you choose the former?

Alex Engelberg

unread,
Sep 13, 2013, 12:06:06 PM9/13/13
to clo...@googlegroups.com
To Daniel's comment: that's a great idea (I'm sorta new to this whole releasing-a-library thing so I didn't think of that), and I'll definitely make a branch for that if I think of a big idea that I want to implement that involves breaking changes. But I figure that if someone other than me thinks of something like that, we'll probably discuss it a bit and figure something out (rather than just showing up with a pull request).

To Dmitry's comment: I've actually never tried Choco, I essentially chose JaCoP because it occured first in my "Java Constraint Programming" google search. Now I'm seeing that a lot of constraint programmers use Choco, and I'll try it out. I will point out that JaCoP walked away with some bronze and silver medals (with Gecode getting ALL the golds) at the FlatZinc challenge. (Choco didn't compete at all, though.)
Reply all
Reply to author
Forward
0 new messages