[gecode-users] Watching Propagators

Guido Tack tack at gecode.org
Mon Jun 20 10:40:32 CEST 2011


Hi Max,

there's no way to implement what you want without modifying either the Gecode kernel or all the propagators that are supposed to record that information.  In order to watch propagation, you'd have to modify the Space::status function (the main propagation loop), or each individual propagate function (because only the individual propagators actually have access to their variables, the Gecode kernel doesn't really know about them).
Because of rewriting (replacing propagators at runtime), this is a pretty intrusive change, but not impossible to do.

The second complication, as far as I can see, is that the order in which variables are modified can be quite important.  In a trailing-based system, this order is recorded automatically on the trail.  In a copying system such as Gecode, you'd have to record the order yourself, essentially implementing an additional trail.  This is why it probably makes much more sense to start from a trailing system in the first place.

Cheers,
	Guido

On 20 Jun 2011, at 10:05, Max Ostrowski wrote:

> Sorry for reposting, i already asked this question 2 years ago, but now i managed to read more of the manual and my questions will be more refined.
> 
> For each constraint that i post, i want to find out which variables are propagated by the corresponding propagator.
> Also the ordering would be interesting. I need this to build an SMT like System, to generate a "reason" why a certain reified constraint became true/false.
> 
> So can i somehow "watch" the propagate function, testing if the subscribed variables are pruned?
> 
> I first thought of "copying" the post functions of Gecode and implementing a "wrapper" propagator that wraps around the functions.
> But i think this will not do the work, as propagators can be disposed and replaced at runtime, right ?
> 
> 
> Do you have any other idea how i can find out which constraint is responsible for pruning the search space?
> I want to avoid to modify Gecode, as i want to stay up to date.
> This is also the reason why i do not simply want to copy all propagators to implement BookKeeping myself.
> 
> Best,
> Max
> -- 
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/








More information about the users mailing list