@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
8 lines • 5.61 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>Filed predicates — 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="ExtendLang.html">↑</a><a class="lpdoc-navbutton" href="datadir.html">←</a><a class="lpdoc-navbutton" href="factsdb_rt.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="ExtendLang.html">PART IV - Language extensions</a> »<br/> </li><li><a href=""><strong>Filed predicates</strong></a> ▾<ul><li><a href="factsdb_rt.html">Filed predicates (runtime)</a></li></ul></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 multifiles">Documentation on multifiles</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Filed predicates</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#factsdb"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Francisco Bueno" href="ciaosearch.html#Francisco Bueno">Francisco Bueno</a>.<p>
This package allows using files as a ``<a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#cache">cache</a>'' for predicates defined by facts. This is useful for huge tables of facts that may push the memory limits of the system too far. Goals of a <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#filed predicate">filed predicate</a> are executed simply by reading from the corresponding file.<p>Anything in the DB file used for the predicate that is different from a fact for the corresponding predicate is ignored. Each call to a filed predicate forces opening the file, so the use of this package is subject to the limit on the number of open files that the system can support.<p>Dynamic modification of the filed predicates is also allowed during execution of the program. Thus filed predicates are regarded as dynamic, data predicates residing in a file. However, dynamic modifications to the predicates do not affect the file, unless the predicate is also declared persistent.<p>The package is compatible with <a class="lpdoc-idx-anchor" id="2" href="ciaosearch.html#persdb"><tt>persdb</tt></a> in the sense that a predicate can be made both filed and persistent. In this way, the predicate can be used in programs, but it will not be loaded (saving memory), can also be modified during execution, and modifications will persist in the file. Thus, the user interface to both packages is the same (so the DB file must be one for both filing and persistency). <br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/>This facility is used as a package, thus either including <a class="lpdoc-idx-anchor" id="3" href=""><tt>factsdb</tt></a> in the package list of the module, or by using the <a class="lpdoc-idx-anchor" id="4" href="toplevel_doc.html#use_package/1"><tt>use_package/1</tt></a> declaration. The facility predicates are defined in library module <a class="lpdoc-idx-anchor" id="5" href="factsdb_rt.html"><tt>factsdb_rt</tt></a>.<li><strong>New operators defined:</strong><br/><a class="lpdoc-idx-anchor" id="6" href="datafacts_rt.html#concurrent/1"><tt>concurrent/1</tt></a> [1150,fx], <a class="lpdoc-idx-anchor" id="7" href="datafacts_rt.html#data/1"><tt>data/1</tt></a> [1150,fx].
<li><strong>Implicit imports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="8" href="datafacts_rt.html"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="factsdb_rt.html"><tt>factsdb_rt</tt></a>.
<li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="10" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="datafacts_doc.html"><tt>datafacts</tt></a>.
</ul></ul></div></div><div id="Documentation on multifiles"><h2>Documentation on multifiles</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="$factsdb$cached_goal/3" href="ciaosearch.html#$factsdb$cached_goal/3">$factsdb$cached_goal/3</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.
The predicate is <em>multifile</em>.<br/></div></div><p>
</div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>