summaryrefslogtreecommitdiff
path: root/cil/doc/api/Alpha.html
blob: 699fac0996ddd49519535683401b5889fc335bbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="Start" href="index.html">
<link rel="previous" href="Formatcil.html">
<link rel="next" href="Cillower.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 class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.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="Pretty" rel="Chapter" href="Pretty.html">
<link title="Errormsg" rel="Chapter" href="Errormsg.html">
<link title="Clist" rel="Chapter" href="Clist.html">
<link title="Stats" rel="Chapter" href="Stats.html">
<link title="Cil" rel="Chapter" href="Cil.html">
<link title="Formatcil" rel="Chapter" href="Formatcil.html">
<link title="Alpha" rel="Chapter" href="Alpha.html">
<link title="Cillower" rel="Chapter" href="Cillower.html">
<link title="Cfg" rel="Chapter" href="Cfg.html">
<link title="Dataflow" rel="Chapter" href="Dataflow.html">
<link title="Dominators" rel="Chapter" href="Dominators.html"><title>CIL API Documentation (version 1.3.5) : Alpha</title>
</head>
<body>
<div class="navbar"><a href="Formatcil.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Cillower.html">Next</a>
</div>
<center><h1>Module <a href="type_Alpha.html">Alpha</a></h1></center>
<br>
<pre><span class="keyword">module</span> Alpha: <code class="code">sig</code> <a href="Alpha.html">..</a> <code class="code">end</code></pre><b>ALPHA conversion</b><br>
<hr width="100%">
<pre><span class="keyword">type</span> <a name="TYPEundoAlphaElement"></a><code class="type">'a</code> undoAlphaElement </pre>
<div class="info">
This is the type of the elements that are recorded by the alpha 
 conversion functions in order to be able to undo changes to the tables 
 they modify. Useful for implementing 
 scoping<br>
</div>

<pre><span class="keyword">type</span> <a name="TYPEalphaTableData"></a><code class="type">'a</code> alphaTableData </pre>
<div class="info">
This is the type of the elements of the alpha renaming table. These 
 elements can carry some data associated with each occurrence of the name.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALnewAlphaName"></a>newAlphaName : <code class="type">alphaTable:(string, 'a <a href="Alpha.html#TYPEalphaTableData">alphaTableData</a> Pervasives.ref) Hashtbl.t -><br>       undolist:'a <a href="Alpha.html#TYPEundoAlphaElement">undoAlphaElement</a> list Pervasives.ref option -><br>       lookupname:string -> data:'a -> string * 'a</code></pre><div class="info">
Create a new name based on a given name. The new name is formed from a 
 prefix (obtained from the given name by stripping a suffix consisting of _ 
 followed by only digits), followed by a special separator and then by a 
 positive integer suffix. The first argument is a table mapping name 
 prefixes to some data that specifies what suffixes have been used and how 
 to create the new one. This function updates the table with the new 
 largest suffix generated. The "undolist" argument, when present, will be 
 used by the function to record information that can be used by 
 <a href="Alpha.html#VALundoAlphaChanges"><code class="code">Alpha.undoAlphaChanges</code></a> to undo those changes. Note that the undo 
 information will be in reverse order in which the action occurred. Returns 
 the new name and, if different from the lookupname, the location of the 
 previous occurrence. This function knows about the location implicitly 
 from the <a href="Cil.html#VALcurrentLoc"><code class="code">Cil.currentLoc</code></a>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALregisterAlphaName"></a>registerAlphaName : <code class="type">alphaTable:(string, 'a <a href="Alpha.html#TYPEalphaTableData">alphaTableData</a> Pervasives.ref) Hashtbl.t -><br>       undolist:'a <a href="Alpha.html#TYPEundoAlphaElement">undoAlphaElement</a> list Pervasives.ref option -><br>       lookupname:string -> data:'a -> unit</code></pre><div class="info">
Register a name with an alpha conversion table to ensure that when later 
 we call newAlphaName we do not end up generating this one<br>
</div>
<pre><span class="keyword">val</span> <a name="VALdocAlphaTable"></a>docAlphaTable : <code class="type">unit -><br>       (string, 'a <a href="Alpha.html#TYPEalphaTableData">alphaTableData</a> Pervasives.ref) Hashtbl.t -> <a href="Pretty.html#TYPEdoc">Pretty.doc</a></code></pre><div class="info">
Split the name in preparation for newAlphaName. The prefix returned is 
    used to index into the hashtable. The next result value is a separator 
    (either empty or the separator chosen to separate the original name from 
     the index)<br>
</div>
<pre><span class="keyword">val</span> <a name="VALgetAlphaPrefix"></a>getAlphaPrefix : <code class="type">lookupname:string -> string</code></pre><pre><span class="keyword">val</span> <a name="VALundoAlphaChanges"></a>undoAlphaChanges : <code class="type">alphaTable:(string, 'a <a href="Alpha.html#TYPEalphaTableData">alphaTableData</a> Pervasives.ref) Hashtbl.t -><br>       undolist:'a <a href="Alpha.html#TYPEundoAlphaElement">undoAlphaElement</a> list -> unit</code></pre><div class="info">
Undo the changes to a table<br>
</div>
</body></html>