/usr/local/lib/swipl/library/check.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl -- Setting management
      • arithmetic.pl -- Extensible arithmetic
      • main.pl
      • readutil.pl
      • operators.pl -- Manage operators
      • pairs.pl -- Operations on key-value lists
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl -- Modify solution sequences
      • ordsets.pl
      • random.pl
      • base64.pl
      • aggregate.pl
      • yall.pl
      • sandbox.pl -- Sandboxed Prolog code
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl -- Analyse format specifications
      • predicate_options.pl
      • csv.pl
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl -- Graph manipulation library
      • url.pl -- Analysing and constructing URL
      • www_browser.pl -- Open a URL in the users browser
      • prolog_pack.pl
      • git.pl
      • utf8.pl -- UTF-8 encoding/decoding on lists of character codes.
      • dialect.pl
      • system.pl -- System utilities
      • terms.pl -- Term manipulation
      • date.pl -- Process dates and times
      • persistency.pl
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl -- Well Founded Semantics interface
      • prolog_code.pl -- Utilities for reasoning about code
      • sort.pl
      • dicts.pl
      • dif.pl -- The dif/2 constraint
      • varnumbers.pl
      • pio.pl -- Pure I/O
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • backcomp.pl
      • shell.pl
      • base32.pl
      • charsio.pl -- I/O on Lists of Character Codes
      • codesio.pl
      • coinduction.pl
      • heaps.pl
      • rbtrees.pl
      • statistics.pl
      • when.pl
      • edit.pl -- Editor interface
      • prolog_profile.pl
      • threadutil.pl -- Interactive thread utilities
      • files.pl
      • strings.pl
      • check.pl -- Consistency checking
        • check/0
        • list_undefined/0
        • list_undefined/1
        • list_autoload/0
        • list_redefined/0
        • list_cross_module_calls/0
        • list_void_declarations/0
        • list_trivial_fails/0
        • list_trivial_fails/1
        • trivial_fail_goal/1
        • list_strings/0
        • list_strings/1
        • list_rationals/0
        • list_rationals/1
        • list_format_errors/0
        • list_format_errors/1
        • string_predicate/1
        • valid_string_goal/1
        • checker/2
      • tables.pl -- XSB interface to tables
      • prolog_trace.pl
      • prolog_debug.pl
      • thread.pl -- High level thread primitives
      • prolog_jiti.pl
      • listing.pl
      • prolog_history.pl -- Per-directory persistent commandline history
      • prolog_config.pl
      • ctypes.pl -- Character code classification
      • prolog_codewalk.pl -- Prolog code walker
      • hashtable.pl
      • writef.pl
      • help.pl
      • quintus.pl -- Quintus compatibility
      • zip.pl
      • nb_set.pl -- Non-backtrackable sets
      • increval.pl
      • fastrw.pl
      • optparse.pl -- command line parsing
      • prolog_coverage.pl
      • prolog_wrap.pl
      • qsave.pl -- Save current program as a state or executable
      • explain.pl
      • portray_text.pl
      • macros.pl -- Macro expansion
      • intercept.pl -- Intercept and signal interface
      • prolog_metainference.pl -- Infer meta-predicate properties
      • streams.pl
      • tty.pl
      • exceptions.pl
      • make.pl
      • prolog_autoload.pl -- Autoload all dependencies
      • readln.pl
      • rwlocks.pl
 checker(:Goal, +Message:text) is nondet[multifile, library(check)]
Register code validation routines. Each clause defines a Goal which performs a consistency check executed by check/0. Message is a short description of the check. For example, assuming the my_checks module defines a predicate list_format_mistakes/0:
:- multifile check:checker/2.
check:checker(my_checks:list_format_mistakes,
              "errors with format/2 arguments").

The predicate is dynamic, so you can disable checks with retract/1. For example, to stop reporting redefined predicates:

retract(check:checker(list_redefined,_)).