Interpreter State

Some interpreter state can be queried and updated. The predicate current_prolog_flag/2 allows accessing an interpreter attribute. The predicate set_prolog_flag/2 allows updating an interpreter attribute. The predicates halt/[0,1] allow exiting the current process.

The system predicate version/0 displays a version banner. The synonym welcome/0 does the same. We currently do not provide Prolog flags to query some version information. Version information might be obtained from capabilities.

The predicates begin_module/1 and end_module/0 can be to open respectively close a local module. For a consulted file the predicate begin_module/1 will also do first a clear of the local module, and the predicate end_module/0 will do a style check of the local module.

 The following interpreter state predicates are provided:

current_prolog_flag(F, V): [ISO 8.17.2]
The predicate succeeds for the value V of the flag F.
set_prolog_flag(F, V): [ISO 8.17.1]
The predicate sets the flag F to the value V.
halt: [ISO 8.17.3]
halt(N): [ISO 8.17.4]
The predicate without arguments terminates the interpreter with exit value zero. The unary predicate terminates the interpreter with exit value N.
welcome:
version:
The predicate displays a version banner.
begin_module(N):
The predicate begins a new typein module N.
end_module:
The predicate ends the current typein module.

The following Prolog flags for interpreter state are provided:

dialect:
The value is an atom. The value indicates the dialect of this Prolog interpreter. It will always return "jekejeke". The value cannot be changed.

Kommentare