7.10 Tabling restraints: bounded rationality and tripwires
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Tabled execution (SLG resolution)
        • Tabling restraints: bounded rationality and tripwires
          • tripwire/2
          • size_abstract_term/3
          • radial_restraint/0
          • Restraint subgoal size
          • Restraint answer size
          • Restraint answer count
    • Packages
[multifile]prolog:tripwire(Wire, Context)
Called when tripwire Wire is trapped. Context provides additional context for interpreting the tripwire. The hook can take one of three actions:

  • Succeed. In this case the tripwire is considered handled and execution proceeds as if there was no tripwire. Note that tripwires only trigger at the exact value, which implies that a wire on a count will be triggered only once. The hook can install a new tripwire at a higher count.
  • Fail. In this case the default action is taken.
  • Throw an exception. Exceptions are propagated normally.