Prolog options are controlled by the setting of various flags. A changeable
flag can be set by using set_prolog_flag/2
, and the current
value of a flag can be accessed by current_prolog_flag/2
.
Non-changeable flags serve to furnish information about the implementation.
The initial values of the flags depend on whether PrologJ is started up in
full, iso, edinburgh, or basic mode, as listed for each flag.
PrologJ supports the following flags:
break_fresh_variables
- if on,
use a fresh set of variables names for each invocation of break/0
or the debugger's break
command; if off,
use the variable used when reading the term that initiated computation. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: on
edinburgh: on
basic: on
char_conversion
- enable/disable conversions specified by char_conversion/2
. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: on
edinburgh: off
basic: on
debug
- enable/disable the debugging facilities and Debug predicate set. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: on
basic: on
detect_float_overflow_underflow
- throw an error if overflow or underflow occurs in float arithmetic. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: on
edinburgh: on
basic: on
dialect
- specify which builtin predicates to make available. Possible values:
iso
- those in the ISO dialect.edinburgh
- those in the Edinburgh dialect.both
- those in both the ISO and Edinburgh dialects.both
iso: iso
edinburgh: edinburgh
basic: both
double_quotes
- specify how a string enclosed in " is interpreted. Possible values:
chars
- a list of one-character atoms.codes
- a list of integer codes.atom
- an atom.codes
iso: codes
edinburgh: codes
basic: codes
enforce_directives
- enforce the use of the discontiguous,
dynamic,
multifile,
and public
directives. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: on
edinburgh: off
basic: off
ensure_loaded
- specify which version of a module to load if both source and compiled versions are available, if the ensure_loaded
directive appears in a source file being consulted by consult/1
or reconsult/1
or it is entered interactively. (When this directive appears in a file that is being compiled it specifies that a compiled module of that name is to be loaded when the compiled module is itself loaded.) Possible values:
newest
- load the newest.source_preferred
- load the source version.compiled_preferred
- load the compiled version.newest
iso: newest
edinburgh: newest
basic: newest
function
- enable/disable the user-defined functions extension. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
fuzzy
- enable/disable the fuzzy logic extension and associated predicates. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
grammar_rules
- enable/disable the grammar rules feature and associated predicate. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
java
- enable/disable the use of the Java extension and the entry,
java,
and main
directives. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
leash
- specify which ports of a leashed predicate are actually leashed. Possible values:
- do not leash any ports.c
- leash only the call port.e
- leash only the exit port.ce
- leash only the call and exit ports.r
- leash only the redo port.cr
- leash only the call and redo ports.er
- leash only the exit and redo ports.cer
- leash only the call, exit, and redo ports.f
- leash only the fail port.cf
- leash only the call and fail ports.ef
- leash only the exit and fail ports.cef
- leash only the call, exit and fail ports.rf
- leash only the redo and fail ports.crf
- leash only the call, redo, and fail ports.erf
- leash only the exit, redo, and fail ports.cerf
- leash all ports.cerf
iso: cerf
edinburgh: cerf
basic: cerf
miscellaneous
- enable/disable the miscellaneous predicates extension. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
operator_single_slash
- specify how operator /
is interpreted. Possible values:
either
- integer division if both operands are integers; otherwise real division.real
- real division in all cases.either
iso: real
edinburgh: either
basic: either
sql
- enable/disable the relational database extension. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
set
- enable/disable the set processing predicates. Possible values:
off
- disables the feature.on
- enables the feature.on
iso: off
edinburgh: off
basic: off
stack_trace
- specify what sort of stack trace is printed for an uncaught error. Possible values:
standard
- print a standard stack trace - prolog history plus Java history of methods that are not part of the PrologJ implementation.none
- do not print any stack trace.prolog
- print the prolog history onlyjava
- print the entire Java history only (including the PrologJ implementation part).all
- print the entire Prolog and Java histories (including the PrologJ implementation part).standard
iso: standard
edinburgh: standard
basic: standard
unknown
- specify what happens when an undefined predicate is called. Possible values:
error
- throw an error.warning
- issue a warning and fail.fail
- fail without error or warning.warning
iso: error
edinburgh: fail
basic: fail
bounded
- specifies that PrologJ supports unbounded integers. Unchangeable.
max_arity
- specifies the maximum permissible arity of a compound term. Unchangeable.
integer_rounding_function
- specifies how floats are rounded to integers by round/1.
Unchangeable.
version
- specifies the current version of PrologJ. Unchangeable.