1+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+ < html >
3+ < head >
4+ < link rel ="stylesheet " href ="style.css " type ="text/css ">
5+ < meta content ="text/html; charset=iso-8859-1 " http-equiv ="Content-Type ">
6+ < link rel ="Start " href ="index.html ">
7+ < link rel ="next " href ="Cfg.html ">
8+ < link rel ="Up " href ="index.html ">
9+ < link title ="Index of types " rel =Appendix href ="index_types.html ">
10+ < link title ="Index of exceptions " rel =Appendix href ="index_exceptions.html ">
11+ < link title ="Index of values " rel =Appendix href ="index_values.html ">
12+ < link title ="Index of class methods " rel =Appendix href ="index_methods.html ">
13+ < link title ="Index of classes " rel =Appendix href ="index_classes.html ">
14+ < link title ="Index of class types " rel =Appendix href ="index_class_types.html ">
15+ < link title ="Index of modules " rel =Appendix href ="index_modules.html ">
16+ < link title ="Index of module types " rel =Appendix href ="index_module_types.html ">
17+ < link title ="Alpha " rel ="Chapter " href ="Alpha.html ">
18+ < link title ="Cfg " rel ="Chapter " href ="Cfg.html ">
19+ < link title ="Cil " rel ="Chapter " href ="Cil.html ">
20+ < link title ="Cillower " rel ="Chapter " href ="Cillower.html ">
21+ < link title ="Clist " rel ="Chapter " href ="Clist.html ">
22+ < link title ="Dataflow " rel ="Chapter " href ="Dataflow.html ">
23+ < link title ="Dominators " rel ="Chapter " href ="Dominators.html ">
24+ < link title ="Errormsg " rel ="Chapter " href ="Errormsg.html ">
25+ < link title ="Formatcil " rel ="Chapter " href ="Formatcil.html ">
26+ < link title ="Pretty " rel ="Chapter " href ="Pretty.html ">
27+ < link title ="Stats " rel ="Chapter " href ="Stats.html "> < title > CIL API Documentation (version 1.7.2) : Alpha</ title >
28+ </ head >
29+ < body >
30+ < div class ="navbar "> < a class ="up " href ="index.html " title ="Index "> Up</ a >
31+ < a class ="post " href ="Cfg.html " title ="Cfg "> Next</ a >
32+ </ div >
33+ < h1 > Module < a href ="type_Alpha.html "> Alpha</ a > </ h1 >
34+ < pre > < span class ="keyword "> module</ span > Alpha: < code class ="code "> sig</ code > < a href ="Alpha.html "> ..</ a > < code class ="code "> end</ code > </ pre > < div class ="info ">
35+ ALPHA conversion< br >
36+ </ div >
37+ < hr width ="100% ">
38+ < pre > < span id ="TYPEundoAlphaElement "> < span class ="keyword "> type</ span > < code class ="type "> 'a</ code > undoAlphaElement</ span > </ pre >
39+ < div class ="info ">
40+ This is the type of the elements that are recorded by the alpha
41+ conversion functions in order to be able to undo changes to the tables
42+ they modify. Useful for implementing
43+ scoping< br >
44+ </ div >
45+
46+ < pre > < span id ="TYPEalphaTableData "> < span class ="keyword "> type</ span > < code class ="type "> 'a</ code > alphaTableData</ span > </ pre >
47+ < div class ="info ">
48+ This is the type of the elements of the alpha renaming table. These
49+ elements can carry some data associated with each occurrence of the name.< br >
50+ </ div >
51+
52+ < pre > < span id ="VALnewAlphaName "> < span class ="keyword "> val</ span > newAlphaName</ span > : < code class ="type "> alphaTable:(string, 'a < a href ="Alpha.html#TYPEalphaTableData "> alphaTableData</ a > ref) Hashtbl.t -> < br > undolist:'a < a href ="Alpha.html#TYPEundoAlphaElement "> undoAlphaElement</ a > list ref option -> < br > lookupname:string -> data:'a -> string * 'a</ code > </ pre > < div class ="info ">
53+ Create a new name based on a given name. The new name is formed from a
54+ prefix (obtained from the given name by stripping a suffix consisting of ___
55+ followed by up to 9 digits), followed by a special separator and then by a
56+ positive integer suffix. The first argument is a table mapping name
57+ prefixes to some data that specifies what suffixes have been used and how
58+ to create the new one. This function updates the table with the new
59+ largest suffix generated. The "undolist" argument, when present, will be
60+ used by the function to record information that can be used by
61+ < a href ="Alpha.html#VALundoAlphaChanges "> < code class ="code "> Alpha.undoAlphaChanges</ code > </ a > to undo those changes. Note that the undo
62+ information will be in reverse order in which the action occurred. Returns
63+ the new name and, if different from the lookupname, the location of the
64+ previous occurrence. This function knows about the location implicitly
65+ from the < a href ="Cil.html#VALcurrentLoc "> < code class ="code "> Cil.currentLoc</ code > </ a > .< br >
66+ </ div >
67+ < pre > < span id ="VALregisterAlphaName "> < span class ="keyword "> val</ span > registerAlphaName</ span > : < code class ="type "> alphaTable:(string, 'a < a href ="Alpha.html#TYPEalphaTableData "> alphaTableData</ a > ref) Hashtbl.t -> < br > undolist:'a < a href ="Alpha.html#TYPEundoAlphaElement "> undoAlphaElement</ a > list ref option -> < br > lookupname:string -> data:'a -> unit</ code > </ pre > < div class ="info ">
68+ Register a name with an alpha conversion table to ensure that when later
69+ we call newAlphaName we do not end up generating this one< br >
70+ </ div >
71+ < pre > < span id ="VALdocAlphaTable "> < span class ="keyword "> val</ span > docAlphaTable</ span > : < code class ="type "> unit -> < br > (string, 'a < a href ="Alpha.html#TYPEalphaTableData "> alphaTableData</ a > ref) Hashtbl.t -> < a href ="Pretty.html#TYPEdoc "> Pretty.doc</ a > </ code > </ pre > < div class ="info ">
72+ Split the name in preparation for newAlphaName. The prefix returned is
73+ used to index into the hashtable. The next result value is a separator
74+ (either empty or the separator chosen to separate the original name from
75+ the index)< br >
76+ </ div >
77+ < pre > < span id ="VALgetAlphaPrefix "> < span class ="keyword "> val</ span > getAlphaPrefix</ span > : < code class ="type "> lookupname:string -> string</ code > </ pre > < pre > < span id ="VALundoAlphaChanges "> < span class ="keyword "> val</ span > undoAlphaChanges</ span > : < code class ="type "> alphaTable:(string, 'a < a href ="Alpha.html#TYPEalphaTableData "> alphaTableData</ a > ref) Hashtbl.t -> < br > undolist:'a < a href ="Alpha.html#TYPEundoAlphaElement "> undoAlphaElement</ a > list -> unit</ code > </ pre > < div class ="info ">
78+ Undo the changes to a table< br >
79+ </ div >
80+ </ body > </ html >
0 commit comments