@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
54 lines (50 loc) • 12.8 kB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Runtime system information — The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">☰</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="StdLibs.html">↑</a><a class="lpdoc-navbutton" href="runtime_control.html">←</a><a class="lpdoc-navbutton" href="assrt_lib.html">→</a><a class="lpdoc-navbutton" href="ciaosearch.html">🔍</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> »<br/> </li><li><a href="StdLibs.html">PART VII - Standard libraries</a> »<br/> </li><li><a href=""><strong>Runtime system information</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Runtime system information</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#system_info"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="Manuel Carro" href="ciaosearch.html#Manuel Carro">Manuel Carro</a>, <a class="lpdoc-idx-anchor" id="Jose F. Morales" href="ciaosearch.html#Jose F. Morales">Jose F. Morales</a>.<p>
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.).<br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(engine(system_info)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#get_arch/1"><tt>get_arch/1</tt></a>, <a class="lpdoc-idx-anchor" id="1" href="#get_os/1"><tt>get_os/1</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#get_platform/1"><tt>get_platform/1</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#eng_debug_level/1"><tt>eng_debug_level/1</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#eng_is_sharedlib/0"><tt>eng_is_sharedlib/0</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#get_ciao_ext/1"><tt>get_ciao_ext/1</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#get_exec_ext/1"><tt>get_exec_ext/1</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#get_so_ext/1"><tt>get_so_ext/1</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#get_a_ext/1"><tt>get_a_ext/1</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#ciao_c_headers_dir/1"><tt>ciao_c_headers_dir/1</tt></a>.
</ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_arch/1" href="ciaosearch.html#get_arch/1">get_arch/1</a></div><div class="lpdoc-deftext">This predicate will describe the computer architecture wich is currently executing the predicate.<p>Computer architectures are identified by a simple atom. This atom is implementation-defined, and may suffer any change from one Ciao version to another.<p>For example, Ciao running on an 32-bit Intel-based machine will retrieve: <pre class="lpdoc-codeblock">?- get_arch(I).
I = i686 ? ;
no
?-
</pre> <p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_arch(ArchDescriptor)</tt>
</span><p>Unifies <span class="lpdoc-var">ArchDescriptor</span> with a simple atom which describes the computer architecture currently executing the predicate.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="10" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">ArchDescriptor</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_os/1" href="ciaosearch.html#get_os/1">get_os/1</a></div><div class="lpdoc-deftext">This predicate will describe the operating system which is running on the machine currently executing the Prolog program.<p>Operating systems are identified by a simple atom. This atom is implementation-defined, and may suffer changes from one Ciao version to another.<p>For example, Ciao running on Linux will retrieve: <pre class="lpdoc-codeblock">?- get_os(I).
I = 'LINUX' ? ;
no
?-
</pre> <p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_os(OsDescriptor)</tt>
</span><p>Unifies <span class="lpdoc-var">OsDescriptor</span> with a simple atom which describes the running operating system when predicate was called.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="11" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">OsDescriptor</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_platform/1" href="ciaosearch.html#get_platform/1">get_platform/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_platform(Platform)</tt>
</span><p><span class="lpdoc-var">Platform</span> is the atom describing the current operating system and computer architecture.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="12" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Platform</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="eng_debug_level/1" href="ciaosearch.html#eng_debug_level/1">eng_debug_level/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>eng_debug_level(Debug)</tt>
</span><p>Unifies <span class="lpdoc-var">Debug</span> with the value of <tt>core:debug_level</tt> configuration flag used to build this engine.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="13" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Debug</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="eng_is_sharedlib/0" href="ciaosearch.html#eng_is_sharedlib/0">eng_is_sharedlib/0</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><p>This engine is linked as a shared library (instead of as an executable)</p><ul class="lpdoc-itemize-minus"></ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_ciao_ext/1" href="ciaosearch.html#get_ciao_ext/1">get_ciao_ext/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_ciao_ext(Ext)</tt>
</span><p><span class="lpdoc-var">Ext</span> is the default extension for the executable Ciao programs.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="14" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Ext</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_exec_ext/1" href="ciaosearch.html#get_exec_ext/1">get_exec_ext/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_exec_ext(Ext)</tt>
</span><p><span class="lpdoc-var">Ext</span> is the extension for executables.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="15" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Ext</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_so_ext/1" href="ciaosearch.html#get_so_ext/1">get_so_ext/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_so_ext(Ext)</tt>
</span><p><span class="lpdoc-var">Ext</span> is the default extension for the shared libraries. For example, <tt>.dll</tt> in Windows and <tt>.so</tt> in most Unix systems.</p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="16" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Ext</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_a_ext/1" href="ciaosearch.html#get_a_ext/1">get_a_ext/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_a_ext(Ext)</tt>
</span><p><span class="lpdoc-var">Ext</span> is the default extension for the static libraries.</p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="17" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Ext</span> is an atom.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ciao_c_headers_dir/1" href="ciaosearch.html#ciao_c_headers_dir/1">ciao_c_headers_dir/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ciao_c_headers_dir(Path)</tt>
</span><p><span class="lpdoc-var">Path</span> is the path to the root of the installed Ciao header C files (.h), typically used for interfacing Ciao and C.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="18" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Path</span> is an atom.
</span>
</ul></div></div><p>
</div><div id="Documentation on imports"><h2>Documentation on imports</h2>This module has the following direct dependencies:<ul class="lpdoc-itemize-minus"><li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="19" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="23" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="ciaosearch.html#nortchecks"><tt>nortchecks</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="isomodes_doc.html"><tt>isomodes</tt></a>.
</ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>