
% The parent transaction simply executes three non-interacting processes
% concurrently, where each process is a sequence of three tasks.  The
% program seq(parent,fail) will force all possible interleavings to be
% generated.


trans(parent) :- conc(process(a),conc(process(b),process(c))).

trans(process(I)) :- seq(task(I,1),seq(task(I,2),task(I,3))).

trans(task(I,J)) :- monitor(task(I,J)).


% These dummy rules let Prolog know that the predicates parent/0,
% process/1 and task/2 are defined.
%
parent :- fail.
process(dummy) :- fail.
task(dummy,dummy) :- fail.
