Overview

This package provides a complete implementation of run-time checks of predicate
assertions. The program is instrumented to check such assertions at run time, or
during debugging, and any unsatisfied property is reported.

There are two main applications of run-time checks:

To improve debugging of certain predicates, specifying some expected
behavior that is checked at run-time with the assertions.

To avoid manual implementation of checks that should be done in some
predicates, leaving the code clean and understandable.

The run-time checks can be configured using prolog flags. Below we list the
valid prolog flags with its values and a brief explanation of the meaning:

rtchecks_level

exports: Only use rtchecks for external calls of the
exported predicates.

inner : Use also rtchecks for internal calls. Default.

rtchecks_check

no : Disable rtchecks for check assertions.

yes : Enable rtchecks for check assertions. Default.

rtchecks_trust

no : Disable rtchecks for trust assertions.

yes : Enable rtchecks for trust assertions. Default.

rtchecks_entry

no : Disable rtchecks for entry assertions.

yes : Enable rtchecks for entry assertions. Default.

rtchecks_exit

no : Disable rtchecks for exit assertions.

yes : Enable rtchecks for exit assertions. Default.

rtchecks_test

no : Disable rtchecks for test assertions. Default.

yes : Enable rtchecks for test assertions. Used for
debugging purposes, but is better to use the unittest library.

rtchecks_abort_on_error
Controls if run time checks must abort the execution of a program
(by raising an exception), or if the execution of the program have
to continue.

Note that this option only affect the default handler and the
predicate @pred{call_rtc/1}, so if you use your own handler it will
not have effect.