Runtime system information

Author(s): Daniel Cabeza, Manuel Carro, Jose F. Morales.

This module provides internal information about the current running runtime system (engine and enviroment). That information includes the architecture, platform, operating system, location of libraries, and C header files. That information is mainly used in parts of the Ciao dynamic compilation (location of source, generation of gluecode for the foreign interface, etc.).

Usage and interface

Documentation on exports

PREDICATEget_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 version to another.

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

?- get_arch(I).

I = i686 ? ;

no
?-

Usage:get_arch(ArchDescriptor)

Unifies ArchDescriptor with a simple atom which describes the computer architecture currently executing the predicate.

  • The following properties hold upon exit:
    (basic_props:atm/1)ArchDescriptor is an atom.

PREDICATEget_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 changes from one Ciao version to another.

For example, Ciao running on Linux will retrieve:

?- get_os(I).

I = 'LINUX' ? ;

no
?-

Usage:get_os(OsDescriptor)

Unifies OsDescriptor with a simple atom which describes the running operating system when predicate was called.

  • The following properties hold upon exit:
    (basic_props:atm/1)OsDescriptor is an atom.

Usage:get_platform(Platform)

Platform is the atom describing the current operating system and computer architecture.

Usage:eng_debug_level(Debug)

Unifies Debug with the value of core:debug_level configuration flag used to build this engine.

Usage:

This engine is linked as a shared library (instead of as an executable)

    Usage:get_ciao_ext(Ext)

    Ext is the default extension for the executable Ciao programs.

    Usage:get_exec_ext(Ext)

    Ext is the extension for executables.

    PREDICATEget_so_ext/1

    Usage:get_so_ext(Ext)

    Ext is the default extension for the shared libraries. For example, .dll in Windows and .so in most Unix systems.

    PREDICATEget_a_ext/1

    Usage:get_a_ext(Ext)

    Ext is the default extension for the static libraries.

    Usage:ciao_c_headers_dir(Path)

    Path is the path to the root of the installed Ciao header C files (.h), typically used for interfacing Ciao and C.

    Documentation on imports

    This module has the following direct dependencies: