YAP Thread-shared or Global flags¶
Global flags are shared by the threads.
They are often used to query read-only properties of YPA.
Define:¶
Var:¶
1. single_quotes: : single_quoted text is usually interpreted as atoms.
This flag allows other interpretations such as strings
If Value is unbound, tell whether a double quoted list of characters token is converted to a list of atoms, chars
, to a list of integers, codes
, or to a single atom, atom
. If Value is bound, set to the corresponding behavior. The default value is codes
.
1. back_quotes:
: If Value is unbound, tell whether a back quoted list of characters token is converted to a list of atoms, chars
, to a list of integers, codes
, or to a single atom, atom
.
If Value is bound, set to the corresponding behavior. The default value is string
1. unknown: : Corresponds to calling the unknown_50 "unknown/2" built-in.
Possible ISO values are error
, fail
, and warning
. Yap includes the following extensions: fast_fail
does not invoke any handler.
1. address_bits: : Number of address bits in the machine, either 64 or 32 bits.
1. agc_margin: : An integer: if this amount of atoms has been created since the last atom-garbage collection, perform atom garbage collection at the first opportunity.
Initial value is 10,000. May be changed. A value of 0 (zero) disables atom garbage collection.
1. allow_assert_for_static_predicates: : boolean, allow asserting and retracting clauses of static predicates.
1. answer_format:
: how to present answers, default is ~p
.
1. android: : read-only boolean, a machine running an Google's Android version of the Linux Operating System
read-only atom, it describes the ISA used in this version of YAP.
Available from
YAP_ARCH.
1. argv: : read-only atom, it describes the list with all arguments received by YAP at boot.
Available from
1. arithmetic_exceptions: : Read-write flag telling whether arithmetic exceptions generate Prolog exceptions.
1. bounded: : Read-only flag telling whether integers are bounded.
The value depends on whether YAP uses the GMP library or not.
1. c_cc: : C compiler used to generate YAP
1. c_cflags: : C Compiler flagss used to compile flags
1. c_ldflags: : loader flags used in YAP
1. c_libplso: : shared libraries used in YAP
1. c_libs: : libraries used in YAP
1. clause_preprocessor: : Writable flag telling how much preprocessing to do after reading a clause.
reading terms. The defaults are none
when fast-compiling, all
when compiling a file, and `user otherwise (eg, when asserting or running directives.
1. char_conversion: : Writable flag telling whether a character conversion table is used when reading terms.
The default value for this flag is off
except in sicstus
and iso
language modes, where it is on
.
1. character_escapes:
: Writable flag telling whether a character escapes are enabled, true
, or disabled, false
.
The default value for this flag is true
.
1. colon_sets_calling_context:
: whether to use :
to set the calling module.
1. compiled_at: : Read-only flag that gives the time when the main YAP binary was compiled.
It is obtained straight from the TIME macro, as defined in the C99.
1. debug_info: : generate debugging annotations.
The flag is ignored in YAP.
1. debug_on_error: : Says whether to call the debUgger on an exception.
False in YAP..
1. debugger_print_options: : controls debugging output.
If bound, set the argument to the write_term_51 "write_term/3" options the debugger uses to write terms. If unbound, show the current options.
1. debugger_show_context: : Show ancestors while debugging.
1. default_parent_module: : A module that is inherited by all other modules.
Set it to prolog
for SICStus Prolog like resolution, to user
for SWI-like.
1. dialect: : Flag used to facilitate portability by emulating other Prolog dialects.
YAP by default returns yap
, the Prolog dialect YAP implements.
1. discontiguous_warnings:
: If true
YAP checks for definitions of the same predicate that are separated by clauses for other predicates.
This may indicate that different procedures have the same name, or that the user has repeated code. The declaration discontiguous_49 "discontiguous/1" disables this warning for user-specified code.
1. dollar_as_lower_case:
: If off
(default) consider the character $
a control character, if on
consider $
a lower case character.
1. executable: : Read-only flag.
It unifies with an atom that gives the original program path.
1. fast:
: If on
allow fast machine code, if off
(default) disable it.
Only available in experimental implementations.
1. file_name_variables: : Allow environment variables in file names
1. float_format:
: C-library printf()
format specification used by write_49 "write/1" and friends to determine how floating point numbers are printed.
The specified value is passed to printf()
without further checking. For example, if you want less digits printed, %.15g
will print all floats using 15 digits instead of the default 6.
1. gc: : controls garbage collection:
if true
allow garbage collection (default), if false
disable it.
1. gc_margin: : controls when to do garbage collection.
Set or show the minimum free stack before starting garbage collection. The default is 0, in this case it depends on total stack size. If set to []
or any other non-integer, it disables garbage collection.
1. gc_trace: : show activity in garbage collector.
If off
(default) do not show information on garbage collection and stack shifts, if on
inform when a garbage collection or stack shift happened, if verbose give detailed information on garbage collection and stack shifts. Last, if very_verbose
give detailed information on data-structures found during the garbage collection process, namely, on choice-points.
1. generate_debug_info:
: If true
(default) generate debugging information for procedures, including source mode.
If false
predicates no information is generated, although debugging is still possible, and source mode is disabled.
1. gmp_version: : which GMP package was used for infinite precision integers.
1. goal_expansion_allowed: : whether maplist/3 and friends can perform goal expansion (inlining) at compile-time.
1. halt_after_consult: : did we boot using -L ?
the root of the YAP installation, by default /usr/local
in Unix or c:\Yap
in Windows system. Can only be set at configure time
Return configure
system information, including the machine-id for which YAP was compiled and Operating System information.
If on
allow indexing (default), if off
disable it, if single
allow on first argument only.
1. index_sub_term_search_depth:
: Index_sub_term_search_depth
Maximum bound on searching sub-terms for indexing, if 0
(default) no bound.
1. informational_messages:
: informational_messages
If on
allow printing of informational messages, such as the ones that are printed when consulting. If off
disable printing these messages. It is on
by default except if YAP is booted with the -L
flag.
1. integer_rounding_function: : controls integer rounding function, is iso `
Read-only flag telling the rounding function used for integers. Takes the value toward_zero
for the current version of YAP.
1. iso: : Improve ISO compatibility.
1. jupyter: : read-only boolean, a machine running Jupyter
Choose whether YAP follows native, closer to C-Prolog, yap
, iso-prolog, iso
or SICStus Prolog, sicstus
. The current default is cprolog
. This flag affects update semantics, leashing mode, style checking, handling calls to undefined procedures, how directives are interpreted, when to use dynamic, character escapes, and how files are consulted. Also check the dialect
option.
1. max_arity:
: max_arity is iso
Read-only flag telling the maximum arity of a functor. Takes the value unbounded
for the current version of YAP.
1. min_tagged_integer:
: module_independent_operators
If true
an operator declaration will be valid for every module in the program. This is for compatibility with old software that might expect module-independent operators.
1. module_independent_operators:
1. open_shared_object:
: open_shared_object
If true, @ref open_shared_object_50 @"open_shared_object/2"
and friends are implemented, providing access to shared libraries (.so
files) or to dynamic link libraries (.DLL
files).
1. portray_clause_options: : controls debugging output.
If bound, set the argument to the @ref write_term_51 @"write_term/3"
options the portray_clause_49 "portray_clause/1" and @ref listing_48 @"listing/0" built-ins u uses to write terms. If unbound, show the current options.
1. prolog_library_directory: : if defined, first location where YAP expects to find the YAP Prolog library.
Takes precedence over library_directory
1. prolog_foreign_directory: : if defined, first location where YAP expects to find the YAP Prolog shared libraries (DLLS).
Takes precedence over executable_directory_50 "executable_directory/2".
1. os_argv:
: return all the arguments given to YAP, including the ones before --
.
1. optimise: : enable a few (small) optimisations
1. pid: : The process ID for the process running YAP.
If off
(default) do not compile call counting information for procedures. If on
compile predicates so that they calls and retries to the predicate may be counted. Profiling data can be read through the call_count_data_51 "call_count_data/3" built-in.
1. prompt_alternatives_on:
: pt_alternatives_on(atom,
changeable)
SWI-Compatible option, determines prompting for alternatives in the Prolog toplevel. Default is groundness
, YAP prompts for alternatives if and only if the query contains variables. The alternative, default in SWI-Prolog is determinism
which implies the system prompts for alternatives if the goal succeeded while leaving choicepoints.
1. readline:
: [readline(boolean, changeable)](group__YAPGFlags_1gaedaa4bc3288ce471c9402be8b027ce75.md)
enable the use of the readline library for console interactions, true by default if readline was found.
1. redefine_warnings:
: If Value is unbound, tell whether warnings for procedures defined in several different files are on
or off
.
If Value is bound to on
enable these warnings, and if it is bound to off
disable them. The default for YAP is off
, unless we are in sicstus
or iso
mode.
1. report_error: : report errors
1. resource_database: : Name of the resource file (saved-state or Prolog file) used to construct the YAP run-time environment.
1. saved_program:
: saved_program
if true
YAP booted from a yss
file, usually startup.yss.
If false
, YAP booted from a Prolog file, by default boot.yap
.
1. shared_object_extension:
: shared_object_extension
Suffix associated with loadable code.
1. shared_object_search_path: : Name of the environment variable used by the system to search for shared objects.
1. single_var_warnings:
: If true
(default true
) YAP checks for singleton variables when loading files.
A singleton variable is a variable that appears ony once in a clause. The name must start with a capital letter, variables whose name starts with underscore are never considered singleton.
1. signals:
: If true
(default) YAP handles Signals such as ^C
(SIGINT
).
1. signal_segv:
: If true
(default) YAP handles the segmentation violation signal.
If false
, the signal is ignored. SIGSEGV must be disabled by default to collaborate with languages like Java, that rely on SEGV for stack manipulation.
1. source:
: If true
maintain the source for all clauses.
Notice that this is trivially supported for facts, and always supported for dynamic code.
1. stack_dump_on_error:
: if true
the error handler should generate a report on execution stack status.
1. strict_iso:
: If Value is unbound, tell whether strict ISO compatibility mode is on
or off
.
If Value is bound to on
set language mode to iso
and enable strict mode. If Value is bound to off
disable strict mode, and keep the current language mode. The default for YAP is off
. Under strict ISO Prolog mode all calls to non-ISO built-ins generate an error. Compilation of clauses that would call non-ISO built-ins will also generate errors. Pre-processing for grammar rules is also disabled. Module expansion is still performed. Arguably, ISO Prolog does not provide all the functionality required from a modern Prolog system. Moreover, because most Prolog implementations do not fully implement the standard and because the standard itself gives the implementor latitude in a few important questions, such as the unification algorithm and maximum size for numbers there is no guarantee that programs compliant with this mode will work the same way in every Prolog and in every platform. We thus believe this mode is mostly useful when investigating how a program depends on a Prolog's platform specific features.
1. system_options: : This read only flag tells which options were used to compile YAP.
Currently it informs whether the system supports big_numbers
, coroutining
, depth_limit
, low_level_tracer
, or-parallelism
, rational_trees
, readline
, tabling
, threads
, or the wam_profiler
.
1. system_thread_id: : report the thread running YAP
1. tabling_mode: : Sets or reads the tabling mode for all tabled predicates.
Please (see Tabling) for the list of options.
1. timezone: : report the timezone where YAP is running.
1. toplevel_hook: : If bound, set the argument to a goal to be executed before entering the top-level.
If unbound show the current goal or true
if none is presented. Only the first solution is considered and the goal is not backtracked into.
1. toplevel_print_anon: : If bound, set the argument to a goal to be executed before entering the top-level.
If unbound show the current goal or true
if none is presented. Only the first solution is considered and the goal is not backtracked into.
1. toplevel_print_options: : If bound, set the argument to a goal to be executed before entering the top-level.
If unbound show the current goal or true
if none is presented. Only the first solution is considered and the goal is not backtracked into.
1. toplevel_prompt: : If bound, set the argument to a goal to be executed before entering the top-level.
If unbound show the current goal or true
if none is presented. Only the first solution is considered and the goal is not backtracked into.
1. update_semantics:
: Define whether YAP should follow immediate
update semantics, as in C-Prolog (default), or logical
update semantics, as in Quintus Prolog, SICStus Prolog, or in the ISO standard.
There is also an intermediate mode, logical_assert
, where dynamic procedures follow logical semantics but the internal data base still follows immediate semantics.
1. unix:
: Read-only BooleanFlag flag that unifies with true
if YAP is running on an Unix system.
Defined if the C-compiler used to compile this version of YAP either defines __unix__
or unix
.
1. user_flags: : Define the behaviour of set_prolog_flag_50 "set_prolog_flag/2" if the flag is not known.
Values are silent
, warning
and error
. The first two create the flag on-the-fly, with warning
printing a message. The value error
is consistent with ISO: it raises an existence error and does not create the flag. See also @ref create_prolog_flag_51 @"create_prolog_flag/3"
. The default iserror
, and developers are encouraged to use @ref create_prolog_flag_51 @"create_prolog_flag/3"
to create flags for their library.
1. version: : YAP version as an integer
1. multiline_quoted_text: : If true, quoted atoms, string, lists of codes and of chars may extend over several lines, without the need to escape the new-line characters.
Otherwise, unquoted line breaks cause a syntax error. `Allow quoted atoms and strings to span multiple lines.
The default was for it to be true, except if in iso mode. YAP-6.5 changed the default, in order to ensure compatibility, and to avoid long winded syntax bugs. `
1. version_data:
: Read-only flag that unifies with a number of the form _Major_ * 100000 + _Minor_ *100 + _Patch_
, where Major is the major version, Minor is the minor version, and Patch is the patch number.
1. win/2:
: true
if YAP was compiled for the WIN32 standard Windows API.
1. windows:
: Read-only boolean Flag flag that unifies with true
if YAP is running on an Windows machine.