sb_assert Stateful, backtrackable assertions in SWI-Prolog. This uses the CHR store to persist state (aka logic variables) in assertions. There may be bugs! To install: $ swipl pack install sb_assert See the tests for examples.