(0) Obligation:
Clauses:
bin_tree(void).
bin_tree(T) :- ','(no(empty(T)), ','(left(T, L), ','(right(T, R), ','(bin_tree(L), bin_tree(R))))).
left(void, void).
left(tree(X1, L, X2), L).
right(void, void).
right(tree(X3, X4, R), R).
empty(void).
no(X) :- ','(X, ','(!, failure(a))).
no(X5).
failure(b).
Queries:
bin_tree(g).
(1) CutEliminatorProof (SOUND transformation)
Eliminated all cuts by simply ignoring them[PROLOG].
(2) Obligation:
Clauses:
bin_tree(void).
bin_tree(T) :- ','(no(empty(T)), ','(left(T, L), ','(right(T, R), ','(bin_tree(L), bin_tree(R))))).
left(void, void).
left(tree(X1, L, X2), L).
right(void, void).
right(tree(X3, X4, R), R).
empty(void).
no(X) :- ','(X, failure(a)).
no(X5).
failure(b).
Queries:
bin_tree(g).