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
9.1 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>Tenv (infer.IR.Tenv)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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">infer</a> &#x00BB; <a href="../index.html">IR</a> &#x00BB; Tenv</nav><h1>Module <code>IR.Tenv</code></h1></header><aside><p>Module for Type Environments.</p></aside><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>Type for type environment.</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a new type environment.</p></dd></dl><dl><dt class="spec value" id="val-load"><a href="#val-load" class="anchor"></a><code><span class="keyword">val</span> load : <a href="../../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p>Load a type environment for a source file</p></dd></dl><dl><dt class="spec value" id="val-store_debug_file_for_source"><a href="#val-store_debug_file_for_source" class="anchor"></a><code><span class="keyword">val</span> store_debug_file_for_source : <a href="../../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-read"><a href="#val-read" class="anchor"></a><code><span class="keyword">val</span> read : <a href="../../IBase/DB/index.html#type-filename">IBase.DB.filename</a> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p>read and return a type environment from the given file</p></dd></dl><dl><dt class="spec value" id="val-load_global"><a href="#val-load_global" class="anchor"></a><code><span class="keyword">val</span> load_global : unit <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p>load the global type environment (Java)</p></dd></dl><dl><dt class="spec value" id="val-store_global"><a href="#val-store_global" class="anchor"></a><code><span class="keyword">val</span> store_global : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>save a global type environment (Java)</p></dd></dl><dl><dt class="spec value" id="val-lookup"><a href="#val-lookup" class="anchor"></a><code><span class="keyword">val</span> lookup : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> <span>&#45;&gt;</span> <span><a href="../Struct/index.html#type-t">Struct.t</a> option</span></code></dt><dd><p>Look up a name in the global type environment.</p></dd></dl><dl><dt class="spec value" id="val-mk_struct"><a href="#val-mk_struct" class="anchor"></a><code><span class="keyword">val</span> mk_struct : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span>?&#8288;default:<a href="../Struct/index.html#type-t">Struct.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;fields:<a href="../Struct/index.html#type-fields">Struct.fields</a></span> <span>&#45;&gt;</span> <span>?&#8288;statics:<a href="../Struct/index.html#type-fields">Struct.fields</a></span> <span>&#45;&gt;</span> <span>?&#8288;methods:<span><a href="../Procname/index.html#type-t">Procname.t</a> list</span></span> <span>&#45;&gt;</span> <span>?&#8288;exported_objc_methods:<span><a href="../Procname/index.html#type-t">Procname.t</a> list</span></span> <span>&#45;&gt;</span> <span>?&#8288;supers:<span><a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> list</span></span> <span>&#45;&gt;</span> <span>?&#8288;annots:<a href="../Annot/Item/index.html#type-t">Annot.Item.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;java_class_info:<a href="../Struct/index.html#type-java_class_info">Struct.java_class_info</a></span> <span>&#45;&gt;</span> <span>?&#8288;dummy:bool</span> <span>&#45;&gt;</span> <a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> <span>&#45;&gt;</span> <a href="../Struct/index.html#type-t">Struct.t</a></code></dt><dd><p>Construct a struct_typ, normalizing field types</p></dd></dl><dl><dt class="spec value" id="val-add_field"><a href="#val-add_field" class="anchor"></a><code><span class="keyword">val</span> add_field : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> <span>&#45;&gt;</span> <a href="../Struct/index.html#type-field">Struct.field</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Add a field to a given struct in the global type environment.</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>print a type environment</p></dd></dl><dl><dt class="spec type" id="type-per_file"><a href="#type-per_file" class="anchor"></a><code><span class="keyword">type</span> per_file</code><code> = </code><table class="variant"><tr id="type-per_file.Global" class="anchored"><td class="def constructor"><a href="#type-per_file.Global" class="anchor"></a><code>| </code><code><span class="constructor">Global</span></code></td></tr><tr id="type-per_file.FileLocal" class="anchored"><td class="def constructor"><a href="#type-per_file.FileLocal" class="anchor"></a><code>| </code><code><span class="constructor">FileLocal</span> <span class="keyword">of</span> <a href="index.html#type-t">t</a></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-pp_per_file"><a href="#val-pp_per_file" class="anchor"></a><code><span class="keyword">val</span> pp_per_file : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-per_file">per_file</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>print per file type environment</p></dd></dl><dl><dt class="spec value" id="val-merge"><a href="#val-merge" class="anchor"></a><code><span class="keyword">val</span> merge : <span>src:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>dst:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Merge <code>src</code> into <code>dst</code> possibly overwriting pre existing procs in <code>dst</code>.</p></dd></dl><dl><dt class="spec value" id="val-merge_per_file"><a href="#val-merge_per_file" class="anchor"></a><code><span class="keyword">val</span> merge_per_file : <span>src:<a href="index.html#type-per_file">per_file</a></span> <span>&#45;&gt;</span> <span>dst:<a href="index.html#type-per_file">per_file</a></span> <span>&#45;&gt;</span> <a href="index.html#type-per_file">per_file</a></code></dt><dd><p>Best-effort merge of <code>src</code> into <code>dst</code>. If a procedure is both in <code>dst</code> and <code>src</code>, the one in <code>dst</code> will get overwritten.</p></dd></dl><dl><dt class="spec value" id="val-get_summary_formals"><a href="#val-get_summary_formals" class="anchor"></a><code><span class="keyword">val</span> get_summary_formals : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span>get_summary:<span>(<a href="../Procname/index.html#type-t">Procname.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'summary</span> option</span>)</span></span> <span>&#45;&gt;</span> <span>get_formals:<span>(<a href="../Procname/index.html#type-t">Procname.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'formals</span> option</span>)</span></span> <span>&#45;&gt;</span> <a href="../Procname/index.html#type-t">Procname.t</a> <span>&#45;&gt;</span> <span>[ `NotFound <span><span>| `Found</span> of <span class="type-var">'summary</span> * <span class="type-var">'formals</span></span> <span><span>| `FoundFromSubclass</span> of <a href="../Procname/index.html#type-t">Procname.t</a> * <span class="type-var">'summary</span> * <span class="type-var">'formals</span></span> ]</span></code></dt><dd><p>Get summary and formals of the given proc name with heuristics for finding a method in non-abstract sub-classes</p><ul><li>If the class is an interface: Find its unique sub-class and apply the heuristics recursively.</li></ul><ul><li>If the class is an abstract class: Find/use its own summary if possible. If not found, find one (arbitrary but deterministic) summary from its sub-classes.</li></ul><ul><li>Otherwise: Find its own summary.</li></ul></dd></dl><div class="spec module" id="module-SQLite"><a href="#module-SQLite" class="anchor"></a><code><span class="keyword">module</span> <a href="SQLite/index.html">SQLite</a> : <a href="../../IBase/SqliteUtils/index.html#module-type-Data">IBase.SqliteUtils.Data</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../IBase/SqliteUtils/module-type-Data/index.html#type-t">t</a> = <a href="index.html#type-per_file">per_file</a></code></div></div></body></html>