• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.40 Debugging and declaring determinism
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Debugging and declaring determinism
          • det/1
          • $/0
          • $/1
    • Packages
Availability:built-in
Source[experimental]$(:Goal)
Verify that Goal succeeds deterministically. This predicate has no effect if Goal succeeds without a choicepoint. Otherwise the result depends on the Prolog flag determinism_error:
silent
Act as once/1.
warning
Print a warning and act as once/1.
error
Raise a determinism_error exception.

Note that if $/1 is used for the last call, last call optimization is not effective. This behaviour ensures consistent errors or warnings. Last call optimization with determinism checking can be realised using ..., $, Last., i.e. by executing $/0 before the last call rather than wrapping the last call in $/1.

Violations throw an error/2 exception determinism_error(Pred, Declared, Observed, goal).

ClioPatria (version V3.1.1-51-ga0b30a5)