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.
9 lines
17 KiB
9 lines
17 KiB
5 years ago
|
<!DOCTYPE html>
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferModules__Prover (infer.InferModules__Prover)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> — <span class="package">package <a href="../index.html">infer</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferModules__Prover</span></h1></header><p>Functions for Theorem Proving</p><div class="spec val" id="val-atom_negate"><a href="#val-atom_negate" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>atom_negate : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Sil/index.html#type-atom">InferIR.Sil.atom</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Sil/index.html#type-atom">InferIR.Sil.atom</a></code></div><div class="doc"><p>Negate an atom</p></div></div><h3>Ordinary Theorem Proving</h3><div class="spec val" id="val-check_zero"><a href="#val-check_zero" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>check_zero : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Check <code class="code"> |- e=0</code>. Result <code class="code">false</code> means "don't know".</p></div></div><div class="spec val" id="val-check_equal"><a href="#val-check_equal" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>check_equal : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> <a href="../InferModules/Prop/index.html#type-normal">InferModules.Prop.normal</a> <a href="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Check <code class="code">prop |- exp1=exp2</code>. Result <code class="code">false</code> means "don't know".</p></div></div><div class="spec val" id="val-check_disequal"><a href="#val-check_disequal" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>check_disequal : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> <a href="../InferModules/Prop/index.html#type-normal">InferModules.Prop.normal</a> <a href="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Check whether <code class="code">prop |- exp1!=exp2</code>. Result <code class="code">false</code> means "don't know".</p></div></div><div class="spec val" id="val-type_size_comparable"><a href="#val-type_size_comparable" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>type_size_comparable : <a href="../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Return true if the two types have sizes which can be compared</p></div></div><div class="spec val" id="val-check_type_size_leq"><a href="#val-check_
|
||
|
exp.offlist</code> for some list of offsets <code class="code">offlist</code>. If so, it returns
|
||
|
<code class="code">Some(offlist)</code>. Otherwise, it returns <code class="code">None</code>. Assumes that
|
||
|
<code class="code">base_exp</code> points to the beginning of a structure, not the middle.</p></div></div><div class="spec val" id="val-expand_hpred_pointer"><a href="#val-expand_hpred_pointer" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>expand_hpred_pointer : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> bool <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a> <span class="keyword">‑></span> bool<span class="keyword"> * </span>bool<span class="keyword"> * </span><a href="../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a></code></div><div class="doc"><p><code class="code">expand_hpred_pointer calc_index_frame hpred</code> expands <code class="code">hpred</code> if it is a |-> whose lhs is a Lfield or Lindex or ptr+off.
|
||
|
Return <code class="code">(changed, calc_index_frame', hpred')</code> where <code class="code">changed</code> indicates whether the predicate has changed.</p></div></div><div class="spec val" id="val-get_bounds"><a href="#val-get_bounds" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>get_bounds : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> <a href="../InferModules/Prop/index.html#type-normal">InferModules.Prop.normal</a> <a href="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/IntLit/index.html#type-t">InferIR.IntLit.t</a> option<span class="keyword"> * </span><a href="../../InferIR/InferIR/IntLit/index.html#type-t">InferIR.IntLit.t</a> option</code></div><div class="doc"><p>Get upper and lower bounds of an expression, if any</p></div></div><h3>Abduction prover</h3><div class="spec val" id="val-check_implication"><a href="#val-check_implication" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>check_implication : <a href="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span class="keyword">‑></span> <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> <a href="../InferModules/Prop/index.html#type-normal">InferModules.Prop.normal</a> <a href="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a> <span class="keyword">‑></span> <a href="../InferModules/Prop/index.html#type-exposed">InferModules.Prop.exposed</a> <a href="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p><code class="code">check_implication p1 p2</code> returns true if <code class="code">p1|-p2</code></p></div></div><div class="spec type" id="type-check"><a href="#type-check" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>check</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-check.Bounds_check" class="anchored"><td class="def constructor"><a href="#type-check.Bounds_check" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Bounds_check</span></code></td></tr><tr id="type-check.Class_cast_check" class="anchored"><td class="def constructor"><a href="#type-check.Class_cast_check" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Class_cast_check</span><span class="keyword"> of </span><a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a></code></td></tr></table><code></code></div><div class="doc"></div></div><div class="spec val" id="val-d_typings"><a href="#val-d_typings" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>d_typings : (<a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) list <span class="keyword">‑></span> unit</code></div><div class="doc"></div></div><div class="spec type" id="type-implication_result"><a href="#type-implication_result" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>implication_result</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-implication_result.ImplOK" class="anchored"><td class="def constructor"><a href="#type-implication_result.ImplOK" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">ImplOK</span><span
|
||
|
<code class="code">Some(sub, frame, missing)</code> if <code class="code">sub(p1 * missing) |- sub(p2 *
|
||
|
frame)</code> where <code class="code">sub</code> is a substitution which instantiates the
|
||
|
primed vars of <code class="code">p1</code> and <code class="code">p2</code>, which are assumed to be disjoint.</p></div></div><h3>Cover: minimum set of pi's whose disjunction is equivalent to true</h3><div class="spec val" id="val-find_minimum_pure_cover"><a href="#val-find_minimum_pure_cover" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>find_minimum_pure_cover : <a href="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">‑></span> (<a href="../../InferIR/InferIR/Sil/index.html#type-atom">InferIR.Sil.atom</a> list<span class="keyword"> * </span><span class="type-var">'a</span>) list <span class="keyword">‑></span> (<a href="../../InferIR/InferIR/Sil/index.html#type-atom">InferIR.Sil.atom</a> list<span class="keyword"> * </span><span class="type-var">'a</span>) list option</code></div><div class="doc"><p>Find minimum set of pi's in <code class="code">cases</code> whose disjunction covers true</p></div></div><h3>Subtype checking</h3><div class="spec module" id="module-Subtyping_check"><a href="#module-Subtyping_check" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="Subtyping_check/index.html">Subtyping_check</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="doc"></div></div></body></html>
|