Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "rtchecks"

Title:Run-Time Checker for Assertions
Rating:Not rated. Create the first rating!
Latest version:0.0.1
SHA1 sum:fa934adcf4e6b4c95038bd2ee38430274cdc9c41
Author:Edison Mera Menendez http://www.edisonm.com/
Maintainer:Edison Mera Menendez http://www.edisonm.com/
Packager:Edison Mera Menendez http://www.edisonm.com/
Home page:https://github.com/edisonm/rtchecks
Download URL:https://github.com/edisonm/rtchecks.git
Requires:assertions

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.0.194917a83c0059fb2ed3584b90142a9c27da277841https://github.com/edisonm/rtchecks.git
9867b86f71e0cdbda67ee6ac7fbd82ce487dba592https://github.com/edisonm/rtchecks.git
53a8bd1326b858b39f6df485935bbe7640a0cf444https://github.com/edisonm/rtchecks.git
d671341e8b29479b8aefcd3e81ccc6156e3eccc33https://github.com/edisonm/rtchecks.git
3be55886858306d88d1a38f9f144a5cb167d03241https://github.com/edisonm/rtchecks.git
e9a4920c62a84dc8b5428aae825a65c05fbd14733https://github.com/edisonm/rtchecks.git
b0fb43fe48939720248e83af6aaea073bf02dc141https://github.com/edisonm/rtchecks.git
a874149f0690d905360ff665b325399a027cca841https://github.com/edisonm/rtchecks.git
8daa9d1c76b8233abc6b03aadf56098071adde311https://github.com/edisonm/rtchecks.git
7f311777e045bc3929673c6df4ed086cf82e9fd71https://github.com/edisonm/rtchecks.git
1f77a83f739b710e47359398802d61e079cbdaf11https://github.com/edisonm/rtchecks.git
77dd8f9d6275336e4d0effc9b0824ae68faf34291https://github.com/edisonm/rtchecks.git
d2d0947528e939dbcb51d3b4fb1112f55004c2251https://github.com/edisonm/rtchecks.git
46624e6b699baf27bf4ae5a45957fa36ad7c10ca1https://github.com/edisonm/rtchecks.git
886dfae030252e670e57d1b5eb9be8332222712a1https://github.com/edisonm/rtchecks.git
fa934adcf4e6b4c95038bd2ee38430274cdc9c411https://github.com/edisonm/rtchecks.git
9714c8856364a90efe5410f6e96bdbec7942f2031https://github.com/edisonm/rtchecks.git
e359ff6d75bc43904484f28722d72ce7b65729c11https://github.com/edisonm/rtchecks.git
5aa7bda06b148eb3dac65649898df3e45d3700713https://github.com/edisonm/rtchecks.git
ccc56d9c11c4b4a7604e1bef71b2a1b99990458d1https://github.com/edisonm/rtchecks.git
1395d309ebff7267788b8030507de8882d345bb31https://github.com/edisonm/rtchecks.git
9b0ffa2c09227deba213b0371738e1ac7c96b4d21https://github.com/edisonm/rtchecks.git
a5b0d1b27e4b2702c4401bb960e14cbd7d4fe4df3https://github.com/edisonm/rtchecks.git
77b4499f4ea0e1df77a678269cba62570525de4e2https://github.com/edisonm/rtchecks.git
92a97fcaeff9d06a70f6387df3a97c4b9d1d666b2https://github.com/edisonm/rtchecks.git
d6fc86cf8ea86ea52e7dff09f4fdea306b43add22https://github.com/edisonm/rtchecks.git
5236b068813a95c8fe3dde011aa08269c7c3d59f4https://github.com/edisonm/rtchecks.git
7218f6a988b30089757ea91ec670411c1b9498bd1https://github.com/edisonm/rtchecks.git
ed56dc8f5aa39517ddc46204d36ed46b49e19ddd1https://github.com/edisonm/rtchecks.git
1886f557590bc9bc73143c4c7797b7b78f27a7bb1https://github.com/edisonm/rtchecks.git
82ad79a00925be9b066880aee5de875c35067dda1https://github.com/edisonm/rtchecks.git
2affbb2404a53133b5af2ac287956770249a73951https://github.com/edisonm/rtchecks.git
19b95cc064ae258ef2598fe17e4837939d8aa15b1https://github.com/edisonm/rtchecks.git

rtchecks

Run-Time Checking of Assertions for SWI-Prolog

Installation

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').
  true.

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:

http://clip.dia.fi.upm.es/papers/assert-lang-disciplbook_bitmap.pdf

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_status Contains a list of the assertion statuses to be checked, could be a list of [true, false, check, debug, static]. Default value is [check, static].
  • rtchecks_static Contains a list of the assertion statuses to be instrumented statically, could be a list of [true, false, check, debug, static]. Default value is [static].
  • 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_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.

    • yes : Raising a run time error will abort the program.
    • no : Raising a run time error will not stop the execution,
      but a message will be shown. Default.

Contents of pack "rtchecks"

Pack contains 18 files holding a total of 60.6K bytes.