Failing on event occurence

From: Loizos Michael <gemichael_at_cytanet.com.cy>
Date: Fri 02 Nov 2001 04:48:27 PM GMT
Message-Id: <200111021647.fA2GlsX07414@demokritos.cytanet.com.cy>
Hello,

I need some help on the following issue. I have a piece of code like:

start:-
  set_event_handler(too_long, stop_execution/0),
  event_after(too_long, 100),
  compute,
  cancel_after_event(too_long).

where "compute" is a predicate that may take a long time to execute. So I
use an event that is triggered 100 secs after the invokation of "compute"
and the predicate "stop_execution" is called.

Now the problem is this: How do I define "stop_execution" and what other
changes might be needed, in order to make the computation behave as if
"compute" failed? I do not need the whole execution to be terminated, I
just need the program to "act as if" the "compute" predicate naturally
failed and backtrack.

Thanks for any suggestions,
Loizos Michael



_________________________________________
Loizos Michael (gemichael@cytanet.com.cy)
Received on Fri Nov 02 16:49:10 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:11 PM GMT GMT