File "session"

This file provides a Prolog REPL aka top-level. The top-level can be started via the predicate prolog/0. It will repeatedly shows a prompt “?- “, read a query and show the answer substitutions until end_of_file is reached. The file also provides a predicate version/0 to show a banner and further handles answer substitutions for the directive (?-)/1.

The file is not automatically consulted in command line invocation with a script argument or browser invocation via init(). If session predicates nevertheless desired the file has to be manually loaded via ensure_loaded/1. Further answer substutions will be written with colorize(true) if the output stream is marked MASK_DST_CANS.

The following session predicates are provided:

abort:
The predicate signals to abort the current query.
exit:
The predicate signals to abort the current session.
version:
The predicate succeeds. As a side effect, a banner is printed.
prolog:
The predicate succeeds. As a side effect, a REPL is run.