4.1 Notation of Predicate Descriptions
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Notation of Predicate Descriptions
          • The argument mode indicator
          • Predicate indicators
          • Predicate behaviour and determinism
    • Packages

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.
multi As nondet, but succeeds at least once.
undefined Well founded semantics third value. See undefined/0.