Hi Ludovic, On Tue, Jul 26, 2005 at 04:06:52PM +0200, ludovic picouays wrote: > After some tests and verifications about the failure of a predicate > which is wake up by an event (demon/1 and suspend/1) the failure of > this predicate doesn't return a fail to the main program. > > When the domain of a variable is modified by indomain, the associated > event is awakened (I've looked with the tracer what was happening). In > order to say if the modification is valid or not, there are some > verifications. If modifications are not valid, the predicate fails, > and the failure goes back to the wake and not to the indomain. I think > the wake creates another tree where it is the root of another tree. So > when it fail, the main programm doesn't fail and continues to run. It sounds as though your validation predicate (or whatever it is that you suspended) is non-deterministic; after the failure, it tries another clause or alternative, when what you want is for it to fail. Can you try running the suspended predicate directly from the top level, with appropriate arguments, to see what happens? If you're having trouble understanding the behaviour of your program or identifying the source of the non-determinism, you may find it helpful to look at the User Manual chapter on Debugging, if you haven't already (e.g. it explains exactly what "NEXT", "EXIT", "*EXIT", etc. mean). Otherwise, if you're still having problems, can you send a trace of the relevant part of the execution for us to look at? It's a bit hard to figure out based on just your general descriptions. Cheers, WarwickReceived on Tue Jul 26 15:29:55 2005
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:38 PM GMT GMT