<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
% Use logical disjunction to choose between two sequential processes.
% To see the backtracking, execute the program seq(choose,fail).
%
trans(choose) :- or(seq(monitor(a1),
                     seq(monitor(a2),
                          monitor(a3))),
                    seq(monitor(b1),
                     seq(monitor(b2),
                          monitor(b3)))).

% The following dummy rule tells Prolog that the predicate choose/0 is
% defined.
%
choose :- fail.
</pre></body></html>