Author(s): Manuel Carro, Daniel Cabeza, Mats Carlsson.
Version: 1.11#222 (2004/5/24, 13:8:7 CEST)
Version of last change: 1.11#57 (2003/11/24, 18:3:15 CET)
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, usertime, systemtime or walltime.
(prolog_sys:time_option/1)
Time_result is any term.
(basic_props:term/1)
Time_option must be one of runtime, usertime, systemtime or walltime.
(prolog_sys:time_option/1)
Time_result is a two-element list of numbers. The first number is the time since the start of the execution; the second number is the time since the previous consult to time.
(prolog_sys:time_result/1)
Usage 2: statistics(Click_option, Click_result)
prolog_sys:click_option/1)
Click_result is any term.
(basic_props:term/1)
prolog_sys:click_option/1)
Click_result is a two-element list of numbers. The first number is the number of clicks since the start of the execution; the second number is the number of clicks since the previous consult to click.
(prolog_sys:click_result/1)
Usage 3: statistics(Clockfreq_option, Clockfreq_result)
prolog_sys:clockfreq_option/1)
Clockfreq_result is any term.
(basic_props:term/1)
prolog_sys:clockfreq_option/1)
Clockfreq_result is a number. It gives the frequency in hertzios used by the clock used to get the clicks.
(prolog_sys:clockfreq_result/1)
Usage 4: 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 5: 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 6: 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 7: statistics(Option, Arg2)
Option is unbound, it is bound to the values on the other cases.
Arg2 is any term.
(basic_props:term/1)
Arg2 is any term.
(basic_props:term/1)
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, usertime, systemtime or 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 numbers. The first number is the time since the start of the execution; the second number is the time since the previous consult to time.
Usage: click_result(Result)
Result is a two-element list of numbers. The first number is the number of clicks since the start of the execution; the second number is the number of clicks since the previous consult to click.
Usage: clockfreq_result(Result)
Result is a number. It gives the frequency in hertzios used by the clock used to get the clicks.
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.