To close a break level and resume the suspended execution, the user can type the the atom end_of_file or the end-of-file character applicable on the system (usually CTRL-d on UNIX systems). Predicate break/0 then succeeds (note in the following example that the calls to break/0 do not succeed), and the execution of the interrupted program is resumed. Alternatively, the suspended execution can be abandoned by calling the standard predicate abort/0, which causes a return to the top level.
An example of break/0 's use is the following:
| ?- break. |
Entering a break closes all incomplete tables (those which may not have a complete set of answers). Closed tables are unaffected, even if the tables were created during the computation for which the break was entered.
Error Cases
An example of prompt/2 's use is the following:
| ?- prompt('Yes master > ', P).
|
As mentioned above, if XSB is configured with the single-threaded engine and is invoked with the '-s' option (see Section 3.7), additional information is printed out about maximum use of each execution stack and table space. However, the '-s' option can substantially slow down the emulator so benchmarks of time should be performed separately from benchmarks of space.
Example: The following printout shows how the statistics/0 output looks if it is invoked with the '-s' option (without it the Maximum stack used, and Maximum table space used lines are not shown). Information about the allocation size is provided since the sizes can be changed through emulator options (see Section 3.7).
| ?- statistics.
Memory (total) 2429504 bytes: 726696 in use, 1702808 free
permanent space 645520 bytes: 645520 in use, 0 free
atom 120328
string 156872
asserted 3184
compiled 358216
other 6920
glob/loc space 786432 bytes: 652 in use, 785780 free
global 456 bytes
local 196 bytes
trail/cp space 786432 bytes: 476 in use, 785956 free
trail 88 bytes
choice point 388 bytes
SLG unific. space 65536 bytes: 0 in use, 65536 free
SLG completion 65536 bytes: 0 in use, 65536 free
SLG table space 80048 bytes: 80048 in use, 0 free
Maximum stack used: global 436724, local 14780, trail 27304, cp 20292,
SLG completion 0 (0 subgoals)
Maximum table space used: 0 bytes
Tabling Operations
0 subsumptive call check/insert ops: 0 producers, 0 variants,
0 properly subsumed (0 table entries), 0 used completed table.
0 relevant answer ident ops. 0 consumptions via answer list.
0 variant call check/insert ops: 0 producers, 0 variants.
0 answer check/insert ops: 0 unique inserts, 0 redundant.
0 heap ( 0 string) garbage collections by copying: collected 0 cells in 0.000000 secs
Time: 0.190 sec. cputime, 13.921 sec. elapsetime
| ?- statistics(atom).
Symbol table statistics:
------------------------
Table Size: 8191
Total Symbols: 1188
used buckets: 1088 (range: [0, 8174])
unused buckets: 7103
maximum bucket size: 3 (#: 18)
String table statistics:
------------------------
Table Size: 16381
Total Strings: 1702
used buckets: 1598 (range: [0, 16373])
unused buckets: 14783
maximum bucket size: 3 (#: 2318)
While this option is intended primarily for developers, it can also provide valuable information for the serious user of tabling.