Semi-deterministic predicates are predicates that either fail or
succeed exactly once and, for well behaved predicates, leave no
choicepoints. Testing such predicates is the same as testing
deterministic predicates. Negative tests must be specified using the
fail or by negating the body using
test(is_set) :- \+ is_set([a,a]). test(is_set, [fail]) :- is_set([a,a]).