Run-Time Checking of Assertions for SWI-Prolog


To install the Run-Time checker of assertions, just follow the next sequence of commands in your SWI-Prolog shell:

  $ swipl
  ?- pack_install('https://github.com/edisonm/rtchecks.git').

Based on the run-time checker of Ciao Prolog.

The semantic of run-time checks is explained in the paper, although is out of date:



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:

Prolog files

examples/rtc_external.plShow source
examples/rtchecks_disc.plShow source
examples/rtchecks_example.plShow source
examples/rtchecks_example2.plShow source
examples/rtchecks_example3.plShow source
examples/rtpred1.plShow source
pack.plShow source
prolog/applicable_assertions.plShow source
applicable_assertions/3For a given Call, AsrGlobL gives the applicable assertions with global properties and AsrSuccL gives the applicable assertions with success properties.Source
prolog/ctrtchecks.plShow source
prolog/rtchecks.plShow source
rename_predicate/2Hook into term_expansion for post processing renaming of the generated predicate.Source
safe_directive/1Allow rtchecks directives that affect locally defined predicates.Source
prolog/rtchecks_flags.plShow source
prolog/rtchecks_rt.pl  -- Predicates that are required to implement run-time checksShow source
prolog/rtchecks_tracer.plShow source
prolog/rtchecks_tracer_rt.plShow source
prolog/rtchecks_utils.pl  -- Useful predicates to facilitate work with run-time checks.Show source
handle_rtcheck/1Predicate that processes a rtcheck exception.Source
prolog/rtcprops.plShow source