7.11 Tabling restraints: bounded rationality and tripwires
All Application Manual Name SummaryHelp

  • 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
          • Restraint incomplete tables
    • Packages

7.11.4 Restraint incomplete tables

A computation that keeps creating new tables before the old ones complete, e.g., calling variants on ever growing terms, may grow the number of incomplete tables or the size of their SCC without bound. The Prolog flag max_incomplete_subgoals limits the number of incomplete tables of a thread: if a new table would exceed it, the tripwire max_incomplete_subgoals is trapped with the predicate as context. The flag max_scc_subgoals limits the number of tables in an SCC: if a call merges SCCs into one that exceeds it, the tripwire max_scc_subgoals is trapped with the table of the call as context. These restraints only support the tripwire actions error, warning and suspend, set by the flags max_incomplete_subgoals_action and max_scc_subgoals_action. With the action suspend and the IDE loaded, the break shows the incomplete tables (see sdg_viewer in section 3.8).