A.7 library(check): Consistency checking
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(check): 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
    • Packages
Availability::- use_module(library(check)).
Source[nondet,multifile]checker(:Goal, +Message:text)
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,_)).