Sophie

Sophie

distrib > Mandriva > 2010.2 > x86_64 > by-pkgid > 6c04b069ac210850db36a09a9605e102 > files > 78

ocaml-facile-doc-1.1-2mdv2010.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Fcl_float.html">
<link rel="next" href="Fcl_domain.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Fcl_genesis" rel="Chapter" href="Fcl_genesis.html">
<link title="Fcl_debug" rel="Chapter" href="Fcl_debug.html">
<link title="Fcl_misc" rel="Chapter" href="Fcl_misc.html">
<link title="Fcl_float" rel="Chapter" href="Fcl_float.html">
<link title="Fcl_stak" rel="Chapter" href="Fcl_stak.html">
<link title="Fcl_domain" rel="Chapter" href="Fcl_domain.html">
<link title="Fcl_setDomain" rel="Chapter" href="Fcl_setDomain.html">
<link title="Fcl_data" rel="Chapter" href="Fcl_data.html">
<link title="Fcl_cstr" rel="Chapter" href="Fcl_cstr.html">
<link title="Fcl_var" rel="Chapter" href="Fcl_var.html">
<link title="Fcl_reify" rel="Chapter" href="Fcl_reify.html">
<link title="Fcl_invariant" rel="Chapter" href="Fcl_invariant.html">
<link title="Fcl_boolean" rel="Chapter" href="Fcl_boolean.html">
<link title="Fcl_alldiff" rel="Chapter" href="Fcl_alldiff.html">
<link title="Fcl_linear" rel="Chapter" href="Fcl_linear.html">
<link title="Fcl_nonlinear" rel="Chapter" href="Fcl_nonlinear.html">
<link title="Fcl_expr" rel="Chapter" href="Fcl_expr.html">
<link title="Fcl_arith" rel="Chapter" href="Fcl_arith.html">
<link title="Fcl_interval" rel="Chapter" href="Fcl_interval.html">
<link title="Fcl_gcc" rel="Chapter" href="Fcl_gcc.html">
<link title="Fcl_fdArray" rel="Chapter" href="Fcl_fdArray.html">
<link title="Fcl_conjunto" rel="Chapter" href="Fcl_conjunto.html">
<link title="Fcl_sorting" rel="Chapter" href="Fcl_sorting.html">
<link title="Fcl_goals" rel="Chapter" href="Fcl_goals.html">
<link title="Fcl_opti" rel="Chapter" href="Fcl_opti.html">
<link title="Facile" rel="Chapter" href="Facile.html"><link title="Access" rel="Section" href="#2_Access">
<link title="Control" rel="Section" href="#2_Control">
<link title="Backtrackable References" rel="Section" href="#2_BacktrackableReferences">
<title>Fcl_stak</title>
</head>
<body>
<div class="navbar"><a href="Fcl_float.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Fcl_domain.html">Next</a>
</div>
<center><h1>Module <a href="type_Fcl_stak.html">Fcl_stak</a></h1></center>
<br>
<pre><span class="keyword">module</span> Fcl_stak: <code class="code">sig</code> <a href="Fcl_stak.html">..</a> <code class="code">end</code></pre><a name="1_GlobalStackofGoalsBacktrackableOperations"></a>
<h1>Global Stack of Goals, Backtrackable Operations</h1><br>
<hr width="100%">
<br>
This module provides functions to control the execution of the goal
   stack, as well as <em>backtrackable references</em>, i.e. mutable data
   structures restored on backtracking. Nota: the module name
   <code class="code">Stak</code> lacks a '<code class="code">c</code>' because of a possible clash with the OCaml
   standard library module <code class="code">Stack</code>.<br>
<br>
<a name="2_Access"></a>
<h2>Access</h2><br>
<pre><span class="keyword">type</span> <a name="TYPElevel"></a><code class="type"></code>level </pre>
<div class="info">
Type of a level in the stack.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALolder"></a>older : <code class="type"><a href="Fcl_stak.html#TYPElevel">level</a> -> <a href="Fcl_stak.html#TYPElevel">level</a> -> bool</code></pre><div class="info">
<code class="code">older l1 l2</code> true if level <code class="code">l1</code> precedes <code class="code">l2</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsize"></a>size : <code class="type">unit -> int</code></pre><div class="info">
Size of the stack, i.e. number of trailings.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALdepth"></a>depth : <code class="type">unit -> int</code></pre><div class="info">
Depth of the stack, i.e. number of active levels.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALlevel"></a>level : <code class="type">unit -> <a href="Fcl_stak.html#TYPElevel">level</a></code></pre><div class="info">
Returns the current level.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALlevels"></a>levels : <code class="type">unit -> <a href="Fcl_stak.html#TYPElevel">level</a> list</code></pre><div class="info">
Returns the current active levels.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALnb_choice_points"></a>nb_choice_points : <code class="type">unit -> int</code></pre><div class="info">
Access to a global counter incremented at each choice point.
   Useful to implement search strategies such as Limited Discrepancy
   Search<br>
</div>
<br>
<a name="2_Control"></a>
<h2>Control</h2><br>
<pre><span class="keyword">exception</span> <a name="EXCEPTIONLevel_not_found"></a>Level_not_found <span class="keyword">of</span> <code class="type"><a href="Fcl_stak.html#TYPElevel">level</a></code></pre>
<div class="info">
Raised by <code class="code">cut</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcut"></a>cut : <code class="type"><a href="Fcl_stak.html#TYPElevel">level</a> -> unit</code></pre><div class="info">
<code class="code">cut l</code> cuts the choice points left on the stack until level <code class="code">l</code>.
     Raise <code class="code">Level_not_found</code> if level is not reached and stack is empty.<br>
</div>
<pre><span class="keyword">exception</span> <a name="EXCEPTIONFail"></a>Fail <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info">
Raised during solving whenever a failure occurs. The string argument
   is informative.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfail"></a>fail : <code class="type">string -> 'a</code></pre><div class="info">
<code class="code">fail x</code> equivalent to <code class="code">raise (Fail x)</code>.<br>
</div>
<br>
<a name="2_BacktrackableReferences"></a>
<h2>Backtrackable References</h2><br>
<pre><span class="keyword">type</span> <a name="TYPEref"></a><code class="type">'a</code> ref </pre>
<div class="info">
Backtrackable reference of type <code class="code">'a</code>. I.e. type of mutable
   data structures restored on backtracking.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALref"></a>ref : <code class="type">'a -> 'a <a href="Fcl_stak.html#TYPEref">ref</a></code></pre><div class="info">
Returns a reference whose modifications will be trailed during the
   solving of a goal.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALset"></a>set : <code class="type">'a <a href="Fcl_stak.html#TYPEref">ref</a> -> 'a -> unit</code></pre><div class="info">
Sets a backtrackable reference.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget"></a>get : <code class="type">'a <a href="Fcl_stak.html#TYPEref">ref</a> -> 'a</code></pre><div class="info">
Dereference.<br>
</div>
</body></html>