% BEGIN LICENSE BLOCK % Version: CMPL 1.1 % % The contents of this file are subject to the Cisco-style Mozilla Public % License Version 1.1 (the "License"); you may not use this file except % in compliance with the License. You may obtain a copy of the License % at www.eclipse-clp.org/license. % % Software distributed under the License is distributed on an "AS IS" % basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See % the License for the specific language governing rights and limitations % under the License. % % The Original Code is The ECLiPSe Constraint Logic Programming System. % The Initial Developer of the Original Code is Cisco Systems, Inc. % Portions created by the Initial Developer are % Copyright (C) 2006 Cisco Systems, Inc. All Rights Reserved. % % Contributor(s): % % END LICENSE BLOCK :- comment(alias, "Development Environment and Global Settings"). :- comment(summary, "Built-ins related to the development environment"). :- comment(categories, ["Built-In Predicates","Development Tools"]). :- tool(env / 0). :- tool(get_flag / 2). :- tool(set_flag / 2). :- tool(pred / 1). :- comment(statistics / 2, [ summary:"Succeeds if the statistics item Keyword has value Value. ", amode:(statistics(-,-) is multi), amode:(statistics(+,-) is det), desc:html(" Used to retrieve various statistical information about the running ECLiPSe . To print a list of all the current values, statistics/0 can be used.
The following list details the statistic items:
Unit : bytes
Description : The amount of control stack currently allocated. The control stack is allocated in chunks, up to a maximum controlled by the -l command line option. The local and control stacks share the same memory area specified by the -l option, which thus gives the maximum combined allocated size of these two stacks.
Unit : bytes
Description : The peak allocated size of the control stack during this session. Chunks of memory can be allocated to, and deallocated from, the control stack as it grows and shrinks.
Unit : bytes
Description : The amount of control stack currently in use. This stack holds information needed for backtracking.
Unit : count
Description : The number of atoms and functors that are currently known to the system. This is equal to the number of solutions that current_functor/1 would return.
Type : pair of integers Used/Avail
Description : Returns two numbers: the number of actually used slots in the dictionary hash table, versus the number of available slots.
Type : pair of integers Collisions/Entries
Description : Returns two numbers: the number of dictionary entries that collided with existing hash table entries, versus the total number of dictionary hash table entries.
Unit : count
Description : The number of dictionary garbage collections performed during this session.
Unit : seconds (float)
Description : The total cputime spent by all dictionary garbage collections performed during this session.
Unit : seconds (float)
Description : Returns the elapsed real time (session_time) or the elapsed user time (cputime) since the start of a (parallel) ECLiPSe session depending on the value of the after_event_timer flag.
Unit : bytes
Description : The average area processed by a garbage collection. This number should be close to the value of gc_interval. If it is much higher, gc_interval should be increased.
Unit : bytes (float)
Description : The total number of bytes collected in the global stack during all the garbage collections in this session. This value is a float, to avoid overflow.
Unit : count
Description : The number of global/trail stack garbage collections performed during this session.
Unit : percent (float)
Description : The average percentage of garbage found and collected in the garbage collections performed so far. If this number is low, gc_interval should be increased.
Unit : seconds (float)
Description : The total time spent for all garbage collections in this session.
Unit : bytes
Description : The amount of memory assigned to the private heap. This area will never shrink.
Unit : bytes
Description : The amount of memory currently used for private data.
Unit : bytes
Description : The amount of global stack currently allocated. The global stack is allocated in chunks, up to a maximum controlled by the -g command line option. The global stack and trail share the same memory area specified by the -g option, which thus gives the maximum possible combined allocated size of these two stacks.
Unit : bytes
Description : The peak allocated size of the global stack during this session. Chunks of memory can be allocated to, and deallocated from, the global stack as it grows and shrinks.
Unit : bytes
Description : The amount of global stack currently in use. The global stack holds lists and structures and is subject to garbage collection.
Unit : seconds (float)
Description : Returns the value of a high-resolution timer in seconds. The precise meaning of this value is operating system and hardware dependent, but the resolution should be better than the other time statistics, usually in the microsecond range. Only differences between two such times are meaningful, the absolute value does not have any specific meaning. If operating system or hardware do not provide such a timer, the value is the same as session_time.
Unit : bytes
Description : The amount of local stack currently allocated. The local stack is allocated in chunks, up to a maximum controlled by the -l command line option. The local and control stacks share the same memory area specified by the -l option, which thus gives the maximum combined allocated size of these two stacks.
Unit : bytes
Description : The peak allocated size of the local stack during this session. Chunks of memory can be allocated to, and deallocated from, the local stack as it grows and shrinks.
Unit : bytes
Description : The amount of local stack currently in use. This stack holds Prolog variables and return addresses.
Unit : List of bytes
Description : Returns a list of two numbers for the allocated global stack: the number of bytes currently used, and the number of bytes currently free. It is provided mainly for compatibility.
Unit : List of bytes
Description : Returns a list of two numbers on the current usage of the allocated local and control stacks. In the original WAM, these two stacks are combined into a single stack. This is provided for compatibility purposes only.
Unit : List of bytes
Description : Returns a list of two numbers for the allocated trail: the number of bytes currently used, and the number of bytes currently free. It is provided mainly for compatibility.
Unit : List of milliseconds (integers)
Description : Returns a list of two times: user cpu time since the start of the ECLiPSe session, user cpu time since the last call to statistics(runtime, _). As from ECLiPSe 4.2, these times exclude the time spent in garbage collection. This item is provided primarily for compatibility reasons.
Unit : seconds (float)
Description : Returns the real time elapsed since the start of a (parallel) ECLiPSe session. This is the only timer that can be reliably used in a parallel execution, since it accesses a central clock. All other timers are local to the worker where they are accessed.
Unit : bytes
Description : The amount of memory assigned to the code heap, i.e. the area used for storing compiled Prolog code, atoms, records, non-logical variables, descriptors, buffers etc. This area will never shrink.
Unit : bytes
Description : The amount of memory currently used for compiled Prolog code, atoms, records, non-logical variables, descriptors, buffers etc.
Unit : List of seconds (floats)
Description : Returns a list of three times: user cpu time, system cpu time and real time elapsed since the start of the ECLiPSe session.
Unit : bytes
Description : The amount of trail stack currently allocated. The trail is allocated in chunks, up to a maximum controlled by the -g command line option. The global stack and trail share the same memory area specified by the -g option, which thus gives the maximum possible combined allocated size of these two stacks.
Unit : bytes
Description : The peak allocated size of the trail stack during this session. Chunks of memory can be allocated to, and deallocated from, the trail stack as it grows and shrinks.
Unit : bytes
Description : The amount of trail stack currently in use. The trail stack records information needed for backtracking and is subject to garbage collection.
make :- current_compiled_file(File, Time, Module), get_file_info(File, mtime) =\\= Time, compile(File, Module), fail. make."), args:[], eg:" [eclipse 1]: [file1,file2]. file1.pl compiled traceable 40 bytes in 0.00 seconds file2.pl compiled traceable 40 bytes in 0.00 seconds yes. [eclipse 2]: sh(\"touch file1.pl\"). yes. [eclipse 3]: make. file1.pl compiled traceable 40 bytes in 0.00 seconds yes. ", see_also:['.' / 2, compile / 1, compile / 2, current_compiled_file / 3, ensure_loaded / 1]]). :- comment(profile / 1, [ summary:"Profile the goal and print the times spent in each predicate. ", amode:(profile(+) is det), desc:html("
\ This predicate invokes the profiler with default options. Equivalent to:
profile(Goal, []).See profile/2 for details. "), args:["Goal" : "Atom or a compound term."], exceptions:[6 : "Flags contains an illegal flag."], eg:" [eclipse 6]: profile(boyer). rewriting... proving... goal succeeded PROFILING STATISTICS -------------------- Goal: boyer Total user time: 10.65s Predicate Module %Time Time ------------------------------------------------- rewrite /2 eclipse 52.3% 5.57s garbage_collect /0 sepia_kernel 23.1% 2.46s rewrite_args /2 eclipse 16.6% 1.77s equal /2 eclipse 4.7% 0.50s ... plus /3 eclipse 0.1% 0.01s ", see_also:[get_flag / 2, profile / 2]]). :- comment(profile / 2, [ summary:"Profile the goal and print the times spent in each predicate. ", amode:(profile(+,++) is det), desc:html("
\ This predicate invokes the profiler. The profiler first executes Goal in profiling mode, which means that during its execution interrupts are generated at regular intervals and the profiler remembers the currently executing predicate. When the goal succeeds or fails, the profiler prints so, and then it prints the statistics about the time spent in every encountered predicate. Goal can be any Prolog goal, it does not have to be compiled in a special profiling mode and no Prolog flags have to be set. The time spent in simple predicates (i.e. those with call_type external, written in C) is counted towards their parent predicate.
In cases where the predicate name is not available, e.g. local goals in a locked module, the information is grouped under a blank predicate name entry for the module.
Flags is a list of option flags:
A temporary file <tmp_dir>/eclipse.prof.<pid> is used to collect the profiling information and is removed upon exit (unless keep_file option is given).
"), args:["Goal" : "Atom or a compound term.", "Flags" : "List of atoms."], exceptions:[6 : "Flags contains an illegal flag."], eg:" [eclipse 6]: profile(boyer, []). rewriting... proving... goal succeeded PROFILING STATISTICS -------------------- Goal: boyer Total user time: 10.55s Predicate Module %Time Time ------------------------------------------------- =.. /2 sepia_kernel 31.1% 3.28s garbage_collect /0 sepia_kernel 23.5% 2.48s rewrite /2 eclipse 21.6% 2.28s rewrite_args /2 eclipse 17.2% 1.82s equal /2 eclipse 4.1% 0.43s remainder /3 eclipse 0.9% 0.10s ... plus /3 eclipse 0.1% 0.01s yes. ", see_also:[get_flag / 2, profile / 1]]). :- comment(env / 0, [ summary:"Prints information about the current ECLiPSe environment on the current output. ", amode:(env is det), desc:html(" Prints a list of the current global flag values on the toplevel output stream. These are the same values that get_flag/2 provides."), args:[], eg:" [eclipse]: env. after_event_timer: real ignore_eof: off bounded: false last_errno: 0 break_level: 0 macro_expansion: on breal_exceptions: off max_global_trail: 134217728 coroutine: off max_local_control: 134217728 cwd_scope: process max_predicate_arity: 255 debug_compile: on object_suffix: \"dll\" debugging: nodebug output_mode: \"QPm\" eclipse_info_suffix: \".eci\" pid: 2856 eclipse_object_suffix: \".eco\" ppid: 0 enable_interrupts: on prefer_rationals: off float_precision: double print_depth: 20 gc: on remote_protocol_version:1 gc_interval: 4194304 toplevel_module: eclipse gc_interval_dict: 960 unix_time: 1326075378 gc_policy: adaptive version: '6.1' goal_expansion: on version_as_list: [6, 1, 99] hostarch: \"i386_linux\" cwd: \"/homes/john/\" default_language: eclipse_language extension: development occur_check dfid tmp_dir: \"/tmp\" hostid: \"A#032167137134\" hostname: \"foo.bar.com\" installation_directory: \"/usr/local/eclipse\" library_path: [\"/usr/local/eclipse/lib\", \"/usr/local/eclipse/lib_public\"] loaded_library: tracer_tty development_support toplevel eclipse_language suspend output_options: [depth(20), attributes(pretty), quoted(true), portrayed(true)] prolog_suffix: [\"\", \".ecl\", \".pl\"] syntax_option: nl_in_quotes no_blanks variable_names: check_singletons ", see_also:[get_flag / 2, set_flag / 2]]). :- comment(trimcore/0, [ summary:"Frees currently unused memory.", amode:(trimcore is det), desc: html("\ Calling this predicate will free some currently deallocated memory, such as memory occupied by retracted and abolished clauses. It also returns deallocated stack space back to the operating system.") ]). :- comment(garbage_collect / 0, [ summary:"Request an immediate garbage collection. ", amode:(garbage_collect is det), desc:html(" Causes an immediate garbage collection of the global and trail stack, provided that the garbage collector is not switched off (cf. set_flag/2). In any case the predicate succeeds.
Note that the garbage collector is usually triggered automatically, controlled by the user-definable flag gc_interval. Therefore, the usage of garbage_collect/0 should be restricted to situations where the automatic triggering performs badly. In this case it should be inserted in a place where it is known for sure that a lot of structures and lists have become useless, eg. just before a tail-recursive call as shown in the example.
"), args:[], eg:" cycle(OldState) :- transform(OldState, NewState), /* long computation */ !, garbage_collect, /* OldState is obsolete */ cycle(NewState). ", see_also:[env / 0, set_flag / 2, get_flag / 2]]). :- comment(get_flag / 2, [ summary:"Succeeds if the flag Flag has the value Value. ", amode:(get_flag(-,-) is nondet), amode:(get_flag(+,-) is nondet), index:[ after_event_timer, break_level, coroutine, cwd, cwd_scope, debug_compile, debugging, default_language, eclipse_info_suffix, eclipse_object_suffix, tmp_dir, enable_interrupts, extension, float_precision, gc, gc_interval, gc_interval_dict, gc_policy, goal_expansion, hostarch, hostid, hostname, ignore_eof, installation_directory, last_errno, library_path, loaded_library, macro_expansion, max_integer, max_global_trail, max_local_control, max_predicate_arity, object_suffix, occur_check, output_mode, output_options, pid, ppid, prefer_rationals, print_depth, prolog_suffix, remote_protocol_version, syntax_option, toplevel_module, unix_time, variable_names, version, version_as_list, worker, workers, workerids, wm_window, % syntax options atom_subscripts, bar_is_no_atom, bar_is_semicolon, based_bignums, blanks_after_sign, blanks_in_nil, curly_args_as_list, doubled_quote_is_quote, float_needs_point, general_subscripts, iso_base_prefix, iso_escapes, iso_restrictions, limit_arg_precedence, nested_comments, nl_in_quotes, no_array_subscripts, no_attributes, no_blanks, no_curly_arguments, plus_is_no_sign, read_floats_as_breals, var_functor_is_apply ], desc:html(" Used to return or check the environment flag Flag with value Value. The environment flags which are read/write may be updated using set_flag/2. The current values of the environment flags are returned by env/0.
The following list details the environment flags:
Access mode : read/write
Type : Atomic constant real or virtual
Description : Specifies the timer used for event_after/2 and event_after_every/2.
Access mode : read/write
Type : Integer
Description : Specifies current nesting level of recursive top-level loops.
Access mode : read/write
Type : Atomic constant on or off
Default : off
Description : If on, unifying or testing bounded reals for identity raises an 'undecidable comparison of bounded reals' exception in case the comparison is undecidable (i.e. the bounds overlap). If off, bounded reals compare equal when their bounds are equal. This flag does not affect arithmetic comparisons.
Access mode : read/write
Type : Atomic constant on or off
Default : configuration dependent
Description : Specifies whether built-in predicates delay or raise instantiation faults.
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.
Type : Atomic constant process or separate
Description : Specifies whether cd/1, getcwd/1, the cwd flag and relative path names refer the process's current directory ('process'), or to the ECLiPSe system's own idea of current directory ('separate'). Note that the effective current directory may change when the cwd_mode is switched, as no synchronisation is done.
Access mode : read/write
Type : Atomic constant on or off
Default : on
Description : Specifies whether clauses are compiled for debugging or not. May be overwritten on a file by file basis using pragma(debug) or pragma(nodebug).
Access mode : read-only
Type : Atomic constant nodebug, creep, or leap
Default : nodebug
Description : Specifies whether debugging is disabled (nodebug) or \tenabled. trace/0 sets the creep mode, debug/0 sets the leap mode.
Access mode : read/write
Type : Atom
Default : eclipse_language
Description : Specifies the source language dialect for modules which are created without an explicit language specification (module/1 directive or the create_module/1). Other possible settings are for example 'iso' or 'sicstus'.
Access mode : read
Type : String
Default : \".eci\"
Description : Specifies the ECLiPSe information file suffix used when a file is generated by icompile/1. The suffix will be automatically appended to the base file name when the information file is generated.
Access mode : read
Type : String
Default : \".eco\"
Description : Specifies the ECLiPSe object file suffix used when a file is fcompiled. The suffix will be automatically appended to the file's base name when the object file is generated. When loading a file (e.g. use_module/1, lib/1), the system will try to find an object file before a source file by appending the given suffix before the source suffix(es).
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.
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.
Access mode : read-only
Type : Atomic constant
Default : double
Description : This flag is obsolete. Its value is always double.
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 log_output (verbose).
Access mode : read/write
Type : Atomic constant adaptive or fixed.
Default : adaptive
Description : This option affects the triggering heuristics of the garbage collector, together with the gc_interval setting. The adaptive policy minimises garbage collection time, while the fixed policy minimises space consumption.
Access mode : read/write
Type : Integer
Default : 1/32 of global stack size, at least 64KB
Description : Specify how often the collector is invoked. Roughly, the argument specifies the minimum number of bytes a program must have newly allocated 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. This is normally only necessary when the gc_policy is set to fixed. With gc_policy set to adaptive, the collection intervals will be adjusted automatically. See also gc_policy setting.
Access mode : read/write
Type : Integer
Default : 960
Description : Specify after how many new dictionary entries the dictionary garbage collector is invoked.
Access mode : read/write
Type : Atomic constant on or off
Default : on
Description : Specifies whether goal expansion (inling) is done by the compiler or other source processing tools. Can be disabled for debugging purposes, but usually it is preferable to use a compiler/source-processor option or a pragma for this purpose.
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.
Access mode : read-only
Type : String
Description : The unique identification of the host machine that the system is running on.
Access mode : read-only
Type : string
Description : The name of the current host machine.
Access mode : read/write
Type : Atomic constant on or off
Description : Controls whether ECLiPSe can be exited by typing an end-of-file to the toplevel-prompt or whether this is ignored. If ignored, ECLiPSe can be exited by calling halt/0.
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.
Access mode : read-only
Type : Integer
Description : The error code that the most recent failed operating system call returned. This should no longer be used because of portability problems, use errno_id/1 instead.
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 for autoloading, and to expand library/1 structures in pathnames.
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.
Access mode : read/write
Type : Atomic constant on or off
Default : on
Description : Specifies whether macro expansion (including clause expansion and goal expansion/inlining) is enabled or disabled. Should be disabled only for very specific debugging purposes. It is preferrable to disable macro expansion on a per-stream basis (see set_stream_property/3) or via a source-processor option.
Access mode : read-only
Type : Integer
Description : If the range of integer is bounded (i.e. bignums not supported), returns the maximum representable integer value. Fails if the integer range is unbounded.
Access mode : read-only
Type : Integer
Description : The maximum size in bytes to which the global/trail stack can grow. See also statistics/2.
Access mode : read-only
Type : Integer
Description : The maximum size in bytes to which the global/trail stack can grow. See also statistics/2.
Access mode : read-only
Type : Integer
Default : 255
Description : Returns the maximum number of arguments allowed for an ECLiPSe predicate.
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.
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. Note that as ECLiPSe built-ins are compiled with this flag off, so the occur check is never performed with built-ins.
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. See also the output_options flag.
Access mode : read/write
Type : List of structures
Default : [depth(20), attributes(pretty), ...]
Description : The value is an output options list as understood by write_term/2,3. This format is used to output results on the toplevel loop and to print debugger trace lines. This flag is an alternative, more readable representation of the values of the print_depth and output_mode flag. It reflects the values of those flags and will change their values whenever it is changed itself.
Access mode : read-only
Type : Integer
Description : Returns the process identifier of the current ECLiPSe .
Access mode : read-only
Type : Integer
Description : Returns the process identifier of the current ECLiPSe 's parent process.
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.
Access mode : read/write
Type : Integer
Default : 20
Description : Specifies the print depth bound for printing compound terms. It is not taken into account by the output predicates that produce machine-readable output (write_canonical, writeq, etc), but other I/O built-ins obey this flag. Identical to the depth(N) component of the output_options flag.
Access mode : read/write
Type : List of strings
Default : [\"\", \".ecl\", \".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.
Access mode : read only
Type : Integer
Description : Specifies the version of the protocol which this Eclipse uses to communicate with remotely attached peers. See Embedding and Interfacing Manual: The Remote Interface Protocol.
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:
base'number
notation.
Access mode : read/write
Type : String
Default : configuration dependent (see Description below)
Description : Specifies the temporary directory that ECLiPSe may use for storing temporary data files. Value should be an existing directory (in ECLiPSe's file name syntax) that the user can write to (set_flag/2 will fail otherwise). It is also recommended that the directory should reside on a local disk where the I/O operations are as fast as possible.
By default, this directory is taken from the environment variable ECLIPSETMP if it exist. Otherwise, it is \"/tmp\" for Unix systems; \"//C/Temp\" for Windows. If none of these exist, it is set to the current working directory at start up.
Access mode : read/write
Type : Atom
Default : eclipse
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.
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.
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.
Access mode : read-only
Type : Atom
Description : Returns the current version number of ECLiPSe .
Access mode : read-only
Type : List of integers
Description : Returns a list of integers, starting with your ECLiPSe system's major version number, and ending with its build number. Note that this list can be used for lexicographic comparison, e.g. [5,3,17] @>= [5,3] or [5,3,17] @>= [5,1,24].
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.
Access mode : read/write
Type : A structure Host:N, where Host is an atom and N integer
Description : In a parallel session it returns a positive number for N, which is the number of active workers on a given host Host. If Host is a variable, it is bound to the host name where this predicate is executed.
Access mode : read-only
Type : A structure Host:ActiveList+AsleepList, where Host is an atom and ActiveList and AsleepList are integer lists
Description : In a parallel session it returns the workerid lists of of both active and asleep workers on a given host Host. If Host is a variable, it is bound to the host name where this predicate is executed.
Access mode : read/write
Type : Atomic constant on or off
Description : In a parallel session this flag tells if the window interface for the worker manager is on or off.
"), args:["Flag" : "Atom or Variable.", "Value" : "Prolog term."], exceptions:[5 : "Flag is neither an atom nor variable."], eg:" Success: [eclipse]: get_flag(gc, X). X = on yes. [eclipse]: get_flag(loaded_library, L). L = lists More? (;) L = development_support More? (;) yes. Error: get_flag(1,X). (Error 5) ", see_also:[set_flag / 2, env / 0, errno_id / 1]]). :- comment((help) / 1, [ summary:"Prints help information on the specified predicate in PredSpec on the current output. ", amode:(help(+) is semidet), desc:html("\ Prints help information about the specified predicates to the current output. The information displayed is a text version of the reference manual. If only Name is specified, the system looks for all predicates that have this atom in their name. If there are more than one predicate matching, a short description for each one is printed, rather than the whole page. For instance, help var prints the short description of get_var_info/3, nonvar/1, readvar/3, var/1 and variant/2, whereas help dv prints the whole reference manual page for readvar/3.
Help information is available for both built-ins (those predicates defined in eclipse_language) and library predicates. If a particular predicate is available in more than one library, the user can specify Module:Name/Arity for PredSpec where Module is the name of the library to select a specific predicate description. If a predicate is available both as a built-in and library predicate(s), then the built-in will be printed in full, while short descriptions are given for the library predicates.
In addition, if information on library is available, help lib(LibraryName) can be used to obtain this information. "), args:["PredSpec" : "Predicate/Library specification in form Name/Arity or Module:Name/Arity, lib(Name), or an atom Name"], fail_if:"Fails if no help is available for PredSpec", eg:" Success: help(nl/0). % Displays reference page on nl/0 help(write/X). % Displays short description of % write/1 and write/2 help(fd:(::)/2). % Displays the reference page for fd's ::/2. help((=:=)/2). % Displays reference page for the built-in =:=/2, % and short description of the other instances of =:=/2. help(lib(eplex)). % Displays the reference page for the library eplex. help(X). % Displays short description of % all built-ins Fail: help(nobip/1). ", see_also:[current_built_in / 1]]). :- comment(pred / 1, [ summary:"The flags of the predicate described by PredSpec are printed out on the current output. ", amode:(pred(++) is semidet), desc:html(" Used to print on the current output the flags of the visible predicate described by PredSpec. For the description of the flags see get_flag/3.
"), args:["PredSpec" : "Predicate name in the form Atom/Integer"], fail_if:"Fails if PredSpec does not exist", exceptions:[4 : "PredSpec is not instantiated", 5 : "PredSpec is not in the format Atom/Integer"], eg:" ?- pred(pred/1). mode pred(?) visibility imported definition_module sepia_kernel declared on defined on autoload off auxiliary off call_type prolog demon off deprecated off parallel off priority 2 run_priority 2 stability static tool on type built_in debugged on leash notrace skip on spy off start_tracing off port_calls [] port_lines [] break_lines [] code_size 10 Yes (0.01s cpu) ?- pred(nopred/1). No (0.00s cpu) ", see_also:[get_flag / 3, set_flag/3, current_built_in / 1]]). :- comment(set_flag / 2, [ summary:"Succeeds if the flag Flag is successfully set to the value Value. ", amode:(set_flag(+,++) is det), desc:html(" Used to set the environment flag Flag to the value Value. The current value of a flag may be returned using get_flag/2. Refer to the specification of get_flag/2 for details about each of the environment flags.
"), args:["Flag" : "Atom.", "Value" : "Atomic or compound term."], exceptions:[4 : "Flag and/or Value are not instantiated.", 5 : "Flag is neither an atom nor a variable.", 5 : "Value is not of the expected type.", 6 : "Flag and/or Value are out of range.", 30 : "Flag is a read-only flag."], eg:" Success: set_flag(gc,verbose). set_flag(syntax_option, no_blanks). set_flag(syntax_option, not nl_in_quotes). % The following example will set a new library path [eclipse]: get_flag(library_path,Path), set_flag(library_path, [\"/home/myuser/mylibs\" | Path]). Path = [\"/usr/local/ECLIPSE/lib\"] yes. Fail: set_flag(statistics, some). Error: set_flag(X,a). (Error 4) set_flag(\"a\",x). (Error 5) set_flag(blah, a). (Error 6) set_flag(gc,fred). (Error 6) set_flag(version,1). (Error 30) ", see_also:[get_flag / 2, env / 0, cd / 1, compile / 1, compile / 2, (dynamic) / 1, pragma / 1, lib / 1]]). :- comment(statistics / 0, [ summary:"Prints information about resource usage and garbage collection. ", amode:(statistics is det), desc:html(" Prints information about resource usage and garbage collection on the log_output stream. This information is also provided by statistics/2. Please refer to statistics/2 for a description of the statistic items. Times are displayed in seconds, memory sizes in bytes.
"), args:[], eg:" ?- statistics. times: [25.53, 30.64, 31548.76] seconds session_time: 31548.765625 seconds event_time: 31548.765625 seconds hr_time: 567247.01280051 seconds global_stack_used: 2632 bytes global_stack_allocated: 4259840 bytes global_stack_peak: 134152192 bytes trail_stack_used: 200 bytes trail_stack_allocated: 327680 bytes trail_stack_peak: 4259840 bytes control_stack_used: 600 bytes control_stack_allocated: 65536 bytes control_stack_peak: 65536 bytes local_stack_used: 364 bytes local_stack_allocated: 65536 bytes local_stack_peak: 65536 bytes shared_heap_allocated: 2985984 bytes shared_heap_used: 2900104 bytes private_heap_allocated: 139264 bytes private_heap_used: 132048 bytes gc_number: 46 gc_collected: 6509080.0 bytes gc_area: 46688728 bytes gc_ratio: 0.303074122993982 % gc_time: 14.046 seconds dictionary_entries: 6699 dict_hash_usage: 3847 / 8192 dict_hash_collisions: 1327 / 3847 dict_gc_number: 23 dict_gc_time: 0.0 seconds ", see_also:[statistics / 2]]).