A.59 library(tableutil): Table inspection and statistics utilities
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(tableutil): Table inspection and statistics utilities
          • table_statistics/2
          • table_statistics/3
          • table_statistics/0
          • table_statistics/1
          • table_statistics_by_predicate/0
          • table_statistics_by_predicate/1
          • tstat/2
          • tstat/3
          • tdump/0
          • tdump/1
          • tdump/2
          • tidg/0
          • tidg/1
          • summarize_idg/0
          • summarize_idg/1
    • Packages
Availability::- use_module(library(tableutil)).(can be autoloaded)
Sourcetstat(?Value, ?Top)
tstat(?Variant, ?Value, ?Top)
Print the top-N (for positive Top) or bottom-N (for negative Top) for Stat for all tabled subgoals of Variant (or all tabled subgoals for tstat/2). Stat is one of
answers
duplicate_ratio
space_ratio
gen(call)
space
compiled_space
See table_statistics/2.
deadlock
Times this table was involved in a deadlock (cycle of threads waiting for each others table to complete)
wait
Times a thread waited for this table.
variables
The number of variables in the variant. The tabling logic adds a term ret(...) to the table for each answer, where each variable is an argument of the ret(...) term. The arguments are placed in depth-first lef-right order they appear in the variant. Optimal behaviour of the trie is achieved if the variance is as much as possible to the rightmost arguments. Poor allocation shows up as a low space_ratio statistics.

Below are some examples