You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
7.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferBase__SymOp (InferBase.InferBase__SymOp)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../index.html">InferBase</a> &#x00BB; InferBase__SymOp</nav><h1>Module <code>InferBase__SymOp</code></h1><p>Symbolic Operations and Failures: the units in which analysis work is measured</p></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Internal state of the module</p></dd></dl><dl><dt class="spec value" id="val-check_wallclock_alarm"><a href="#val-check_wallclock_alarm" class="anchor"></a><code><span class="keyword">val</span> check_wallclock_alarm : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>if the wallclock alarm has expired, raise a timeout exception</p></dd></dl><dl><dt class="spec value" id="val-get_remaining_wallclock_time"><a href="#val-get_remaining_wallclock_time" class="anchor"></a><code><span class="keyword">val</span> get_remaining_wallclock_time : unit <span>&#45;&gt;</span> float</code></dt><dd><p>Return the time remaining before the wallclock alarm expires</p></dd></dl><dl><dt class="spec value" id="val-get_timeout_seconds"><a href="#val-get_timeout_seconds" class="anchor"></a><code><span class="keyword">val</span> get_timeout_seconds : unit <span>&#45;&gt;</span> <span>float option</span></code></dt><dd><p>Timeout in seconds for each function</p></dd></dl><dl><dt class="spec value" id="val-get_total"><a href="#val-get_total" class="anchor"></a><code><span class="keyword">val</span> get_total : unit <span>&#45;&gt;</span> int</code></dt><dd><p>Return the total number of symop's since the beginning</p></dd></dl><dl><dt class="spec value" id="val-pay"><a href="#val-pay" class="anchor"></a><code><span class="keyword">val</span> pay : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>Count one symop</p></dd></dl><dl><dt class="spec value" id="val-reset_total"><a href="#val-reset_total" class="anchor"></a><code><span class="keyword">val</span> reset_total : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>Reset the total number of symop's</p></dd></dl><dl><dt class="spec value" id="val-restore_state"><a href="#val-restore_state" class="anchor"></a><code><span class="keyword">val</span> restore_state : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Restore the old state.</p></dd></dl><dl><dt class="spec value" id="val-save_state"><a href="#val-save_state" class="anchor"></a><code><span class="keyword">val</span> save_state : <span>keep_symop_total:bool</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Return the old state, and revert the current state to the initial one. If keep_symop_total is true, share the total counter.</p></dd></dl><dl><dt class="spec value" id="val-set_alarm"><a href="#val-set_alarm" class="anchor"></a><code><span class="keyword">val</span> set_alarm : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>Reset the counter and activate the alarm</p></dd></dl><dl><dt class="spec value" id="val-set_wallclock_alarm"><a href="#val-set_wallclock_alarm" class="anchor"></a><code><span class="keyword">val</span> set_wallclock_alarm : float <span>&#45;&gt;</span> unit</code></dt><dd><p>Set the wallclock alarm checked at every pay()</p></dd></dl><dl><dt class="spec value" id="val-set_wallclock_timeout_handler"><a href="#val-set_wallclock_timeout_handler" class="anchor"></a><code><span class="keyword">val</span> set_wallclock_timeout_handler : <span>(unit <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>set the handler for the wallclock timeout</p></dd></dl><dl><dt class="spec value" id="val-unset_alarm"><a href="#val-unset_alarm" class="anchor"></a><code><span class="keyword">val</span> unset_alarm : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>De-activate the alarm</p></dd></dl><dl><dt class="spec value" id="val-unset_wallclock_alarm"><a href="#val-unset_wallclock_alarm" class="anchor"></a><code><span class="keyword">val</span> unset_wallclock_alarm : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>Unset the wallclock alarm checked at every pay()</p></dd></dl><dl><dt class="spec type" id="type-failure_kind"><a href="#type-failure_kind" class="anchor"></a><code><span class="keyword">type</span> failure_kind</code><code> = </code><table class="variant"><tr id="type-failure_kind.FKtimeout" class="anchored"><td class="def constructor"><a href="#type-failure_kind.FKtimeout" class="anchor"></a><code>| </code><code><span class="constructor">FKtimeout</span></code></td><td class="doc"><p>max time exceeded</p></td></tr><tr id="type-failure_kind.FKsymops_timeout" class="anchored"><td class="def constructor"><a href="#type-failure_kind.FKsymops_timeout" class="anchor"></a><code>| </code><code><span class="constructor">FKsymops_timeout</span> <span class="keyword">of</span> int</code></td><td class="doc"><p>max symop's exceeded</p></td></tr><tr id="type-failure_kind.FKrecursion_timeout" class="anchored"><td class="def constructor"><a href="#type-failure_kind.FKrecursion_timeout" class="anchor"></a><code>| </code><code><span class="constructor">FKrecursion_timeout</span> <span class="keyword">of</span> int</code></td><td class="doc"><p>max recursion level exceeded</p></td></tr><tr id="type-failure_kind.FKcrash" class="anchored"><td class="def constructor"><a href="#type-failure_kind.FKcrash" class="anchor"></a><code>| </code><code><span class="constructor">FKcrash</span> <span class="keyword">of</span> string</code></td><td class="doc"><p>uncaught exception or failed assertion</p></td></tr></table></dt></dl><dl><dt class="spec exception" id="exception-Analysis_failure_exe"><a href="#exception-Analysis_failure_exe" class="anchor"></a><code><span class="keyword">exception</span> </code><code><span class="exception">Analysis_failure_exe</span> <span class="keyword">of</span> <a href="index.html#type-failure_kind">failure_kind</a></code></dt><dd><p>Timeout exception</p></dd></dl><dl><dt class="spec value" id="val-exn_not_failure"><a href="#val-exn_not_failure" class="anchor"></a><code><span class="keyword">val</span> exn_not_failure : exn <span>&#45;&gt;</span> bool</code></dt><dd><p>check that the exception is not a timeout exception</p></dd></dl><dl><dt class="spec value" id="val-try_finally"><a href="#val-try_finally" class="anchor"></a><code><span class="keyword">val</span> try_finally : <span>f:<span>(unit <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span></span> <span>&#45;&gt;</span> <span>finally:<span>(unit <span>&#45;&gt;</span> unit)</span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p><code>try_finally ~f ~finally</code> executes <code>f</code> and then <code>finally</code> even if <code>f</code> raises an exception. Assuming that <code>finally ()</code> terminates quickly <code>Analysis_failure_exe</code> exceptions are handled correctly. In particular, an exception raised by <code>f ()</code> is delayed until <code>finally ()</code> finishes, so <code>finally ()</code> should return reasonably quickly.</p></dd></dl><dl><dt class="spec value" id="val-pp_failure_kind"><a href="#val-pp_failure_kind" class="anchor"></a><code><span class="keyword">val</span> pp_failure_kind : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-failure_kind">failure_kind</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-failure_kind_to_string"><a href="#val-failure_kind_to_string" class="anchor"></a><code><span class="keyword">val</span> failure_kind_to_string : <a href="index.html#type-failure_kind">failure_kind</a> <span>&#45;&gt;</span> string</code></dt></dl></div></body></html>