I’m exploring Prolog predicate determinism. Does the community agree on the definitions for ‘semidet’ (at most one success without leaving choice points) and ‘det’? Example below:
unique_outcome(Entry) :- process_entry(Entry, Outcome), Outcome \= alternative.
Based on my experience working with Prolog, I’ve noticed that while many in the community tend to use semidet to imply that a predicate has at most one solution without leaving any choice points, there is still some flexible usage of the term. I encountered slight inconsistencies in some textbooks versus real-world projects where semidet predicates could even be seen as functions that guarantee a single outcome, either failing or succeeding once. In practice, being explicit about the intent in documentation helps clear up any ambiguity regarding semidet versus det.