small changes with new flag system.
This commit is contained in:
		
							
								
								
									
										539
									
								
								pl/flags.yap
									
									
									
									
									
								
							
							
						
						
									
										539
									
								
								pl/flags.yap
									
									
									
									
									
								
							@@ -44,545 +44,6 @@
 | 
				
			|||||||
:- use_system_module( '$_yio', ['$default_expand'/1,
 | 
					:- use_system_module( '$_yio', ['$default_expand'/1,
 | 
				
			||||||
        '$set_default_expand'/1]).
 | 
					        '$set_default_expand'/1]).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @pred  yap_flag(? _Param_,? _Value_) 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Set or read system properties for  _Param_:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `argv `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag. It unifies with a list of atoms that gives the
 | 
					 | 
				
			||||||
arguments to YAP after `--`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `associate`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-write flag telling a suffix for files associated to Prolog
 | 
					 | 
				
			||||||
sources. It is `yap` by default.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `arithmetic_exceptions `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-write flag telling whether arithmetic exceptions generate
 | 
					 | 
				
			||||||
    Prolog exceptions. If enabled:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
~~~~
 | 
					 | 
				
			||||||
 ?- X is 2/0.
 | 
					 | 
				
			||||||
     ERROR!!
 | 
					 | 
				
			||||||
     ZERO DIVISOR ERROR- X is Exp
 | 
					 | 
				
			||||||
~~~~
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If disabled:
 | 
					 | 
				
			||||||
~~~~
 | 
					 | 
				
			||||||
 ?- X is 2/0.
 | 
					 | 
				
			||||||
X = (+inf).
 | 
					 | 
				
			||||||
~~~~
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    It is `true` by default, but it is disabled by packages like CLP(BN) and ProbLog.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `bounded` is iso
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling whether integers are bounded. The value depends
 | 
					 | 
				
			||||||
on whether YAP uses the GMP library or not.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `profiling `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    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/3 built-in.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `char_conversion is iso`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    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`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `character_escapes is iso `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Writable flag telling whether a character escapes are enables,
 | 
					 | 
				
			||||||
`true`, or disabled, `false`. The default value for this flag is
 | 
					 | 
				
			||||||
`on`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `debug is iso `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If  _Value_ is unbound, tell whether debugging is `true` or
 | 
					 | 
				
			||||||
`false`. If  _Value_ is bound to `true` enable debugging, and if
 | 
					 | 
				
			||||||
it is bound to `false` disable debugging.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `debugger_print_options `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If bound, set the argument to the `write_term/3` options the
 | 
					 | 
				
			||||||
debugger uses to write terms. If unbound, show the current options.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `dialect `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag that always returns `yap`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `discontiguous_warnings `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If  _Value_ is unbound, tell whether warnings for discontiguous
 | 
					 | 
				
			||||||
predicates 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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `dollar_as_lower_case `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `off` (default)  consider the character `$` a control character, if
 | 
					 | 
				
			||||||
`on` consider `$` a lower case character.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `double_quotes is iso `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    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`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `executable `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag. It unifies with an atom that gives the
 | 
					 | 
				
			||||||
original program path.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `fast `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `on` allow fast machine code, if `off` (default) disable it. Only
 | 
					 | 
				
			||||||
available in experimental implementations.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `fileerrors`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `on` `fileerrors` is `on`, if `off` (default)
 | 
					 | 
				
			||||||
`fileerrors` is disabled.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `float_format `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    C-library `printf()` format specification used by write/1 and
 | 
					 | 
				
			||||||
friends to determine how floating point numbers are printed. The
 | 
					 | 
				
			||||||
default is `%.15g`. The specified value is passed to `printf()`
 | 
					 | 
				
			||||||
without further checking. For example, if you want less digits
 | 
					 | 
				
			||||||
printed, `%g` will print all floats using 6 digits instead of the
 | 
					 | 
				
			||||||
default 15.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `gc`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `on` allow garbage collection (default), if `off` disable it.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `gc_margin `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Set or show the minimum free stack before starting garbage
 | 
					 | 
				
			||||||
collection. The default depends on total stack size. 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `gc_trace `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `generate_debugging_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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `host_type `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Return `configure` system information, including the machine-id
 | 
					 | 
				
			||||||
for which YAP was compiled and Operating System information. 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `index `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `on` allow indexing (default), if `off` disable it, if
 | 
					 | 
				
			||||||
`single` allow on first argument only.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `index_sub_term_search_depth `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Maximum bound on searching sub-terms for indexing, if `0` (default) no bound.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `language `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Choose whether YAP is closer to C-Prolog, `cprolog`, 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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `max_arity is iso `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the maximum arity of a functor. Takes the value
 | 
					 | 
				
			||||||
`unbounded` for the current version of YAP.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `max_integer is iso `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the maximum integer in the
 | 
					 | 
				
			||||||
implementation. Depends on machine and Operating System
 | 
					 | 
				
			||||||
architecture, and on whether YAP uses the `GMP` multi-precision
 | 
					 | 
				
			||||||
library. If bounded is false, requests for max_integer
 | 
					 | 
				
			||||||
will fail.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `max_tagged_integer  `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the maximum integer we can store as a single
 | 
					 | 
				
			||||||
word. Depends on machine and Operating System
 | 
					 | 
				
			||||||
architecture. It can be used to find the word size of the current machine.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `min_integer is iso `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the minimum integer in the
 | 
					 | 
				
			||||||
implementation. Depends on machine and Operating System architecture,
 | 
					 | 
				
			||||||
and on whether YAP uses the `GMP` multi-precision library. If
 | 
					 | 
				
			||||||
bounded is false, requests for min_integer will fail.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `min_tagged_integer  `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the minimum integer we can store as a single
 | 
					 | 
				
			||||||
word. Depends on machine and Operating System
 | 
					 | 
				
			||||||
architecture.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `n_of_integer_keys_in_bb `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read or set the size of the hash table that is used for looking up the
 | 
					 | 
				
			||||||
blackboard when the key is an integer.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `occurs_check `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Current read-only and set to `false`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `n_of_integer_keys_in_db `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read or set the size of the hash table that is used for looking up the
 | 
					 | 
				
			||||||
internal data-base when the key is an integer.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `open_expands_filename `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `true` the open/3 builtin performs filename-expansion
 | 
					 | 
				
			||||||
before opening a file (SICStus Prolog like). If `false` it does not
 | 
					 | 
				
			||||||
(SWI-Prolog like).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `open_shared_object `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If true, `open_shared_object/2` and friends are implemented,
 | 
					 | 
				
			||||||
providing access to shared libraries (`.so` files) or to dynamic link
 | 
					 | 
				
			||||||
libraries (`.DLL` files).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `profiling `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `off` (default) do not compile profiling information for
 | 
					 | 
				
			||||||
procedures. If `on` compile predicates so that they will output
 | 
					 | 
				
			||||||
profiling information. Profiling data can be read through the
 | 
					 | 
				
			||||||
profile_data/3 built-in.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `prompt_alternatives_on(atom, changeable) `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    SWI-Compatible option, determines prompting for alternatives in the Prolog toplevel. Default is <tt>groundness</tt>, YAP prompts for alternatives if and only if the query contains variables. The alternative, default in SWI-Prolog is <tt>determinism</tt> which implies the system prompts for alternatives if the goal succeeded while leaving choicepoints.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `qcompile(+{never, auto, large, part}, changeable)`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    SWI-Prolog flag that controls whether loaded files should be also
 | 
					 | 
				
			||||||
    compiled into qfiles. The default value is `never`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 `never`, no qcompile file is generated unless the user calls
 | 
					 | 
				
			||||||
 qsave_file/1 and friends, or sets the qcompile option in
 | 
					 | 
				
			||||||
 load_files/2; 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  `auto`, all files are qcompiled.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  `large`, files above 100KB are qcompiled.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  `part`, not supported in YAP.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `shared_object_search_path `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Name of the environment variable used by the system to search for shared
 | 
					 | 
				
			||||||
objects.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `shared_object_extension `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Suffix associated with loadable code.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `single_var_warnings `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If  _Value_ is unbound, tell whether warnings for singleton variables
 | 
					 | 
				
			||||||
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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `stack_dump_on_error `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `on` show a stack dump when YAP finds an error. The default is
 | 
					 | 
				
			||||||
`off`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `syntax_errors`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Control action to be taken after syntax errors while executing read/1,
 | 
					 | 
				
			||||||
`read/2`, or `read_term/3`:
 | 
					 | 
				
			||||||
  + `dec10`
 | 
					 | 
				
			||||||
Report the syntax error and retry reading the term.
 | 
					 | 
				
			||||||
  + `fail`
 | 
					 | 
				
			||||||
Report the syntax error and fail (default).
 | 
					 | 
				
			||||||
  + `error`
 | 
					 | 
				
			||||||
Report the syntax error and generate an error.
 | 
					 | 
				
			||||||
  + `quiet`
 | 
					 | 
				
			||||||
Just fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `tabling_mode`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Sets or reads the tabling mode for all tabled predicates. Please
 | 
					 | 
				
			||||||
 (see Tabling) for the list of options.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `to_chars_mode `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Define whether YAP should follow `quintus`-like
 | 
					 | 
				
			||||||
semantics for the `atom_chars/1` or `number_chars/1` built-in,
 | 
					 | 
				
			||||||
or whether it should follow the ISO standard (`iso` option).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `toplevel_print_options `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If bound, set the argument to the `write_term/3` options used to write
 | 
					 | 
				
			||||||
terms from the top-level. If unbound, show the current options.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `typein_module `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If bound, set the current working or type-in module to the argument,
 | 
					 | 
				
			||||||
which must be an atom. If unbound, unify the argument with the current
 | 
					 | 
				
			||||||
working module.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `unix`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only Boolean 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`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `unknown is iso`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Corresponds to calling the unknown/2 built-in. Possible values 
 | 
					 | 
				
			||||||
are `error`, `fail`, and `warning`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `update_semantics `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Define whether YAP should follow `immediate` update
 | 
					 | 
				
			||||||
semantics, as in C-Prolog (default), `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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `user_error `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If the second argument is bound to a stream, set user_error to
 | 
					 | 
				
			||||||
this stream. If the second argument is unbound, unify the argument with
 | 
					 | 
				
			||||||
the current user_error stream.
 | 
					 | 
				
			||||||
By default, the user_error stream is set to a stream
 | 
					 | 
				
			||||||
corresponding to the Unix `stderr` stream.
 | 
					 | 
				
			||||||
The next example shows how to use this flag:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
~~~{.prolog}
 | 
					 | 
				
			||||||
    ?- open( '/dev/null', append, Error,
 | 
					 | 
				
			||||||
            [alias(mauri_tripa)] ).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Error = '$stream'(3) ? ;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    no
 | 
					 | 
				
			||||||
    ?- set_prolog_flag(user_error, mauri_tripa).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    close(mauri_tripa).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     yes
 | 
					 | 
				
			||||||
    ?- 
 | 
					 | 
				
			||||||
~~~
 | 
					 | 
				
			||||||
    We execute three commands. First, we open a stream in write mode and
 | 
					 | 
				
			||||||
give it an alias, in this case `mauri_tripa`. Next, we set
 | 
					 | 
				
			||||||
user_error to the stream via the alias. Note that after we did so
 | 
					 | 
				
			||||||
prompts from the system were redirected to the stream
 | 
					 | 
				
			||||||
`mauri_tripa`. Last, we close the stream. At this point, YAP
 | 
					 | 
				
			||||||
automatically redirects the user_error alias to the original
 | 
					 | 
				
			||||||
`stderr`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `user_flags `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Define the behaviour of 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 `create_prolog_flag/3`. The default is`error`, and developers are encouraged to use `create_prolog_flag/3` to create flags for their library.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `user_input `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If the second argument is bound to a stream, set user_input to
 | 
					 | 
				
			||||||
this stream. If the second argument is unbound, unify the argument with
 | 
					 | 
				
			||||||
the current user_input stream.
 | 
					 | 
				
			||||||
By default, the user_input stream is set to a stream
 | 
					 | 
				
			||||||
corresponding to the Unix `stdin` stream.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `user_output `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If the second argument is bound to a stream, set user_output to
 | 
					 | 
				
			||||||
this stream. If the second argument is unbound, unify the argument with
 | 
					 | 
				
			||||||
the current user_output stream.
 | 
					 | 
				
			||||||
By default, the user_output stream is set to a stream
 | 
					 | 
				
			||||||
corresponding to the Unix `stdout` stream.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `verbose `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `normal` allow printing of informational and banner messages,
 | 
					 | 
				
			||||||
such as the ones that are printed when consulting. If `silent`
 | 
					 | 
				
			||||||
disable printing these messages. It is `normal` by default except if
 | 
					 | 
				
			||||||
YAP is booted with the `-q` or `-L` flag.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `verbose_load `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If `true` allow printing of informational messages when
 | 
					 | 
				
			||||||
consulting files. If `false` disable printing these messages. It
 | 
					 | 
				
			||||||
is `normal` by default except if YAP is booted with the `-L`
 | 
					 | 
				
			||||||
flag.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `version `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag that returns an atom with the current version of
 | 
					 | 
				
			||||||
YAP.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `version_data `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag that reads a term of the form
 | 
					 | 
				
			||||||
`yap`( _Major_, _Minor_, _Patch_, _Undefined_), where
 | 
					 | 
				
			||||||
 _Major_ is the major version,  _Minor_ is the minor version,
 | 
					 | 
				
			||||||
and  _Patch_ is the patch number.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `windows `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only boolean flag that unifies with tr `true` if YAP is
 | 
					 | 
				
			||||||
running on an Windows machine.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `write_strings `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Writable flag telling whether the system should write lists of
 | 
					 | 
				
			||||||
integers that are writable character codes using the list notation. It
 | 
					 | 
				
			||||||
is `on` if enables or `off` if disabled. The default value for
 | 
					 | 
				
			||||||
this flag is `off`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `max_workers `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the maximum number of parallel processes.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `max_threads `
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Read-only flag telling the maximum number of Prolog threads that can 
 | 
					 | 
				
			||||||
be created.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
/** @pred  yap_flag(unknown,+ _SPEC_) 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Alternatively, one can use yap_flag/2,
 | 
					 | 
				
			||||||
current_prolog_flag/2, or set_prolog_flag/2, to set this
 | 
					 | 
				
			||||||
functionality. In this case, the first argument for the built-ins should
 | 
					 | 
				
			||||||
be `unknown`, and the second argument should be either
 | 
					 | 
				
			||||||
`error`, `warning`, `fail`, or a goal.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
/** @pred yap_flag(tabling_mode,? _Mode_)
 | 
					 | 
				
			||||||
Sets or reads the tabling mode for all tabled predicates. The list of
 | 
					 | 
				
			||||||
 _Mode_ options includes:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `default`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Defines that (i) all calls to tabled predicates are evaluated
 | 
					 | 
				
			||||||
using the predicate default mode, and that (ii) answers for all
 | 
					 | 
				
			||||||
completed calls are obtained by using the predicate default mode.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `batched`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Defines that all calls to tabled predicates are evaluated using
 | 
					 | 
				
			||||||
batched scheduling. This option ignores the default tabling mode
 | 
					 | 
				
			||||||
of each predicate.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `local`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Defines that all calls to tabled predicates are evaluated using
 | 
					 | 
				
			||||||
local scheduling. This option ignores the default tabling mode
 | 
					 | 
				
			||||||
of each predicate.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `exec_answers`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Defines that answers for all completed calls are obtained by
 | 
					 | 
				
			||||||
executing compiled WAM-like code directly from the trie data
 | 
					 | 
				
			||||||
structure. This option ignores the default tabling mode
 | 
					 | 
				
			||||||
of each predicate.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
+ `load_answers`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Defines that answers for all completed calls are obtained by
 | 
					 | 
				
			||||||
loading them from the trie data structure. This option ignores
 | 
					 | 
				
			||||||
the default tabling mode of each predicate.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
yap_flag(V,Out) :-
 | 
					yap_flag(V,Out) :-
 | 
				
			||||||
	'$user_defined_flag'(V,_,_,_),
 | 
						'$user_defined_flag'(V,_,_,_),
 | 
				
			||||||
	(nonvar(V) ->
 | 
						(nonvar(V) ->
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user