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 
option
fail or by negating the body using \+/1.
test(is_set) :-
        \+ is_set([a,a]).
test(is_set, [fail]) :-
        is_set([a,a]).