Properties related to side effects

These properties are part of the native_props library.

Usage and interface

  • Library usage:
    :- use_module(library(assertions/native_props))

    or also as a package :- use_package(nativeprops).

    Note the slightly different names of the library and the package.

  • Exports:

Documentation on exports

Usage:sideff_pure(X)

X is pure, i.e., has no side-effects.

  • The following properties should hold globally:
    (basic_props:no_rtcheck/1)sideff_pure(X) is not checked during run-time checking.
Meta-predicate with arguments: sideff_pure(goal).

Usage:sideff_soft(X)

X has soft side-effects, i.e., those not affecting program execution (e.g., input/output).

  • The following properties should hold globally:
    (basic_props:no_rtcheck/1)sideff_soft(X) is not checked during run-time checking.
Meta-predicate with arguments: sideff_soft(goal).

Usage:sideff_hard(X)

X has hard side-effects, i.e., those that might affect program execution (e.g., assert/retract).

  • The following properties should hold globally:
    (basic_props:no_rtcheck/1)sideff_hard(X) is not checked during run-time checking.
Meta-predicate with arguments: sideff_hard(goal).

Documentation on imports

This module has the following direct dependencies: