next up previous index
Next: Restrictions and Limits Up: ECLiPSe User Manual Release Previous: Protected Procedures   Index

Global Flags

ECLiPSe has a lot of options and different modes of execution, some of which are controlled by the global flags described below. The current value of every flag can be retrieved using get_flag(+FlagName, ?Value), writeable flags can be set using set_flag(+FlagName, +NewValue). The built-in env/0 prints a list of all the flags and their current setting.

all_dynamic
Access mode :
read/write
Type :
Atomic constant on or off
Default :
off
Description :
Specifies whether all clauses compiled are dynamic or not.

break_level
Access mode :
read/write
Type :
Integer
Description :
Specifies current nesting level of recursive top-level loops.

coroutine
Access mode :
read/write
Type :
Atomic constant on or off
Default :
configuration dependent
Description :
Specifies whether built-in predicates delay or whether they raise instantiation faults.

cwd
Access mode :
read/write
Type :
String
Description :
Specifies the name of the current working directory. May also be set using cd/1 or read using getcwd/1.

debug_compile
Access mode :
read/write
Type :
Atomic constant on or off
Default :
on
Description :
Specifies whether clauses are compiled for debugging or not. May be set on by dbgcomp/0 or off by nodbgcomp/0.

debugging
Access mode :
read-only
Type :
Atomic constant nodebug, creep, leap, skip, jump_invoc, jump_level, var_skip, woke_skip, backtrack_skip or same_port_skip
Default :
nodebug
Description :
Specifies whether debugging is disabled (nodebug value) or enabled. trace/0 sets the creep mode, debug/0 sets the leap mode, the other modes are set with the debugger options.

debugger_model
Access mode :
read/write
Type :
Atomic constant sepia, byrd or kcm
Default :
sepia
Description :
select one of the available debugger models. They differ in memory consumption, retained information about exited subgoals and instantiations shown at FAIL ports. Refer to the debugger description for details.

dfid_compile
Access mode :
read/write
Type :
Atomic constant on or off
Default :
off
Description :
When on, the compiler will generate code that keeps track of the number of ancestors of each goal. This is used by library(dfid) to perform bounded depth-first search and iterative deepening.

enable_interrupts
Access mode :
read/write
Type :
Atomic constant on or off
Default :
on
Description :
If on, interrupts are recognised and processed as they occur. If off, interrupts are entered into a delay queue and processed only when the flag is switched back to on. Interrupts should be disabled only for short periods of time in order to keep the system's interrupt response time short.

extension
Access mode :
read-only
Type :
Atomic constant.
Default :
configuration dependent
Description :
Specifies which extensions are available in the system. This flag may contain multiple values and will return them on backtracking.

float_precision
Access mode :
read/write
Type :
Atomic constant single or double
Default :
single
Description :
Specifies whether the system uses single or double precision floating point numbers. Should be set at the beginning of a session.

gc
Access mode :
read/write
Type :
Atomic constant on, verbose or off
Default :
on
Description :
Specifies whether garbage collection is enabled (on), disabled (off) or enabled and reports every collection on toplevel_output (verbose).

gc_interval
Access mode :
read/write
Type :
Integer
Default :
1/8 of global stack size
Description :
Specify how often the collector is invoked. Roughly, the argument specifies how many bytes a program can use up before a garbage collection is triggered. If the garbage collector runs frequently while reclaiming little space it may make sense to increase gc_interval, thus reducing the number of garbage collections.

gc_interval_dict
Access mode :
read/write
Type :
Integer
Default :
960
Description :
Specify after how many new dictionary entries the dictionary garbage collector is invoked.

goal_expansion
Access mode :
read/write
Type :
Atomic constant on or off
Default :
on
Description :
Specifies whether goal expansion is done by the compiler. This includes goal macros and other compiler inlining. Can be disabled for debugging purposes.

hostarch
Access mode :
read-only
Type :
String
Description :
String identifying the host processor and operating system. It is also the name of the machine-dependent subdirectories in the ECLiPSe installation.

hostid
Access mode :
read-only
Type :
Integer or string
Description :
The unique identification of the host hardware the system is running on.

hostname
Access mode :
read-only
Type :
String
Description :
The name of the current host machine.

ignore_eof
Access mode :
read/write
Type :
Atomic constant on or off
Default :
Depends on host architecture
Description :
Specifies whether ECLiPSe is exited when end-of-file is typed to the toplevel prompt or whether this is ignored. If ignored, ECLiPSe can be exited by calling halt/0.

installation_directory
Access mode :
read-only
Type :
String
Description :
The name of the toplevel directory of the running ECLiPSe installation. All ECLiPSe library, documentation and other directories are below this one.

last_errno
Access mode :
read-only
Type :
Integer
Description :
The error code that the most recent failed operating system call returned.

library_path
Access mode :
read/write
Type :
List of strings
Default :
the contents of the user's ECLIPSELIBRARYPATH environment variable, followed by the system library directories
Description :
Specifies the list of pathnames used by the system to search for library files. The library path is used by lib/1,2, for autoloading, and to expand library/1 structures in pathnames.

loaded_library
Access mode :
read/write
Type :
Atom
Description :
Returns the names of the currently loaded libraries. This flag may contain multiple values and will return them on backtracking.

macro_expansion
Access mode :
read/write
Type :
Atomic constant on or off
Default :
on
Description :
Specifies whether macro expansion used by the source transformation facility is enabled or disabled. Should be disabled only for debugging purposes.

max_global_trail
Access mode :
read-only
Type :
Integer
Description :
The total memory available to the global and the trail stack in bytes.

max_local_control
Access mode :
read-only
Type :
Integer
Description :
The total memory available to the local and control stack in bytes.

max_predicate_arity
Access mode :
read-only
Type :
Integer
Default :
255
Description :
Returns the maximum number of arguments allowed for an ECLiPSe predicate.

object_suffix
Access mode :
read-only
Type :
String
Description :
Returns the suffix of the external object files that can be loaded using load/1. It is usually "so" for systems that support shared libraries and "o" for the others.
occur_check
Access mode :
read/write
Type :
Atomic constant on or off
Default :
off
Description :
If the flag is on, occur check is performed on uncompiled unifications and the compiler generates code for unifications that will perform the occur check when necessary.

output_mode
Access mode :
read/write
Type :
String
Default :
"QPm"
Description :
The value is a control string that is recognised by the %w format of printf/3. This format is used to output results on the toplevel loop and to print debugger trace lines.

pid
Access mode :
read-only
Type :
Integer
Description :
Returns the process identifier of the current ECLiPSe.

ppid
Access mode :
read-only
Type :
Integer
Description :
Returns the process identifier of the current ECLiPSe's parent process.

prefer_rationals
Access mode :
read/write
Type :
Atomic constant on or off
Default :
off
Description :
Specifies if the result of a /-division of two integers gives a rational or a floating point result. Similar for the result of raising an integer to a negative integral power.

print_depth
Access mode :
read/write
Type :
Integer
Default :
20
Description :
Specifies the print depth bound for printing compound terms. It can also be set by the '<' option of the debugger. It is not taken into account by writeq/1, 2, other I/O built-ins obey this flag.

prolog_suffix
Access mode :
read/write
Type :
List of strings
Default :
["", ".sd", ".pl"]
Description :
Specifies the Prolog source file suffix(es) used when compiling files or loading libraries. The system tries to find the file by appending the given suffixes in the order provided.

statistics
Access mode :
read/write
Type :
Atomic constant off, some, all or mode
Default :
off
Description :
Used to control the operation of the profiling facility. off disables profiling, all enables counting of all traceable procedure ports, some restricts this to the ones that have been selected with set_flag/3 or statistics/2. mode is like all but it also records the modes of procedure calls.

syntax_option
Access mode :
read/write
Type :
Atom
Description :
Returns the names of the currently enabled syntax options. This flag may contain multiple values and will return them on backtracking. A syntax option is reset using set_flag(syntax_option, not(Flag)). Most compatibility packages affect these flags as well. The following options are available:
  • based_bignums - Allow base notation even for integers longer than the wordsize (i.e. they are always positive).
  • blanks_in_nil - allow blanks between the brackets in [].
  • limit_arg_precedence - do not allow terms with a precedence higher than 999 as structure arguments, unless parenthesised.
  • nested_comments - allow bracketed comments to be nested.
  • nl_in_quotes - allow newlines to occur inside quotes.
  • no_blanks - do not allow blanks between functor an opening parenthesis
  • no_other_quotes - do not allow string quotes inside atom quotes and vice versa.
  • $VAR - terms of the form '$VAR'(N) are printed in a special way by all the predicates that obey operator declarations (i.e. write, writeq, print and partly printf). '$VAR'(0) is printed as A, '$VAR'(25) as Z, '$VAR'(26) as A1 and so on. When the argument is an atom or a string, just this argument is printed.

toplevel_module
Access mode :
read/write
Type :
Atom
Description :
The name of the current top-level module. This is the caller module for all queries entered in the top-level loop. By default, this is also shown in the top-level prompt.

unix_time
Access mode :
read-only
Type :
Integer
Description :
Return the time as given by the UNIX time(3) function, ie. seconds since 00:00:00 GMT, Jan 1 1970.

variable_names
Access mode :
read/write
Type :
Atomic constant on, off or check_singletons
Default :
check_singletons
Description :
Controls the ability to retain the source name of variables. This flag affects the reading process only, i.e. when a variable is read (or compiled) with the flag set to on, it will keep its name even when the flag is switched off later. check_singletons is like on but additionally the compiler emits warnings about source variables which occur only once in a clause and whose name does not start with an underscore. The source variable names are being created during the term input if this flag is not off, and then they are kept independently of the value of this flag.

version
Access mode :
read-only
Type :
Atom
Description :
Returns the current version number of ECLiPSe.

worker
Access mode :
read-only
Type :
Integer
Description :
In a parallel session it returns a positive number, identifying the worker on which the flag inquiry was executed. In a sequential session 0 is returned.


next up previous index
Next: Restrictions and Limits Up: ECLiPSe User Manual Release Previous: Protected Procedures   Index

1999-08-06