Debian Codegraph @

doc/guide/src/Stabilizers.adoc

raw
1 = Stabilizers
2
3 == Installation
4
5 * Stabilizers currently require the MLton sources, this should be fixed by the next release
6
7 == License
8
9 * Stabilizers are released under the MLton License
10
11 == Instructions
12
13 * Download and build a source copy of MLton
14 * Extract the tar.gz file attached to this page
15 * Some examples are provided in the "examples/" sub directory, more examples will be added to this page in the following week
16
17 == Bug reports / Suggestions
18
19 * Please send any errors you encounter to schatzp and lziarek at cs.purdue.edu
20 * We are looking to expand the usability of stabilizers
21 * Please send any suggestions and desired functionality to the above email addresses
22
23 == Note
24
25 * This is an alpha release. We expect to have another release shortly with added functionality soon
26 * More documentation, such as signatures and descriptions of functionality, will be forthcoming
27
28
29 == Documentation
30
31 [source,sml]
32 ----
33 signature STABLE =
34 sig
35 type checkpoint
36
37 val stable: ('a -> 'b) -> ('a -> 'b)
38 val stabilize: unit -> 'a
39
40 val stableCP: (('a -> 'b) * (unit -> unit)) ->
41 (('a -> 'b) * checkpoint)
42 val stabilizeCP: checkpoint -> unit
43
44 val unmonitoredAssign: ('a ref * 'a) -> unit
45 val monitoredAssign: ('a ref * 'a) -> unit
46 end
47 ----
48
49
50 `Stable` provides functions to manage stable sections.
51
52 * `type checkpoint`
53 +
54 handle used to stabilize contexts other than the current one.
55
56 * `stable f`
57 +
58 returns a function identical to `f` that will execute within a stable section.
59
60 * `stabilize ()`
61 +
62 unrolls the effects made up to the current context to at least the
63 nearest enclosing _stable_ section. These effects may have propagated
64 to other threads, so all affected threads are returned to a globally
65 consistent previous state. The return is undefined because control
66 cannot resume after stabilize is called.
67
68 * `stableCP (f, comp)`
69 +
70 returns a function `f'` and checkpoint tag `cp`. Function `f'` is
71 identical to `f` but when applied will execute within a stable
72 section. `comp` will be executed if `f'` is later stabilized. `cp`
73 is used by `stabilizeCP` to stabilize a given checkpoint.
74
75 * `stabilizeCP cp`
76 +
77 same as stabilize except that the (possibly current) checkpoint to
78 stabilize is provided.
79
80 * `unmonitoredAssign (r, v)`
81 +
82 standard assignment (`:=`). The version of CML distributed rebinds
83 `:=` to a monitored version so interesting effects can be recorded.
84
85 * `monitoredAssign (r, v)`
86 +
87 the assignment operator that should be used in programs that use
88 stabilizers. `:=` is rebound to this by including CML.
89
90 == Download
91
92 * link:Stabilizers.attachments/stabilizers_alpha_2006-10-09.tar.gz[`stabilizers_alpha_2006-10-09.tar.gz`]
93
94 == Also see
95
96 * <<References#ZiarekEtAl06,ZiarekEtAl06>>