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


Gathering some basic internal info

Author(s): Daniel Cabeza, Manuel Carro.

Version: 1.11#222 (2004/5/24, 13:8:7 CEST)

Version of last change: 1.11#9 (2003/4/7, 14:1:46 CEST)

This module provides predicates which return basic internal info.

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: 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: get_os(OsDescriptor)

PREDICATE: this_module/1:

Meta-predicate with arguments: this_module(addmodule).

Usage: this_module(Module)

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: current_module(Module)

PREDICATE: ciaolibdir/1:

Usage: 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.