Author(s): Manuel Carro, Daniel Cabeza, Mats Carlsson.
Version: 1.10#7 (2006/4/26, 19:22:13 CEST)
Version of last change: 1.9#92 (2003/7/24, 8:4:39 CEST)
This module implements some miscellaneous predicates which provide access to some internal statistics, special properties of the predicates, etc.
prolog_sys
)prolog_sys
)Usage:
Usage 1: statistics(Time_option, Time_result)
Time_option
must be one of runtime
, walltime
.
(prolog_sys:time_option/1
)
Time_result
is any term.
(basic_props:term/1
)
Time_option
must be one of runtime
, walltime
.
(prolog_sys:time_option/1
)
Time_result
is a two-element list of integers. The first integer is the time since the start of the execution; the second integer is the time since the previous consult to time.
(prolog_sys:time_result/1
)
Usage 2: statistics(Memory_option, Memory_result)
prolog_sys:memory_option/1
)
Memory_result
is any term.
(basic_props:term/1
)
prolog_sys:memory_option/1
)
Result is a two-element list of integers. The first element is the space taken up by the option selected, measured in bytes; the second integer is zero for program space (which grows as necessary), and the amount of free space otherwise.
(prolog_sys:memory_result/1
)
Usage 3: statistics(Garbage_collection_option, Gc_result)
prolog_sys:garbage_collection_option/1
)
Gc_result
is any term.
(basic_props:term/1
)
prolog_sys:garbage_collection_option/1
)
Gc_result
is a tree-element list of integers, related to
garbage collection and
memory management. When stack_shifts
is selected, the first one is the number of shifts (reallocations) of the local stack; the second is the number of shifts of the trail, and the third is the time spent in these shifts. When garbage_collection
is selected, the numbers are, respectively, the number of garbage collections performed, the number of bytes freed, and the time spent in garbage collection.
(prolog_sys:gc_result/1
)
Usage 4: statistics(Symbol_option, Symbol_result)
prolog_sys:symbol_option/1
)
Symbol_result
is any term.
(basic_props:term/1
)
prolog_sys:symbol_option/1
)
Symbol_result
is a two-element list of integers. The first one is the number of atom, functor, and predicate names in the symbol table. The second is the number of predicates known to be defined (although maybe without clauses).
(prolog_sys:symbol_result/1
)
Usage 5: statistics(Option, ?term)
Option
is unbound, it is bound to the values on the other cases.
Usage: predicate_property(Head, Property)
Head
is Property
.
Head
is any term.
(basic_props:term/1
)
Property
is any term.
(basic_props:term/1
)
Head
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Property
is an atom.
(basic_props:atm/1
)
Usage: current_atom(Atom)
Atom
is a free variable.
(term_typing:var/1
)
Atom
is an atom.
(basic_props:atm/1
)
Usage:
Usage: new_atom(Atom)
Atom
is a free variable.
(term_typing:var/1
)
Atom
is an atom.
(basic_props:atm/1
)
prolog_sys
)
Usage: time_option(M)
M
must be one of runtime
, walltime
.
Usage: memory_option(M)
Usage: garbage_collection_option(M)
Usage: symbol_option(M)
Usage: time_result(Result)
Result
is a two-element list of integers. The first integer is the time since the start of the execution; the second integer is the time since the previous consult to time.
Usage: memory_result(Result)
Usage: gc_result(Result)
Result
is a tree-element list of integers, related to
garbage collection and
memory management. When stack_shifts
is selected, the first one is the number of shifts (reallocations) of the local stack; the second is the number of shifts of the trail, and the third is the time spent in these shifts. When garbage_collection
is selected, the numbers are, respectively, the number of garbage collections performed, the number of bytes freed, and the time spent in garbage collection.
Usage: symbol_result(Result)
Result
is a two-element list of integers. The first one is the number of atom, functor, and predicate names in the symbol table. The second is the number of predicates known to be defined (although maybe without clauses).
prolog_sys
)Go to the first, previous, next, last section, table of contents.