Question about demons

From: Ulrich Scholz <scholz_at_informatik.tu-darmstadt.de>
Date: Fri 14 Jan 2005 01:41:39 PM GMT
Message-ID: <20050114144139.A3781@informatik.tu-darmstadt.de>
The user manual suggests the following method to initiate demons:

% A demon that wakes whenever X becomes more constrained
report(X) :-
      suspend(report(X, Susp), 1, X->constrained, Susp).

:- demon(report/2).
report(X, _Susp) :-
      ( var(X) ->
          writeln(constrained(X)) % implicitly re-suspend
;
          writeln(instantiated(X)),
          kill_suspension(Susp) % remove from the resolvent
).


Is there a way to communicate some information to report/2 at the time of
initiation, e.g., some string or a handle of a shelf?


Thank you for your answers,

Uli
-- 
Ulrich Scholz

scholz@informatik.tu-darmstadt.de
http://www.intellektik.informatik.tu-darmstadt.de/~scholz
Received on Fri Jan 14 15:07:24 2005

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