Go to the first, previous, next, last section, table of contents.


Gathering some basic internal info

Author(s): Daniel Cabeza, Manuel Carro.

Version: 1.5#118 (2000/4/19, 18:13:43 CEST)

Version of last change: 1.3#13 (1999/7/2, 18:49:49 MEST)

............... In development ...............

Usage and interface (system_info)

Documentation on exports (system_info)

PREDICATE: get_arch/1:

This predicate will describe the computer architecture wich is currently executing the predicate.

Computer architectures are identified by a simple atom. This atom is implementation-defined, and may suffer any change from one Ciao Prolog version to another.

For example,Ciao Prolog running on an Intel-based machine will retrieve:

?- get_arch(I).

I = i86 ? ;

no
?- 

Usage 1: get_arch(?(ArchDescriptor))

Usage 2: get_arch(ArchDescriptor)

PREDICATE: get_os/1:

This predicate will describe the Operating System which is running on the machine currently executing the Prolog program.

Operating Systems are identified by a simple atom. This atom is implementation-defined, and may suffer any change from one Ciao Prolog version to another.

For example,Ciao Prolog running on Linux will retrieve:

?- get_os(I).

I = 'LINUX' ? ;

no
?- 

Usage 1: get_os(?(OsDescriptor))

Usage 2: get_os(OsDescriptor)

PREDICATE: this_module/1:

Meta-predicate with arguments: this_module(addmodule).

Usage 1:

Usage 2:

PREDICATE: current_module/1:

This predicate will successively unify its argument with all module names currently loaded. Module names will be simple atoms.

When called using a free variable as argument, it will retrieve on backtracking all modules currently loaded. This is usefull when called from the Ciao toplevel.

When called using a module name as argument it will check whether the given module is loaded or not. This is usefull when called from user programs.

Usage 1: current_module(Module)

Usage 2: current_module(Module)

PREDICATE: ciaolibdir/1:

Usage 1: ciaolibdir(CiaoPath)

Usage 2: ciaolibdir(CiaoPath)

Documentation on internals (system_info)

PROPERTY: internal_module_id/1:

For a user file it is a term user/1 with an argument different for each user file, for other modules is just the name of the module (as an atom).

Usage: internal_module_id(M)


Go to the first, previous, next, last section, table of contents.