Hi guys,
I've got a bit of a problem with aborting computations. It only appears to work once, then if I re-run the computation I can't abort it and have to kill the ciao process. Take the following example:
nzeros( 0,[]). nzeros( N,[0|Zs] ) :- NN is N-1, nzeros( NN,Zs ).
So this code has a bug in that the first and second instances of the predicate don't have mutually exclusive guards. If I ask it to generate a list in the ciao shell: :- nzeros(5,X).
I get the correct answer first, and then ask it to backtrack at which point ciao correctly goes into an infinite loop trying the second call to nzeros with negative values of N. I can then ^c^c and hit a to abort this.
If I now execute the same call again ':- nzeros(5,x).' and again ask it to backtrack then I can no longer abort the computation. ^c^c is ignored and I get no response, the only way out is to kill the ciao process. Is this a bug in ciao?
Amoss
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------