| Did you know ... | Search Documentation: |
| Accessing the IDE from your program |
Over the years a collection of IDE components have been developed, each with its own interface. In addition, some of these components require each other, and loading IDE components must be on demand to avoid the IDE being part of a saved state (see qsave_program/2). For this reason, access to the IDE is concentrated on a single interface called prolog_ide/1:
@prolog_ide. Action is
one of the following:
sdg_viewer).p(+,-), as a box holding
them; the popup of any predicate does so as well. A node
... N more stands for relatives that are not shown; its popup
shows them all. The popup of a predicate or call pattern can show its
variants with their number of answers in a pane of their own, ten at a
time, filtered on their text and on having answers. Selecting a variant
shows its answers, where undefined answers are marked as such; they have
a filter of their own. This pane is reused for the next predicate unless
it is pinned. The Overview tab shows the graph by module and, for
the non-modular code in user, by file; clicking a group
shows it as a box holding its parts. Predicates and nodes that hold
invalid tables are shown in red. The browser shows the incremental
dynamic predicates in italics. Requires Graphviz.main): the subgoal dependency graph (SDG) that tells why a
tabled computation does not complete. At the level of variants the
tables are shown in boxes for their strongly connected components
(SCCs), nested as the SCCs are; at the level of predicates, used by
default for more than 60 tables, clicking a predicate shows its tables.
An edge from a table to another says that the first waits for answers of
the second; edges of tnot/1
are red and dashed. Tables grow with their number of answers, the leader
of an SCC has a double outline, a table with work left a thick one and
one with conditional answers is yellow. The thread is interrupted using call_in_thread/3
to read its tables. The viewer is in the Tabling submenu of the
Debug menu and in the popup of the thread monitor. It also opens
if a break starts while the thread has incomplete tables, such as a
break of a tripwire (see section
7.11) with action
suspend, unless the setting prolog_ide.tables_on_break
is false. Requires Graphviz.library(debug) library
that provides an overview of the topics and catches messages.