PublicShow sourceprolog_jiti.pl -- Just In Time Indexing (JITI) utilities

This module provides utilities to examine just-in-time indexes created by the system and can help diagnosing space and performance issues.

To be done
- Use print_message/2 and dynamically figure out the column width.
Source jiti_list is det
Source jiti_list(:Spec) is det
List the JITI (Just In Time Indexes) of selected predicates. The predicate jiti_list/0 list all just-in-time indexed predicates. The predicate jiti_list/1 takes one of the patterns below. All parts except for Name can be variables. The last pattern takes an arbitrary number of arguments.

The columns use the following notation:

Source jiti_suggest_modes is det
Source jiti_suggest_modes(:Spec) is det
Propose modes for the predicates referenced by Spec. This utility may be executed after a clean load of your program and after running the program. It searches for static predicates that have been called and (thus) have been examined for candidate indexes. If candidate indexes have not been materialized this implies that the predicate was never called with a nonvar value for the corresponding argument. Adding a mode/1 declaration may be used to inform the system thereof. The system will never examine arguments for indexing that have been declared as mode -.

Note: This predicate merely detects that some predicate is never called with instantiated specific arguments during this run. The user should verify whether the suggested - arguments are correct and typically complete the mode by changing ? into + (or -) where applicable. Currently, in SWI-Prolog, mode/1 declarations have no effect on the semantics of the code. In particular, a predicate that declares some argument as - may be called with this argument instantiated. This may change in the future.

Arguments:
Spec- uses the same conventions as jiti_list/1.

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source jiti_list is det
Source jiti_list(:Spec) is det
List the JITI (Just In Time Indexes) of selected predicates. The predicate jiti_list/0 list all just-in-time indexed predicates. The predicate jiti_list/1 takes one of the patterns below. All parts except for Name can be variables. The last pattern takes an arbitrary number of arguments.

The columns use the following notation:

Source jiti_suggest_modes is det
Source jiti_suggest_modes(:Spec) is det
Propose modes for the predicates referenced by Spec. This utility may be executed after a clean load of your program and after running the program. It searches for static predicates that have been called and (thus) have been examined for candidate indexes. If candidate indexes have not been materialized this implies that the predicate was never called with a nonvar value for the corresponding argument. Adding a mode/1 declaration may be used to inform the system thereof. The system will never examine arguments for indexing that have been declared as mode -.

Note: This predicate merely detects that some predicate is never called with instantiated specific arguments during this run. The user should verify whether the suggested - arguments are correct and typically complete the mode by changing ? into + (or -) where applicable. Currently, in SWI-Prolog, mode/1 declarations have no effect on the semantics of the code. In particular, a predicate that declares some argument as - may be called with this argument instantiated. This may change in the future.

Arguments:
Spec- uses the same conventions as jiti_list/1.