4.1.3 Predicate behaviour and determinism
To describe the general behaviour of a predicate, the following vocabulary is employed. In source code, structured comments contain the corresponding keywords:
det | A deterministic predicate always succeeds exactly once and does not leave a choicepoint. |
semidet | A semi-deterministic predicate succeeds at most once. If it succeeds it does not leave a choicepoint. |
nondet | A non-deterministic predicate is the most general case and no claims are made on the number of solutions (which may be zero, i.e., the predicate may fail) and whether or not the predicate leaves an choicepoint on the last solution. |
nondet | As nondet , but
succeeds at least once. |