| Did you know ... | Search Documentation: |
| Pack scasp -- doc/Tricks.md |
swipl prolog/scasp/main.pl -- [scasp-options] test/programs/familty.pl swipl test/test_scasp.pl -- [test options] [dir ...] [file ...]
swipl -l prolog/scasp/main.pl -- [scasp options and program] <prepare debugging> ?- scasp_main:main.
gspy/1 starts the graphical debugger. The argument is flexible. If no module is specified a spy point is set on any matching predicate in any module. Likewise if the arity is omitted all existing arities are used.
swipl -l prolog/scasp/main.pl -- test/programs/family.pl ?- gspy(solve/4). ?- scasp_main:main.
Just edit the source code and add e.g. This traps the (graphical)
debugger at this point, whether running in debug mode or not. Often
better to start the program in debug mode (after ?- debug.).
( my_condition -> gtrace ; true )
?- gtrace, goal.)error(_,_) as "Trace always".The run collects errors that happen during the executions. You can reorder the patterns and tell which ones you want to trap (first match counts).
?- gtrap(_). ?- scasp_main:main.
The argument to gtrap/1 is the formal part of the
error(Formal,ImplDep) term. Thus, to trap only instantiation errors use:
?- gtrap(instantiation_error).
After edit, run make/0. This reloads modified files and does a quick search for undefined predicates and their call sites.
?- make.
Create annotated coverage file in dir (default cov). Requires 8.3.27
or later.
swipl test/test_scasp.pl --cov=dir test/programs/family.pl
swipl -l prolog/scasp/main.pl -- test/programs/family.pl ?- profile(scasp_main:main).
swipl -l prolog/scasp/main.pl ?- gxref.
swipl --pldoc -l prolog/scasp/main.pl
(better from the prolog/scasp dir as you get the files from the
current dir rather than the main README.md as entry point).