[gecode-users] Interfacing GeCode to ECLiPSe

Guido Tack tack at ps.uni-sb.de
Wed Jan 21 15:07:36 CET 2009


Hi Kish.

Kish Shen wrote:
> We have been thinking about developing an interface to GeCode for the
> Constraint Logic Programming language ECLiPSe for a while now, and
> finally I can devote some time and resource to this.
>
> The idea is to provide an alternative FD solver for ECLiPSe, in  
> addition
> to the existing native FD solver(s) already available.
>
> I have been looking at the available documentation, which seems to be
> mostly documentation for the procedures. I am wondering if there are
> more documentations available, especially for the purpose of  
> interfacing
> to other languages.

No, there's (currently) no such documentation.  Most of the interfaces  
to Gecode use some kind of interface generator, like swig for the Java  
interface, which basically takes the C++ header files and generates  
the interfacing code.

However, interfacing is not so much different from programming models  
directly in C++.  You have to provide ways to construct a space and  
variables, and the post functions for constraints and branchings.

Alternatively, you can use the reflection API for interfacing (as done  
in gecode/serialization/javascript.{hh,cpp} and examples/ 
javascript.cpp), which has the advantage that the necessary interface  
is much smaller.

> What I would like to do is to provide both a black-box search, i.e.
> with the constraints posted by ECLiPSe to GeCode, and then the GeCode
> search invoked. Secondly, I would like to do the search in ECLiPSe,  
> with
> GeCode doing the propagation. Do you think these are sensible  
> approaches?

Yes, that's should be doable.  In particular the black-box approach  
should work easily.  The interaction with the ECLiPSe search should  
also be doable, but requires a little more engineering, I guess.

Cheers,
	Guido





More information about the gecode-users mailing list