From: David W. <wa...@cs...> - 2005-04-18 21:08:52
|
Hi Bart, Thanks! Bart Demoen writes: > Here is the diagnosis and the cure :-) > ... > Now the cure: new code for first clause of process_query: > > process_query1(X, []) :- %% no printable variables appeared in the input > !, > call_query(X), > close_open_tables, > dummy, > !, > file_nl(STDFDBK), file_write(STDFDBK, yes), file_nl(STDFDBK), > fail. > > and add a dummy definition for the predicate dummy/0: > > dummy. We have an instruction, check_interrupts, which is exactly a WAM call to true, which is what you have here. The difficulty is that to handle interrupts (as XSB does), the WAM must be in a "calling" state, so it would not easy to add interrupt handling to cut, as you noted. The intermediate solution would be to add the "handle_interrupts" instruction before all cuts, though that would be somewhat costly. I think for now we'll stay with your solution. Thanks very much for tracking this down and fixing it for us! Best regards, -David |