Caml1999I037XBB1Stdlib__Ephemeron!S#key;@@@A@@@@@-ephemeron.mliW "W *@@@@@@A@!t;!a@@A@A@O@B@@@X+-X+7@@@@$A@A@&create@#intA@@@!a@@@@@@@,Y8:-Y8R@@>B@@%clear@!a@@@@$unitF@@@@@@EZSUFZSm@@WC@@%reset@-!a@@@@@@@@@@\[np][n@@nD@@$copy@D!a@@@@L@@@@@@s\t\@@E@@#add@[!a@@@@@@@@@ O@@@@@@@@@@]]@@F@@&remove@z!a@@@@@@@@k@@@@@@@@^^@@G@@$find@!a@@@@@;@@@ @@@@@__ @@H@@(find_opt@!a@@@@@S@@@&optionL@@@@@@@@`  ` 4@@I@@(find_all@͠!a@@@@@r@@@$listK@@@@@@@@a57a5\@@J@@'replace@!a@@@@@@@@@ @@@@@@@@@@"b]_#b]@@4K@@#mem@ !a@@@@@@@@$boolE@@@@@@@@@cAc@@RL@@&length@(!a@@@@6@@@@@@WdXd@@iM@@%stats@?!a@@@@&Stdlib'Hashtbl*statistics@@@@@@teue@@N@@'add_seq@\!a@@@@@#Seq!t@ @@@㠠@@@@@@[@@@@@@@@ff@@O@@+replace_seq@!a@@@@@I#Seq!t@6@@@렠@@@@@@@@@@@@@@ggP@@P@@&of_seq@i#Seq!t@V@@@@!a@@@@@@Š@@@@@@hQShQx@@Q@@%clean@Ԡ!a@@@@@@@@@@jz|jz@@R@@+stats_alive@!a@@@@'Hashtbl*statistics@@@@@@mm@@/S@@@@!P"o`c@3T@@'SeededS#key;@@@A@@@@@2x3x@@@@DU@A@!t;!a@8@A@A@O@B@@@CyDy@@@@UV@A@&create&randomr@@@9@@@:@>@@@;*!a@<@@@=@@>@@?@hziz@@zW@@%clear@!a@@@@@A<@@@B@@C@{{@@X@@%reset@+!a@D@@@ES@@@F@@G@||@@Y@@$copy@B!a@I@@@HJ@@@J@@K@}!}8@@Z@@#add@Y!a@N@@@L@@@@M@ @@@O@@P@@Q@@R@~9;~9^@@[@@&remove@x!a@S@@@T@@@@U@@@V@@W@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@_@@@@'')**@`@@@@@%%+**@a@@@@s\1Stdlib__Ephemeron0:(,-R+Stdlib__Seq0nwzG&amg/Stdlib__Hashtbl0ѱN][/!.Stdlib__Either0Vy`u~c à&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@c%@5unsynchronized_access DUnsynchronized accesses to weak hash tables are a programming error.@A@Caml1999T037%=.oC1Stdlib__Ephemeron*ocaml.text&_none_@@A v Ephemerons and weak hash tables. Ephemerons and weak hash tables are useful when one wants to cache or memorize the computation of a function, as long as the arguments and the function are used, without creating memory leaks by continuously keeping old computation results that are not useful anymore because one argument or the function is freed. An implementation using {!Hashtbl.t} is not suitable because all associations would keep the arguments and the result in memory. Ephemerons can also be used for "adding" a field to an arbitrary boxed OCaml value: you can attach some information to a value created by an external library without memory leaks. Ephemerons hold some keys and one or no data. They are all boxed OCaml values. The keys of an ephemeron have the same behavior as weak pointers according to the garbage collector. In fact OCaml weak pointers are implemented as ephemerons without data. The keys and data of an ephemeron are said to be full if they point to a value, or empty if the value has never been set, has been unset, or was erased by the GC. In the function that accesses the keys or data these two states are represented by the [option] type. The data is considered by the garbage collector alive if all the full keys are alive and if the ephemeron is alive. When one of the keys is not considered alive anymore by the GC, the data is emptied from the ephemeron. The data could be alive for another reason and in that case the GC will not free it, but the ephemeron will not hold the data anymore. The ephemerons complicate the notion of liveness of values, because it is not anymore an equivalence with the reachability from root value by usual pointers (not weak and not ephemerons). With ephemerons the notion of liveness is constructed by the least fixpoint of: A value is alive if: - it is a root value - it is reachable from alive value by usual pointers - it is the data of an alive ephemeron with all its full keys alive Notes: - All the types defined in this module cannot be marshaled using {!Stdlib.output_value} or the functions of the {!Marshal} module. Ephemerons are defined in a language agnostic way in this paper: B. Hayes, Ephemerons: A New Finalization Mechanism, OOPSLA'97 @since 4.03 -ephemeron.mliP77B  @@@@@@3@@@@@@#intA;@@@A@@@@@:@A@$charB;@@A@@@@@>@A@&stringQ;@@ A@@@@@B@@@%bytesC;@@ A@@@@@F@@@%floatD;@@A@@@@@J@@@$boolE;@@%falsec@@T@$trued@@Z@@@A@@@@@[@A@$unitF;@@"()e@@e@@@A@@@@@f@A@ #exnG;@@@A@@@@@j@@@#effH;@@O@A@A@@@@@@s@@@,continuationI;@@Q@@P@B@A@nY@@@@@@@@@%arrayJ;@@R@A@A@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern @ @0Division_by_zero]#@@@A  @+End_of_file\#$@@@A@'FailureY#,@'@@A!$$@0Invalid_argumentX#5@0@@A*$-#-@-Match_failureV#>@@=@9@;@@a@@A;5>4>@)Not_foundZ#O@@@AC=F<F@-Out_of_memoryW#W@@@AKENDN@.Stack_overflow^#_@@@ASMVLV@.Sys_blocked_io_#g@@@A[U^T^@)Sys_error[#o@j@@Ad^g]g@:Undefined_recursive_modulea#x@@w@s@u@@h@@Auoxnx@:Continuation_already_takenb#@@@A}wv@&Stdlib@Ax= {b Unsynchronized accesses} D  D  @@@@@@%alertF  F  @5unsynchronized_accessF  F  @@@@@ DUnsynchronized accesses to weak hash tables are a programming error.G  G ?@@G  G @@@@@@@@@@@F  HAB@@Ő Unsynchronized accesses to a weak hash table may lead to an invalid weak hash table state. Thus, concurrent accesses to a weak hash table must be synchronized (for instance with a {!Mutex.t}). JDDN@@@@@@!SCP%P&@T@Б吠 Propose the same interface as usual hash table. However since the bindings are weak, even if [mem h k] is true, a subsequent [find h k] may raise [Not_found] because the garbage collector can run between the two. Q-/U@@@@@@3@@AA+#keyAW 'W *@@;@@@A@@@@@W "@@@@ @@@@A@@@@A+!tBX+6X+7@А!a@3@";@@@A@A@G@B@@@X+-@@@@,A@@AX+3X+5@@B@@;@A+A@O@B@@@ @@@ @@A@ @@3@@A  @&create(Y8>)Y8D@б@г#int3Y8G4Y8J@@ @@@354455555@/? @A@@гC!tBY8QCY8R@А!a@C@NY8NOY8P@@@ @@@@@@"@@%@@@ZY8:@@rB@@@@%%cleareZSYfZS^@б@гq!tpZSdqZSe@А!a@C@3xwwxxxxx@DY%@A~ZSaZSc@@@ @@@ @@г9$unitZSiZSm@@ @@@@@@@@@@@ZSU @@C@@ @@%reset[nt[ny@б@г!t[n[n@А!a@C@3@>Y%@A[n|[n~@@@ @@@ @@гv$unit[n[n@@ @@@@@@@@@@@[np @@D@@ @@$copy\\@б@г렐!t\\@А!a@C@3@>Y%@A\\@@@ @@@ @@г!t\\@А!a \\@@@"@@@ @@@@@!@@@\@@1E@@@@'#add$]%]@б@г0!t/]0]@А!a@C@376677777@Fa%@A=]>]@@@ @@@ @@б@г_#keyM]N]@@ @@@@@б@А!a#Y]Z]@@г$unitb]c]@@ @@@-@@@5@@0@@@@@3! @@@1@@64@@@s]@@F@@@@<&remove~^^@б@г!t^^@А!a@C@3@[v%@A^^@@@ @@@ @@б@г#key^^@@ @@@@@гa$unit^^@@ @@@%@@@@@(@@@&@@+) @@@^@@G@@@@1$find__@б@г٠!t__@А!a@C@3@Pk%@A__@@@ @@@ @@б@г#key__@@ @@@@@А!a!__ @@@ &@@!@@@@@$"@@@ _ @@"H@@ @@*(find_opt` ` @б@г!!t ` !`  @А!a@C@3(''(((((@Id%@A.` /` @@@ @@@ @@б@гP#key>` $?` '@@ @@@@@г&optionK` .L` 4@А!a+&R` +S` -@@@1@@@- @@@@@0@@@.@@31@@@a`  @@yI@@@@9(find_allla5;ma5C@б@гx!twa5Ixa5J@А!a@C@3~~@Xs%@Aa5Fa5H@@@ @@@ @@б@г#keya5Na5Q@@ @@@@@г$lista5Xa5\@А!a+&a5Ua5W@@@1@@@- @@@@@0@@@.@@31@@@a57@@J@@@@9'replaceb]cb]j@б@гϠ!tb]pb]q@А!a@C@3@Xs%@Ab]mb]o@@@ @@@ @@б@г#keyb]ub]x@@ @@@@@б@А!a#b]|b]~@@г$unitb]b]@@ @@@-@@@5@@0@@@@@3! @@@1@@64@@@b]_@@*K@@@@<#memcc@б@г)!t(c)c@А!a@C@30//00000@[v%@A6c7c@@@ @@@ @@б@гX#keyFcGc@@ @@@@@г$boolScTc@@ @@@%@@@@@(@@@&@@+) @@@ac@@yL@@@@1&lengthldmd@б@гx!twdxd@А!a@C@3~~@Pk%@Add@@@ @@@ @@гf#intdd@@ @@@@@@@@@@@d @@M@@ @@%statsGee@б@г!tee@А!a@UC@ 3@>Y%@Aee@@@ @@@  @@гY'Hashtbl*statisticsee@ ee@@@@@@R @@@@@S"  @@@e @@N@@@@('add_seqff@б@г!tff@А!a@ C@V3@Gb%@Af f@@@ @@@X @@б@г#Seq!tff@  f!f@@В@гA#key/f0f@@ @@@ |/@@@А!a:5;f <f @@@@@C@@ }>@@@3 @@@ CIf)@@г$unitQfRf@@ @@@ Q@@@@@ T@@@R@@ WU @@@_f@@wO@@@@]+replace_seqjg"kg-@б@гv!tug3vg4@А!a@ C@ 3}||}}}}}@|%@Ag0g2@@@ @@@  @@б@г#Seq!tgCgF@ gGgH@@В@г#keyg9g<@@ @@@ /@@@А!a:5g?gA@@@@@C@@ >@@@3 @@@ Cg8)@@гy$unitgLgP@@ @@@ Q@@@@@ T@@@R@@ WU @@@g@@P@@@@]&of_seqhQWhQ]@б@гy#Seq!thQkhQn@ hQohQp@@В@г#keyhQahQd@@ @@@ 3      @6@A@@@А!a@ C@  hQghQi@@@@@@@ @@@: @@@ (hQ`0@@г1!t0hQw1hQx@А!a"*7hQt8hQv@@@(@@@ 1 @@@@@ 4@@@ChQS@@[Q@@@@:%cleanNjzOjz@б@гZ!tYjzZjz@А!a@ C@ 3a``aaaaa@Y%@Agjzhjz@@@ @@@  @@г"$unitujzvjz@@ @@@ @@@@@ @@@jz| @)ocaml.doc I remove all dead bindings. Done automatically during automatic resizing. kk@@@@@@@R@@@@@@@@@:+stats_alivemm@б@г!tmm@А!a@ C@ 3@Yt@@Amm@@@ @@@  @@гV'Hashtbl*statisticsmm@ m m@@@@@@  @@@@@ "  @@@m @a D same as {!Hashtbl.SeededS.stats} but only count the alive bindings nn_@@@@@@@S@@@q@@@@@@A@A@A@@p@i5@.@@M@F@@]@V@@}@v9@2@G@@@@F@@3"!!"""""@jH@A+3%$$%%%%%@#@A*P)+o`c@@< The output signature of the functors {!K1.Make} and {!K2.Make}. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed. 9pdd:tce@@@@@@@<P@:@'SeededSFFvgsGvgz@_i@БA+#keyDVxWx@@;@@hA@@@@@Zx@@@@rU@@@A@@@3YXXYYYYY@XysA@jKA@C@@@V@O@@k@d@@i@b@@@$@@D@= @@@\[@[[@@@[@[@X@A:=@A+!tEyy@А!a@ 3@MXR;@@ @A@A@G@B@@@y@@@@V@@Ayy@@@;@AA@O@B@@@ @@@@@A@ @@3@@A @&createzz@б&randomг$boolzz@@ @@@ 3@0@"@A@@б@г#intzz@@ @@@ @@гS!tzz@А!a@ F@ $zz@@@ @@@ +@@@ @@ .#@@?n8@@@  @@ 6 z@@ @ z!@@ )W@@#@@=%clear { {@б@г!t '{ ({@А!a@ F@ 3 / . . / / / / /@\s%@A 5{ 6{@@@ @@@  @@г$unit C{ D{@@ @@@ @@@@@ @@@ N{ @@ fX@@ @@%reset Y|  Z|@б@гǠ!t d| e|@А!a@ F@ 3 l k k l l l l l@>Y%@A r| s|@@@ @@@  @@г -$unit | |@@ @@@ @@@@@ @@@ | @@ Y@@ @@$copy }% })@б@г!t }/ }0@А!a@ F@ 3        @>Y%@A }, }.@@@ @@@  @@г !t }7 }8@А!a }4 }6@@@"@@@  @@@@@ !@@@ }!@@ Z@@@@'#add ~9? ~9B@б@гI!t ~9H ~9I@А!a@ F@ 3        @Fa%@A ~9E ~9G@@@ @@@  @@б@г#key ~9M ~9P@@ @@@ @@б@А!a# ~9T ~9V@@г Ơ$unit ~9Z ~9^@@ @@@ -@@@5@@ 0@@@@@ 3! @@@1@@ 64@@@ *~9;@@ B[@@@@<&remove 5_e 6_k@б@г!t @_q A_r@А!a@ F@ 3 H G G H H H H H@[v%@A N_n O_p@@@ @@@  @@б@г#key ^_v __y@@ @@@ @@г $unit k_} l_@@ @@@ %@@@@@ (@@@&@@ +) @@@ y_a@@ \@@@@1$find  @б@г!t  @А!a@ F@ 3        @Pk%@A  @@@ @@@  @@б@гW#key  @@ @@@ @@А!a!  @@@ &@@ !@@@@@ $"@@@  @@ ]@@ @@*(find_opt  @б@г:!t  @А!a@ F@ 3        @Id%@A  @@@ @@@  @@б@г#key  @@ @@@ @@г a&option  @А!a+&  @@@1@@@ - @@@@@ 0@@@.@@ 31@@@ @@ 0^@@@@9(find_all # $@б@г!t . /@А!a@ F@ 3 6 5 5 6 6 6 6 6@Xs%@A < =@@@ @@@  @@б@г#key L M@@ @@@ @@г ՠ$list Y Z@А!a+& ` a@@@1@@@ - @@@@@ 0@@@.@@ 31@@@ o@@ _@@@@9'replace z {@б@г蠐!t  @А!a@ F@ 3        @Xs%@A  @@@ @@@  @@б@гM#key   @@ @@@ @@б@А!a#  @@г e$unit  @@ @@@ -@@@5@@ 0@@@@@ 3! @@@1@@ 64@@@ @@ `@@@@<#mem # &@б@гB!t , -@А!a@ F@ 3        @[v%@A ) +@@@ @@@  @@б@г#key 1 4@@ @@@ @@г Ƞ$bool 8 <@@ @@@ %@@@@@ (@@@&@@ +) @@@ @@ 0a@@@@1&length #=C $=I@б@г!t .=O /=P@А!a@ F@ 3 6 5 5 6 6 6 6 6@Pk%@A <=L ==N@@@ @@@  @@г #int J=T K=W@@ @@@ @@@@@ @@@ U=? @@ mb@@ @@%stats `X^ aXc@б@гΠ!t kXi lXj@А!a@ F@ 3 s r r s s s s s@>Y%@A yXf zXh@@@ @@@  @@г 'Hashtbl*statistics Xn Xu@  Xv X@@@@@@  @@@@@ "  @@@ XZ @@ c@@@@('add_seq  @б@г!t  @А!a@ (F@ 3        @Gb%@A  @@@ @@@  @@б@г X#Seq!t  @   @@В@г#key  @@ @@@ /@@@А!a:5  @@@@@C@@ !>@@@3 @@@ #C )@@г $unit  @@ @@@ $Q@@@@@ %T@@@R@@ &WU @@@ @@ .d@@@@]+replace_seq ! "@б@г!t , -@А!a@ 4F@ )3 4 3 3 4 4 4 4 4@|%@A : ;@@@ @@@ + @@б@г #Seq!t N O@  R S@@В@г #key a b@@ @@@ ,/@@@А!a:5 m n@@@@@C@@ ->@@@3 @@@ /C {)@@г 0$unit  @@ @@@ 0Q@@@@@ 1T@@@R@@ 2WU @@@ @@ e@@@@]&of_seq  @б@г 0#Seq!t  @   @@В@гh#key  @@ @@@ 53        @6@A@@@А!a@ >F@ 6   @@@@@@@ 7@@@: @@@ 9 0@@гJ!t   @А!a"*    @@@(@@@ ;1 @@@@@ <4@@@ @@f@@@@:%clean@б@гs!t !@А!a@ EF@ ?3@Y%@A@@@ @@@ A @@г ٠$unit,%-)@@ @@@ B@@@@@ C@@@7 @ I remove all dead bindings. Done automatically during automatic resizing. D*,E*z@@@@@@@]g@@@X@@@@@@8+stats_alive[|\|@б@гɠ!tf|g|@А!a@ LF@ F3nmmnnnnn@Wr>@At|u|@@@ @@@ H @@г 'Hashtbl*statistics||@ ||@@@@@@ I @@@@@ J"  @@@|~ @ D same as {!Hashtbl.SeededS.stats} but only count the alive bindings @@@@@@@h@@@&@@@@@@A@b\A@A@@n@g3@,@@K@D@@[@T@@{@t7@0@E@>@@F@@3@jH@A+3@@Avg}@@`񐠠 M The output signature of the functors {!K1.MakeSeeded} and {!K2.MakeSeeded}. JL@@@@@@@vgg@3@@A@"K1 GNUNW@{@@БA+!tH ^m^n@А!k@ O3@A@jA@b@ @@[@T@@p@i@@n@g!@@@)@"@I@B@@@Đcb@bb@@@b@b@_F;@@ M@@ N@B@A@GG@BB@@@\^`O@ܐ; an ephemeron with one key i^oj^@@@@@@@@@j@@Am^fn^h@@BAА!d@ Pay^iz^k@@ @;i @B A@GG@BB@@@'%@@@@A@'&%@%%@@@%@%@@3@u@A3@$make@б@А!k@ _I@ U3@*@A@@б@А!d@ ]I@ V@@г!t@А!k$@@А!d&@@@1#@@@ Y.@@@( @@ Z2#@@@:@@ [53@@@@[ I [Ephemeron.K1.make k d] creates an ephemeron with key [k] and data [d]. @@@@@@@k@@/@k@@@@@@T%query @б@г!t  @А!k@ lI@ `3@s>@A@@А!d@ jI@ a$%@@@# @@@ d,"@@б@А!k"3!4#@@г&option<*=0@А!d$-C'D)@@@*@@@ f4 @@@<@@ g7@@@)@@ h:$@@@R@Ґ [Ephemeron.K1.query eph key] returns [Some x] (where [x] is the ephemeron's data) if [key] is physically equal to [eph]'s key, and [None] if [eph] is empty or [key] is not equal to [eph]'s key. _13`@@@@@@@xl@@&@s@@@@@@Y$MakeIx y @o@@Т!HJ  @Р'Hashtbl*HashedType  !@  " ,@@3@K@A @@УР٠!S 0 1@3@,@%@*m@/@A  @@Ƞ#key < ?@+Р@;@@@AC!t@@@ @@@@ 7 E@@@@n@@@Aг !H B C@ D@@@/@@@@K;@@@A! @@@ _@@@@@@@A@K;@A@A@@@@@@A@@@@@ ^@@@ ]@@ \@@@@ @@@ [|@@@ Z@@ Y@n@l@h@Z@@@ XL@@@ W@@ V@>@<@8@%*@@@ U).@@@ T@@ S@@@@3 @@@ R@S@@@ Q@  @@@ P@@ O@@ N@@ M@ @ @ @H @@@ L@@@@ K @@@ J@@ I@@ H@ @ @ @Z q@@@ G@'@@@ F w@@ E@@ D@ L@ J@ F@i 8@@@ C@6@@@ B  A@@@ A@@ @@@ ?@ @ @ @| @@@ >@I@@@ = ܠ @@@ <@@ ;@@ :@ @ @ @ @@@ 9@\@@@ 8@  @@@ 7@@ 6@@ 5@@ 4@ ~@ |@ x@ j@@@ 3@p@@@ 2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@AKw@@ \ y Functor building an implementation of a weak hash table. The seed is similar to the one of {!Hashtbl.MakeSeeded}. YZW@@@@@@@\@@&Bucket OhYbiYh@z@@БA+!tPwpxp@А!k@3~}}~~~~~@9@1(A@A@@@ut@ji@^]@KJ@;:@.-@@  @@@@@@@@xw@@ 0dc@cc@@@c@c@`iH;@@@@@B@A@GG@BB@@@ptQ@ H - A bucket is a mutable "list" of ephemerons. @@@@@@@@@s@@Apzp|@@lА!d@bp~p@@w@;j @BA@GG@BB@@@&$@@@@A@& l%$@$$@@@$@$@@3@v@A2@$make@б@г$unit @@ @@@#3@.@A@@г!t@А!k@-Q@$()@@А!d@+Q@%!45@@@! @@@()< @@@0 @@)-3#@@@B&@ 6 Create a new bucket. OP@@@@@@@ht@@6@ c@@@@@@L#addfg @б@г!tqr@А!k@:Q@.3yxxyyyyy@k>@A@@А!d@8Q@/@@@# @@@2 "@@б@А!k"@@б@А!d%!#@@гX$unit'+@@ @@@34@@@.@@47@@@?@@5: @@@,@@6='@@@@< ! Add an ephemeron to the bucket. ,0,V@@@@@@@u@@!@Lݐ@@@@@@\&removeX`Xf@б@гt!tXrXs@А!k@FQ@;3@{>@AXjXl@@А!d@DQ@<XnXp@@@# @@@? Xi"@@б@А!k"XwXy@@гʠ$unitX}X@@ @@@@,@@@4@@A/@@@!@@B2 @@@+X\@ [remove b k] removes from [b] the most-recently added ephemeron with key [k], or does nothing if there is no such ephemeron. 89@@@@@@@Qv@@@L@@@@@@Q$findO#P'@б@г㠐!tZ3[4@А!k@SQ@G3baabbbbb@p>@Ah+i-@@А!d@QQ@Ht/u1@@@# @@@K|*"@@б@А!k"8:@@г렐&optionAG@А!d$->@@@@*@@@M4 @@@<@@N7@@@)@@O:$@@@@" | Returns the data of the most-recently added ephemeron with the given key, or [None] if there is no such ephemeron. HL@@@@@@@w@@&@2Ð@@@@@@Y&length@б@гZ!t@А!k@^Q@T3@x>@A@@А!d@\Q@U@@@# @@@X"@@гΠ#int@@ @@@Y$@@@@@Z'@@@ @ 5 Returns an upper bound on the length of the bucket. 0@@@@@@@,x@@@'@@@@@@F%clear*2:+2?@б@г!t52K62L@А!k@iQ@_3=<<=====@e>@AC2CD2E@@А!d@gQ@`O2GP2I@@@# @@@cW2B"@@г $unit_2P`2T@@ @@@d$@@@@@e'@@@j26 @ꐠ ( Remove all ephemerons from the bucket. wUYxU@@@@@@@y@@@@@@@@@F@A@J@*@e@E@@n,@@3@Up.@A3@@AYk@@@Y[@@@%A@@T@3@xd-@@^@cOX@@I@@C@@@3@,L@@A@u@U@@p@@W@@@$U@A"3@@ANZ@@CԐ: Ephemerons with one key. @@@@@@@NN@@"K2FQ@O@@БA+!t R@А"k1@m3@ @A@o)@ @@21A@*)A@&%@@@@@@@@@@@@yx@lk@PO@43@@@@@@@ّRQA@JIA@FE@10@&%@@@@@@@@@@@@gf@KJ@43@)(@@@@@A@l*@ @E@%@n@N @@@ @@@󐠠@@@@@@ ~;@@j@@k@@l@C@A@GGG@BBB@@@@< an ephemeron with two keys @@@@@@@@@|@@A@@ 4А"k2@n@@ ?А!d@o@@ J@;Š @CA@GGG@BBB@@@42@@$@@A@4BӐ32@22@@@2@2@@3@@A@@$make @б@А"k1@S@v3@-@A  @@б@А"k2@S@w@@б@А!d@S@x@@г!t + ,@А"k11,"@@А"k2)3#&@@А!d#:' )@@@E7+@@@|C(@@@0 @@}G+!@@@@@@~J;$@@@R@@MK'@@@4*@> Same as {!Ephemeron.K1.make} A-/B-R@@@@@@@Z}@@:@U@@@@@@l%query XTZYT_@б@гt!tcTodTp@А"k1@S@3kjjkkkkk@>@AqTcrTf@@А"k2@S@}Tg~Tj@@А!d@S@TkTm@@@/% @@@#Tb/@@б@А"k1/*TtTw@@б@А"k2)2T{T~@@г &optionTT@А!d-BTT@@@3@@@I @@@C@@L@@@T@@O%@@@5@@R/@@@TV@C? Same as {!Ephemeron.K1.query} @@@@@@@~@@)@S䐠@@@@@@q$Make%S@B@@Т"H1T@Р'Hashtbl*HashedType@ @@3@K@A @@Т"H2U@Р'Hashtbl*HashedType#$@ '(@@3(''(((((@#>@7@<G@A@A @@УРo!S;  <  @3;::;;;;;@0@)@.Z@@3@A  @@^#keyL  M  @+f@;@@@A@l!t@@@@S!t@@@@@@@@@g  h  !@@@@A@@@AВ@г"H1w  x  @{  |  @@@&@@@@г!"H2    @(  &@'@@/Q(@@@<R)@@+@@V;@@@A@DC@@@M@BA@@@N@@L@@@@@@@@=A@V;@A@A@@@@@@A@@@@@Kq@@@J@@I@a@_@[@ M@@@H?@@@G@@F@1@/@+@@@@E@@@D@@C@@@@%@@@B)@@@A@@@@@@@3@@@?@]@@@>@@@@=@@<@@;@@:@@@@Hq@@@9@@@@8Y@@@7@@6@@5@H@F@B@Z4@@@4@'@@@3:@@2@@1@@ @ @i@@@0@6@@@/@@@.@@-@@,@@@@|@@@+@I@@@*@@@)@@(@@'@@@@s@@@&@\@@@%@{U@@@$@@#@@"@@!@A@?@;@-@@@ @p@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@ @Ѡ@@@@{z@@@@@@@@@@Q@@@@@@@@@@>@:!@,@@@@:@@@@ @=@@ @@@ @@@ @@ @@@@@"@Rؠ@@@@@@@@@@@@@@@@@@#@&@@@q@@@@@@caQ@B$@34@@@|&%@@@@@@@@@@c3@@A@@ 3@@A@@{ 9 Functor building an implementation of a weak hash table   " $  " b@@@@@@@ @@*MakeSeeded=W d m d w@1F@@Т"H1&X$ x % x @Р'Hashtbl0SeededHashedType1 x 2 x @ 5 x 6 x @@365566666@0W@OF1(A@A@@@@yx@ml@ZY@JI@=<@,+@@ @@@@@@@@@ꐠnm@mm@@@m@m@j@AE@@@Т"H2'Y    @Р'Hashtbl0SeededHashedType    @     @@3@]x@q@vC@{@A @@УР^'SeededS    @3@0@)@.D@3@A  @@_#key    @+g@;@@@A@!t@@@Y@S!t@@@d@@e@@@@    @@@@E@@@AВ@г"H1    @    @@@&@@@@г!"H2    @(  &@'@@/Q(@@@<R)@@+@@)Z;@@@A@DC@@@@BA@@@@@ @@@@@@@@=A@x*Z;p@A@A@\[@@d@@@bA@V+RS@@@ @@@ @H@@@ 5@@@ @@@@@@@,@ @@@@@@@@@@@-@@@@@@@@@@@@.@%@@@)@@@@@@@@/@3q@@@@f@@@@zT@@@@@@@@@@@@>@:0@H,@@@@@@@@@@@@@@@@@1@Z@@@@'@@@@@@@@@@2@i@@@@6@@@@@@@@@@@@@3@|r@@@@I@@@Z{@@@@@@@@B@@@<4@.@@@@\@@@@6@@@@@@@@@@@@5@@@@@p@@@@@@@@@@@@@6@@@@@@@@@@@@7@ {@@@}ml@@@@@@X@V@R8@ѠD@@@@65@@@@Ҡ@U@@@@@ @@@@@@@@@@9@@@@@ؠ@@@@ˠ@@@@@@@@@@@@@@@@:@@@@@Š@w@@@@@{@@@@@@N@L@H;@&:@@@,@@@@@@@<@3@@@@@@@@@@@@@l3cbbccccc@@Ah  @@M33hgghhhhh@2@Am x ~@@~ y Functor building an implementation of a weak hash table. The seed is similar to the one of {!Hashtbl.MakeSeeded}. {  |!)!j@@@@@@@~ d f@@&BucketE[!l!u!l!{@N@@БA+!t>\!!!!@А"k1@3@l@3*A@A@@@}|@rq@fe@SR@CB@65@%$@@@@@@@@@@@Ugf@ff@@@f@f@cK;@@@@@@@C@A@GGG@BBB@@@!!Y@r - A bucket is a mutable "list" of ephemerons. !!!!@@@@@@@@@G@@A!!!!@@А"k2@j!!!!@@А!d@u!!!!@@@;} @C.A@GGG@BBB@@@42@@$@@A@4532@22@@@2@2@@3-,,-----@@A@@$make?:!!;!!@б@г$unitE!!F!!@@ @@@3GFFGGGGG@1@A@@г!tT!!U!!@А"k1@(]@`!!a!!@@А"k2@*]@!l!!m!!@@А!d@&]@-x!!y!!@@@-# @@@#6!!-@@@= @@$:@0@@@!!3@6 Create a new bucket. !"!"@@@@@@@H@@C@@@@@@@Y#add@""&"")@б@г!t"";""<@А"k1@:]@+3@x>@A""-""0@@А"k2@<]@,""2""5@@А!d@8]@-""7""9@@@/% @@@1#"",/@@б@А"k1/*""@""C@@б@А"k2)2""G""J@@б@А!d%:""N""P@@г$unit ""T ""X@@ @@@2I@@@7@@3L@@@F@@4O @@@W@@5R(@@@8@@6U2@@@ """@ ! Add an ephemeron to the bucket.  &"Y"] '"Y"@@@@@@@ ?I@@$@ :@@@@@@t&removeA ="" >""@б@г!t H"" I""@А"k1@K]@=3 P O O P P P P P@>@A V"" W""@@А"k2@M]@> b"" c""@@А!d@I]@? n"" o""@@@/% @@@C# w""/@@б@А"k1/* ~"" ""@@б@А"k2)2 "" ""@@г <$unit "" ""@@ @@@DA@@@;@@ED@@@L@@FG @@@-@@GJ'@@@ ""@ [remove b k1 k2] removes from [b] the most-recently added ephemeron with keys [k1] and [k2], or does nothing if there is no such ephemeron.  "" #C#c@@@@@@@ J@@!@0 @@@@@@i$findB #e#m #e#q@б@г6!t #e# #e#@А"k1@]]@N3        @>@A #e#u #e#x@@А"k2@_]@O #e#z #e#}@@А!d@[]@P #e# #e#@@@/% @@@T# #e#t/@@б@А"k1/*!#e#!#e#@@б@А"k2)2! #e#!#e#@@г u&option!#e#!#e#@А!d-B!#e#!#e#@@@3@@@VI @@@C@@WL@@@T@@XO%@@@5@@YR/@@@!/#e#i@ } Returns the data of the most-recently added ephemeron with the given keys, or [None] if there is no such ephemeron. !<##!=#$&@@@@@@@!UK@@)@!P@@@@@@q&lengthC!S$($0!T$($6@б@гŠ!t!^$($H!_$($I@А"k1@l]@`3!f!e!e!f!f!f!f!f@>@A!l$($:!m$($=@@А"k2@n]@a!x$($?!y$($B@@А!d@j]@b!$($D!$($F@@@/% @@@f#!$($9/@@г!h#int!$($M!$($P@@ @@@g1@@@@@h4@@@!$($, @ 5 Returns an upper bound on the length of the bucket. !$Q$U!$Q$@@@@@@@!L@@@0!@@@@@@S%clearD!$$!$$@б@г6!t!$$!$$@А"k1@{]@o3!!!!!!!!@r>@A!$$!$$@@А"k2@}]@p!$$!$$@@А!d@y]@q!$$!$$@@@/% @@@u#!$$/@@г!$unit"$$"$$@@ @@@v1@@@@@w4@@@"$$ @ ( Remove all ephemerons from the bucket. "$$"$$@@@@@@@"7M@@@"2@@@@@@S@A@@@@w @@{,@@3"8"7"7"8"8"8"8"8@b}.@A3";":":";";";";";@@A"@!l!~"A$$@@@"C!l!n@@@ \ A@ u @@i@WCc@@=@{7@@@@@@@3"Q"P"P"Q"Q"Q"Q"Q@@?A@&@G@'@5@@W@@@$@A"3"d"c"c"d"d"d"d"d@ m@A"i"j$$@@"{; Ephemerons with two keys. "x$$"y$%@@@@@@@"{@@"Kn]"%%!"%%#@"a@@БA+!tG^"%*%9"%*%:@А!k@3""""""""@  @  A@  w@ W@@#"A@A@  @@@@@@@@@@{z@kj@`_@SR@76@@@@@r@@@ĐlcA@A@@@@@@@|{@on@^]@ML@;:@+*@ @@@@@@@9@@@A@@r@}@]@@a@@@@@@@@@@@@ I;@@~@@@B@A@GG@BB@@@#8%*%,@ V an ephemeron with an arbitrary number of keys of the same type #E%*%;#F%m%@@@@@@@@@#^P@@A#I%*%2#J%*%4@@ܠА!d@#T%*%5#U%*%7@@@; @B!hA@GG@BB@@@&$@@@@A@&#m%$@$$@@@$@$@@3#e#d#d#e#e#e#e#e@@A2@$makeH#r%%#s%%@б@г#%array#}%%#~%%@А!k@_@3########@4@A#%%#%%@@@ @@@ @@б@А!d@_@#%%#%%@@г!t#%%#%%@А!k)$#%%#%%@@А!d+#%%#%%@@@6#@@@3#%%@@@( @@7#@@@5@@:8@@@#%%@E> Same as {!Ephemeron.K1.make} #%%#%%@@@@@@@#Q@@/@U#搠@@@@@@Y%queryI#%%#%%@б@г^!t#%%#%%@А!k@_@3########@x>@A$%%$%%@@А!d@_@$%%$%%@@@# @@@$%%"@@б@г#%array$ %&$!%& @А!k,'$'%&$(%&@@@2@@@. @@г#&option$5%&$6%&@А!d3<$<%&$=%&@@@9@@@C @@@@@F@@@8@@I3@@@$K%%@ː? Same as {!Ephemeron.K1.query} $X&&$Y&&?@@@@@@@$qR@@&@$l@@@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AB=@@УРz'SeededS& ' ' & ' '@3&&&&&&&&@Hc@\@a&V@f@A  @@{#key& ' '& ' '"@+@;@@@A&f~!t@@@Y@@@[@@@@& ' '& ' '.@@@@&W@@@Aг%array& ' ') @г!H& ' '%& ' '&@& ' ''& ' '(@@@#=@@@(> @@@@cd;@@@A0/.@@@@@@@@@@-@@@*A@zdd;r@A@A@^]@@f@@@dA@XeTU@@@@@@@J@@@7@@@@@@@@@@f@  @@@@@@@@@@@g@@@@@@@@@@@@h@%@@@)@@@@@@@@i@3s@@@@`@@@@|V@@@@@@@@@@B@@@<j@H.@@@@@@@@@@@@@@@@@k@Z@@@@'@@@@@@@@@@l@i@@@@6@@@@@@@@@@@@@m@|t@@@@I@@@\}@@@@@@@@D@B@>n@0@@@@\@@@@8@@@@@@@@@@@@o@@@@@p@@@@@@@@@@@@@p@@@@@@@@@@@@q@ }@@@&on@@@@@@Z@X@Tr@ѠF@@@@&87@@@@Ǡ@W@@@@@@@@@@@@@@@s@@@@@&ڠ@@@@@@@@@@@@@@@@@@@@t@&@@@@@y@@@@@}@@@@@@P@N@Ju@&<@@@.@@@@@@ @v@3@@@&@@@@@@@@@@f3(e(d(d(e(e(e(e(e@@A(j &&@@ ({ y Functor building an implementation of a weak hash table. The seed is similar to the one of {!Hashtbl.MakeSeeded}. (x '/'1(y 'n'@@@@@@@({ &&@@&Buckete(''(''@(`@@БA+!txf(''(''@А!k@3((((((((@%L@D;A@A@@@ut@ji@^]@KJ@;:@.-@@  @@@@@@@@xw@@!Odc@cc@@@c@c@`|H;@@@@@B@A@GG@BB@@@(''Q@!g - A bucket is a mutable "list" of ephemerons. (''('(@@@@@@@@@) Y@@A(''(''@@А!d@b)'')''@@@;j @B'A@GG@BB@@@&$@@@@A@&!)%$@$$@@@$@$@@3))))))))@v@A2@$makey)!(()"(( @б@г(٠$unit),((#)-(('@@ @@@ 3).)-)-).).).).).@.@A@@г!t);((4)<((5@А!k@g@ )G((,)H((.@@А!d@g@!)S((0)T((2@@@! @@@))[((+ @@@0 @@-3#@@@)a((&@!ᐠ6 Create a new bucket. )n(6(:)o(6(U@@@@@@@)Z@@6@!)@@@@@@L#addz)(W(_)(W(b@б@г!t)(W(n)(W(o@А!k@%g@3))))))))@k>@A)(W(f)(W(h@@А!d@#g@)(W(j)(W(l@@@# @@@)(W(e"@@б@г)B%array)(W(v)(W({@А!k,')(W(s)(W(u@@@2@@@. @@б@А!d+4)(W()(W(@@г)$unit)(W()(W(@@ @@@C@@@=@@F@@@@@ I" @@@;@@!L6@@@)(W([@"j ! Add an ephemeron to the bucket. )(()((@@@@@@@*[@@!@"z* @@@@@@k&remove{*((*((@б@г!t*((*((@А!k@3g@&3*!* * *!*!*!*!*!@>@A*'((*(((@@А!d@1g@'*3((*4((@@@# @@@**;(("@@б@г)ˠ%array*E((*F((@А!k,'*L((*M((@@@2@@@,. @@г*$unit*Z((*[((@@ @@@-;@@@@@.>@@@0@@/A+ @@@*h((@"萠 [remove b k] removes from [b] the most-recently added ephemeron with keys [k], or does nothing if there is no such ephemeron. *u((*v)i)~@@@@@@@*\@@@"*@@@@@@`$find|*))*))@б@г!t*))*))@А!k@Bg@43********@>@A*))*))@@А!d@@g@5*))*))@@@# @@@8*))"@@б@г*I%array*))*))@А!k,'*))*))@@@2@@@:. @@г*7&option*))*))@А!d3<*))*))@@@9@@@<C @@@@@=F@@@8@@>I3@@@*))@#n } Returns the data of the most-recently added ephemeron with the given keys, or [None] if there is no such ephemeron. * ))*!)*9@@@@@@@+]@@&@#~+@@@@@@h&length}+#*;*C+#*;*I@б@г!t+#*;*U+#*;*V@А!k@Mg@C3+%+$+$+%+%+%+%+%@>@A++#*;*M+,#*;*O@@А!d@Kg@D+7#*;*Q+8#*;*S@@@# @@@G+?#*;*L"@@г+#int+G#*;*Z+H#*;*]@@ @@@H$@@@@@I'@@@+R#*;*? @#Ґ 5 Returns an upper bound on the length of the bucket. +_$*^*b+`$*^*@@@@@@@+x^@@@#+s@@@@@@F%clear~+v&**+w&**@б@г렐!t+&**+&**@А!k@Xg@N3++++++++@e>@A+&**+&**@@А!d@Vg@O+&**+&**@@@# @@@R+&**"@@г+X$unit+&**+&**@@ @@@S$@@@@@T'@@@+&** @$6 ( Remove all ephemerons from the bucket. +'**+'**@@@@@@@+_@@@$F+א@@@@@@F@BA@w@W@t@T@@n,@@3++++++++@Up.@A3++++++++@B@A+''+)**@@@+''@@@ ZA@+@ @@G@@@&|@@v@@p@@@3++++++++@Yy@mA@@@@@@W@@@$@A"3, ,,, , , , , @ k@A,%%&,+**@@$, < Ephemerons with arbitrary number of keys of the same type. ,,**,,*+@@@@@@@@, %%@@@*\###*X@#N:#@3@nZ-@@T@   N@@ @($"!@!!@@@!@!@ @@@3,:,9,9,:,:,:,:,:@  @ A@@b@@Ր̑mlA@a`A@]\@QP@FE@;:@/.@@  @@@@@@@@@kj@TS@IH@@'@@!@zyA@nmA@ji@UT@JI@?>@32@ @@@@@@@@@@on@XW@ML@@+G@@%@A@N@.@K@+@e@E@@@.@@@ .@A@ H************************************************************************,A@@,A@L@ H ,BMM,BM@ H OCaml ,C,C@ H ,D,D3@ H Damien Doligez, projet Para, INRIA Rocquencourt ,E44,E4@ H ,F,F@ H Copyright 1997 Institut National de Recherche en Informatique et ,G,G@ H en Automatique. ,H,Hg@ H ,Ihh,Ih@ H All rights reserved. This file is distributed under the terms of ,J,J@ H the GNU Lesser General Public License version 2.1, with the ,K,KN@ H special exception on linking described in the file LICENSE. ,LOO,LO@ H -M-M@ H************************************************************************- N- N5@ w* Ephemerons and weak hash tables. Ephemerons and weak hash tables are useful when one wants to cache or memorize the computation of a function, as long as the arguments and the function are used, without creating memory leaks by continuously keeping old computation results that are not useful anymore because one argument or the function is freed. An implementation using {!Hashtbl.t} is not suitable because all associations would keep the arguments and the result in memory. Ephemerons can also be used for "adding" a field to an arbitrary boxed OCaml value: you can attach some information to a value created by an external library without memory leaks. Ephemerons hold some keys and one or no data. They are all boxed OCaml values. The keys of an ephemeron have the same behavior as weak pointers according to the garbage collector. In fact OCaml weak pointers are implemented as ephemerons without data. The keys and data of an ephemeron are said to be full if they point to a value, or empty if the value has never been set, has been unset, or was erased by the GC. In the function that accesses the keys or data these two states are represented by the [option] type. The data is considered by the garbage collector alive if all the full keys are alive and if the ephemeron is alive. When one of the keys is not considered alive anymore by the GC, the data is emptied from the ephemeron. The data could be alive for another reason and in that case the GC will not free it, but the ephemeron will not hold the data anymore. The ephemerons complicate the notion of liveness of values, because it is not anymore an equivalence with the reachability from root value by usual pointers (not weak and not ephemerons). With ephemerons the notion of liveness is constructed by the least fixpoint of: A value is alive if: - it is a root value - it is reachable from alive value by usual pointers - it is the data of an alive ephemeron with all its full keys alive Notes: - All the types defined in this module cannot be marshaled using {!Stdlib.output_value} or the functions of the {!Marshal} module. Ephemerons are defined in a language agnostic way in this paper: B. Hayes, Ephemerons: A New Finalization Mechanism, OOPSLA'97 @since 4.03 ->* {b Unsynchronized accesses} + * Unsynchronized accesses to a weak hash table may lead to an invalid weak hash table state. Thus, concurrent accesses to a weak hash table must be synchronized (for instance with a {!Mutex.t}). +S * Propose the same interface as usual hash table. However since the bindings are weak, even if [mem h k] is true, a subsequent [find h k] may raise [Not_found] because the garbage collector can run between the two. +6 J* remove all dead bindings. Done automatically during automatic resizing. % E* same as {!Hashtbl.SeededS.stats} but only count the alive bindings %0 * The output signature of the functors {!K1.Make} and {!K2.Make}. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed. $蠠=thwart tools/sync_stdlib_docs-$z-%z@ J* remove all dead bindings. Done automatically during automatic resizing. 栠 E* same as {!Hashtbl.SeededS.stats} but only count the alive bindings  N* The output signature of the functors {!K1.MakeSeeded} and {!K2.MakeSeeded}. B<* an ephemeron with one key ʠ J* [Ephemeron.K1.make k d] creates an ephemeron with key [k] and data [d]. N * [Ephemeron.K1.query eph key] returns [Some x] (where [x] is the ephemeron's data) if [key] is physically equal to [eph]'s key, and [None] if [eph] is empty or [key] is not equal to [eph]'s key. ڠ :* Functor building an implementation of a weak hash table  z* Functor building an implementation of a weak hash table. The seed is similar to the one of {!Hashtbl.MakeSeeded}. 栠 .* A bucket is a mutable "list" of ephemerons. m7* Create a new bucket.  "* Add an ephemeron to the bucket.  * [remove b k] removes from [b] the most-recently added ephemeron with key [k], or does nothing if there is no such ephemeron.  }* Returns the data of the most-recently added ephemeron with the given key, or [None] if there is no such ephemeron.  6* Returns an upper bound on the length of the bucket. > )* Remove all ephemerons from the bucket. ݠ;* Ephemerons with one key. =* an ephemeron with two keys ?* Same as {!Ephemeron.K1.make}  * Same as {!Ephemeron.K1.query}  :* Functor building an implementation of a weak hash table Z z* Functor building an implementation of a weak hash table. The seed is similar to the one of {!Hashtbl.MakeSeeded}. 렠 .* A bucket is a mutable "list" of ephemerons. j7* Create a new bucket.  ؠ "* Add an ephemeron to the bucket.  I * [remove b k1 k2] removes from [b] the most-recently added ephemeron with keys [k1] and [k2], or does nothing if there is no such ephemeron.  Š ~* Returns the data of the most-recently added ephemeron with the given keys, or [None] if there is no such ephemeron.  9 6* Returns an upper bound on the length of the bucket.  ˠ )* Remove all ephemerons from the bucket.  ]<* Ephemerons with two keys.   W* an ephemeron with an arbitrary number of keys of the same type