@@ -114,9 +114,9 @@ one first creates shared memory locations:
114114# let a = Loc.make 0
115115 and b = Loc.make 0
116116 and x = Loc.make 0
117- val a : int Loc.t = <abstr>
118- val b : int Loc.t = <abstr>
119- val x : int Loc.t = <abstr>
117+ val a : int Loc.t = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
118+ val b : int Loc.t = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
119+ val x : int Loc.t = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
120120```
121121
122122One can then manipulate the locations individually:
@@ -300,7 +300,7 @@ transactions to `push` and `try_pop` elements:
300300
301301``` ocaml
302302# let a_stack : int stack = stack ()
303- val a_stack : int stack = <abstr>
303+ val a_stack : int stack = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
304304
305305# Xt.commit { tx = push a_stack 101 }
306306- : unit = ()
@@ -418,7 +418,9 @@ transactions to `enqueue` and `try_dequeue` elements:
418418
419419``` ocaml
420420# let a_queue : int queue = queue ()
421- val a_queue : int queue = {front = <abstr>; back = <abstr>}
421+ val a_queue : int queue =
422+ {front = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
423+ back = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}}
422424
423425# Xt.commit { tx = enqueue a_queue 76 }
424426- : unit = ()
@@ -533,10 +535,12 @@ To test them out, let's create a fresh stack and a queue
533535
534536``` ocaml
535537# let a_stack : int stack = stack ()
536- val a_stack : int stack = <abstr>
538+ val a_stack : int stack = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
537539
538540# let a_queue : int queue = queue ()
539- val a_queue : int queue = {front = <abstr>; back = <abstr>}
541+ val a_queue : int queue =
542+ {front = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
543+ back = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}}
540544```
541545
542546and then spawn a domain that tries to atomically both pop and dequeue:
@@ -759,7 +763,8 @@ and create a leftist heap:
759763
760764``` ocaml
761765# let a_heap : int leftist Loc.t = leftist ()
762- val a_heap : int leftist Loc.t = <abstr>
766+ val a_heap : int leftist Loc.t =
767+ Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
763768```
764769
765770To populate the heap we need to define a transaction passing function and pass
@@ -1018,7 +1023,8 @@ We can then test that the cache works as expected:
10181023``` ocaml
10191024# let a_cache : (int, string) cache = cache 2
10201025val a_cache : (int, string) cache =
1021- {space = <abstr>; table = <abstr>; order = <abstr>}
1026+ {space = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
1027+ table = <abstr>; order = <abstr>}
10221028
10231029# Xt.commit { tx = set_blocking a_cache 101 "basics" }
10241030- : unit = ()
@@ -1266,7 +1272,8 @@ Consider the following example of computing the size of a stack:
12661272
12671273``` ocaml
12681274# let a_stack = Loc.make [2; 3]
1269- val a_stack : int list Loc.t = <abstr>
1275+ val a_stack : int list Loc.t =
1276+ Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
12701277
12711278# let n_elems =
12721279 let tx ~xt =
@@ -1432,7 +1439,9 @@ Using the Michael-Scott style queue is as easy as any other transactional queue:
14321439
14331440``` ocaml
14341441# let a_queue : int queue = queue ()
1435- val a_queue : int queue = {head = <abstr>; tail = <abstr>}
1442+ val a_queue : int queue =
1443+ {head = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
1444+ tail = <abstr>}
14361445
14371446# Xt.commit { tx = enqueue a_queue 19 }
14381447- : unit = ()
@@ -1884,7 +1893,10 @@ for hash tables, we are ready to take it out for a spin:
18841893``` ocaml
18851894# let a_hashtbl : (string, int) hashtbl = hashtbl ()
18861895val a_hashtbl : (string, int) hashtbl =
1887- {pending = <abstr>; basic = {size = <abstr>; data = <abstr>}}
1896+ {pending = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
1897+ basic =
1898+ {size = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
1899+ data = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}}}
18881900
18891901# let assoc = [
18901902 ("Intro", 101);
@@ -1999,7 +2011,9 @@ in the earlier example:
19992011
20002012``` ocaml
20012013# let a_queue : int queue = queue ()
2002- val a_queue : int queue = {head = <abstr>; tail = <abstr>}
2014+ val a_queue : int queue =
2015+ {head = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>};
2016+ tail = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}}
20032017
20042018# let counter = ref 1_000
20052019val counter : int ref = {contents = 1000}
@@ -2054,8 +2068,8 @@ locations. Let's just create two locations `a` and `b`:
20542068
20552069``` ocaml
20562070# let a = Loc.make 0 and b = Loc.make 0
2057- val a : int Loc.t = <abstr>
2058- val b : int Loc.t = <abstr>
2071+ val a : int Loc.t = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
2072+ val b : int Loc.t = Kcas.Loc.Loc {Kcas.Loc.state = <poly>; id = <poly>}
20592073```
20602074
20612075And create a helper that spawns a domain that repeatedly increments ` a ` and
0 commit comments