Atomic goal formula A means resource consumption and program invocation. All possibilities are examined by backtracking. For example, the following program displays 1 and 2.
r(2). ?- !r(1) -<> r(X), write(X), nl, fail.
In goal formula , resources are copied before execution, and the same resources should be consumed in and . The following query succeeds by letting and , or and , because r(X) and r(Y) should consume the same resources.
?- (r(1), r(2)) -<> ((r(X) & r(Y)), r(Z)).
Goal formula is just like G, but only infinite resources can be consumed during the execution of G. The following query succeeds by letting and .
?- (!r(1), r(2)) -<> (!r(X), r(Y)).
Goal formula top means the erasure of remaining resources. In the following queries, the first one succeeds, but the second one fails because there is a remaining resource.
?- (r(1), r(2)) -<> (r(X), top). ?- (r(1), r(2)) -<> r(X).