[gecode-users] Gecode/J New users

Malcolm Ryan malcolmr at cse.unsw.edu.au
Fri Nov 2 09:36:07 CET 2007


Thanks Guido for you prompt reply. I'm starting to find my way  
around. I've been reading through the Gecode class, you have by far  
the most complete set of constraints that I've seen in any of the  
libraries I've looked at! Although some are a little counter-intuitive.

Am I right in thinking that if I want to say: x in s for intvar x and  
setvar s, I do:

Gecode.rel(list, x, SetRelType.SRT_SUB, s);

and if x is a constant int, I do:

Gecode.dom(this, s, SetRelType.SRT_SUP, x);

Is that right?

More below....

>> 3) Do you have any means to label constraints with meaningful tags
>> for debugging?
>
> No, that's currently not possible.  What kind of information would  
> you like to attach to a constraint? We are currently integrating  
> reflection capabilities into the C++ base library, which might  
> eventually also become available in Java.

I just want to attach strings that are names decribing the semantic  
intent of the constraint, for debugging. What kind of debugging  
support do you have? Can I trace the constraints as they propagate?

Ultimately, it would be nice to be able to attach a Java StackTrace  
to each constraint, recording the context in which it was posted. If  
these could be examined as the constraints propagated, it would be  
possible to build a tracing tool which showed _in_the_code_ which  
constraints are executing. That would enable you to build an  
interactive debugging tool much like a traditional execution tracer.

>> 5) Is this project actively used and supported?
>
> Yes, it is.  It hasn't seen an update in quite a while because we  
> are busy preparing the next major version (2.0.0), which should be  
> available within the next month.  We are actively using it mainly  
> for teaching CP courses, here at Saarland University and at KTH,  
> and some other universities.

Excellent news.

Malcolm

--
       "An inconvenience is only an adventure wrongly considered;
        an adventure is an inconvenience rightly considered."
                 - G.K.Chesterton, On Running After Ones Hat







More information about the gecode-users mailing list