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.3 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>AccessPath (infer.Absint.AccessPath)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><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">Absint</a> &#x00BB; AccessPath</nav><h1>Module <code>Absint.AccessPath</code></h1></header><aside><p>Module for naming heap locations via the path used to access them (e.g., x.f.g, y<code>a</code>.b)</p></aside><dl><dt class="spec type" id="type-base"><a href="#type-base" class="anchor"></a><code><span class="keyword">type</span> base</code><code> = <a href="../../IR/Var/index.html#type-t">IR.Var.t</a> * <a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a></code></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_base"><a href="#val-compare_base" class="anchor"></a><code><span class="keyword">val</span> compare_base : <a href="index.html#type-base">base</a> <span>&#45;&gt;</span> <a href="index.html#type-base">base</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec type" id="type-access"><a href="#type-access" class="anchor"></a><code><span class="keyword">type</span> access</code><code> = </code><table class="variant"><tr id="type-access.ArrayAccess" class="anchored"><td class="def constructor"><a href="#type-access.ArrayAccess" class="anchor"></a><code>| </code><code><span class="constructor">ArrayAccess</span> <span class="keyword">of</span> <a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a> * <span><a href="index.html#type-t">t</a> list</span></code></td><td class="doc"><p>array element type with list of access paths in index</p></td></tr><tr id="type-access.FieldAccess" class="anchored"><td class="def constructor"><a href="#type-access.FieldAccess" class="anchor"></a><code>| </code><code><span class="constructor">FieldAccess</span> <span class="keyword">of</span> <a href="../../IR/Fieldname/index.html#type-t">IR.Fieldname.t</a></code></td><td class="doc"><p>field name</p></td></tr></table></dt><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">and</span> t</code><code> = <a href="index.html#type-base">base</a> * <span><a href="index.html#type-access">access</a> list</span></code></dt><dd><p>root var, and a list of accesses. closest to the root var is first that is, x.f.g is represented as (x, <code>f; g</code>)</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_access"><a href="#val-compare_access" class="anchor"></a><code><span class="keyword">val</span> compare_access : <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-equal_access"><a href="#val-equal_access" class="anchor"></a><code><span class="keyword">val</span> equal_access : <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-compare_access"><a href="#val-compare_access" class="anchor"></a><code><span class="keyword">val</span> compare_access : <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-get_typ"><a href="#val-get_typ" class="anchor"></a><code><span class="keyword">val</span> get_typ : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a> option</span></code></dt><dd><p>get the typ of the last access in the list of accesses if the list is non-empty, or the base if the list is empty. that is, for x.f.g, return typ(g), and for x, return typ(x)</p></dd></dl><dl><dt class="spec value" id="val-base_of_pvar"><a href="#val-base_of_pvar" class="anchor"></a><code><span class="keyword">val</span> base_of_pvar : <a href="../../IR/Pvar/index.html#type-t">IR.Pvar.t</a> <span>&#45;&gt;</span> <a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a> <span>&#45;&gt;</span> <a href="index.html#type-base">base</a></code></dt><dd><p>create a base from a pvar</p></dd></dl><dl><dt class="spec value" id="val-of_pvar"><a href="#val-of_pvar" class="anchor"></a><code><span class="keyword">val</span> of_pvar : <a href="../../IR/Pvar/index.html#type-t">IR.Pvar.t</a> <span>&#45;&gt;</span> <a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>create an access path from a pvar</p></dd></dl><dl><dt class="spec value" id="val-of_id"><a href="#val-of_id" class="anchor"></a><code><span class="keyword">val</span> of_id : <a href="../../IR/Ident/index.html#type-t">IR.Ident.t</a> <span>&#45;&gt;</span> <a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>create an access path from an ident</p></dd></dl><dl><dt class="spec value" id="val-of_var"><a href="#val-of_var" class="anchor"></a><code><span class="keyword">val</span> of_var : <a href="../../IR/Var/index.html#type-t">IR.Var.t</a> <span>&#45;&gt;</span> <a href="../../IR/Typ/index.html#type-t">IR.Typ.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>create an access path from a var</p></dd></dl><dl><dt class="spec value" id="val-append"><a href="#val-append" class="anchor"></a><code><span class="keyword">val</span> append : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-access">access</a> list</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>append new accesses to an existing access path; e.g., `append_access x.f <code>g, h</code>` produces `x.f.g.h`</p></dd></dl><dl><dt class="spec value" id="val-replace_prefix"><a href="#val-replace_prefix" class="anchor"></a><code><span class="keyword">val</span> replace_prefix : <span>prefix:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>replace_with:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dt class="spec value" id="val-equal_base"><a href="#val-equal_base" class="anchor"></a><code><span class="keyword">val</span> equal_base : <a href="index.html#type-base">base</a> <span>&#45;&gt;</span> <a href="index.html#type-base">base</a> <span>&#45;&gt;</span> bool</code></dt><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><dt class="spec value" id="val-pp_base"><a href="#val-pp_base" class="anchor"></a><code><span class="keyword">val</span> pp_base : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-base">base</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-pp_access"><a href="#val-pp_access" class="anchor"></a><code><span class="keyword">val</span> pp_access : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-access">access</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-pp_access_list"><a href="#val-pp_access_list" class="anchor"></a><code><span class="keyword">val</span> pp_access_list : Stdlib.Format.formatter <span>&#45;&gt;</span> <span><a href="index.html#type-access">access</a> list</span> <span>&#45;&gt;</span> unit</code></dt></dl><div class="spec module" id="module-Abs"><a href="#module-Abs" class="anchor"></a><code><span class="keyword">module</span> <a href="Abs/index.html">Abs</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-BaseMap"><a href="#module-BaseMap" class="anchor"></a><code><span class="keyword">module</span> BaseMap : <a href="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">IStdlib.PrettyPrintable.PPMap</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">PPMap</a>.key = <a href="index.html#type-base">base</a></code></div></div></body></html>