[gecode-users] Does Gecode compile to constraint-free code?
Maik Riechert
maik.riechert at arcor.de
Mon Aug 27 22:05:56 CEST 2012
Hi all,
I'm quite new to the whole space of constraint programming and have
recently made use of a finite domain constraint solving framework called
monadiccp [1] for one of my current projects [2]. I measured the
performance and saw that it was ~800x slower than my direct
constraint-free implementation.
The framework also supports Gecode (apart from a pure Haskell
implementation) but after seeing this slowdown I haven't tested it yet
as the C-to-Haskell interfacing probabably also produces some overhead
and I doubt it can get really fast.
I came across the paper "Compiling Constraint Solving using Projection"
from Harvey et al [3] which I find quite promising. In my particular
case I have very few (at the moment two) constraint systems which need
to be solved thousands of times. They have 10-20 constraints and vary
only in their input arguments, i.e. the constraints itself stay the same.
As the solver I use is a runtime solver which reads/simplifies/solves
the whole system over and over, it is slow. The question is: Could the
approach of the paper be used to derive constraint-free equations *once*
and then use those in the actual algorithm? And does Gecode maybe
support that already?
Cheers
Maik
[1] http://hackage.haskell.org/package/monadiccp/
[2]
https://github.com/neothemachine/adp-multi/blob/master/src/ADP/Multi/Rewriting/ConstraintSolver.hs#L213
[3]
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.17.3194&rep=rep1&type=pdf
More information about the users
mailing list