Commit e58abf6de466a86fd6f7c0d5331f065247b9046f
1 parent
66b866ac
OK notes.
Showing
4 changed files
with
32 additions
and
33 deletions
certainty.tex
| @@ -84,13 +84,13 @@ service tracks when alternative decisions change, runs \texttt{evaluate} | @@ -84,13 +84,13 @@ service tracks when alternative decisions change, runs \texttt{evaluate} | ||
| 84 | evaluation logic when appropriate, and returns testing results to the | 84 | evaluation logic when appropriate, and returns testing results to the |
| 85 | \texttt{maybe} server. | 85 | \texttt{maybe} server. |
| 86 | 86 | ||
| 87 | -Because unpredictable runtime variable changes could cause crashes or | ||
| 88 | -incorrect behavior, our prototype currently only changes variable values when | ||
| 89 | -they are set using a \texttt{maybe} statement. If the app wants to enable | ||
| 90 | -periodic readaptation of certain global variables, such as the interval | ||
| 91 | -controlling a timer, it can do so by periodically resetting the value using | ||
| 92 | -another \texttt{maybe} statement. This ensures that \texttt{maybe} variables | ||
| 93 | -only change when the developer expects them to. | 87 | +\sloppypar{Because unpredictable runtime variable changes could cause crashes |
| 88 | +or incorrect behavior, our prototype currently only changes variable values | ||
| 89 | +when they are set using a \texttt{maybe} statement. If the app wants to | ||
| 90 | +enable periodic readaptation of certain global variables, such as the | ||
| 91 | +interval controlling a timer, it can do so by periodically resetting the | ||
| 92 | +value using another \texttt{maybe} statement. This ensures that | ||
| 93 | +\texttt{maybe} variables only change when the developer expects them to.} | ||
| 94 | 94 | ||
| 95 | \subsubsection{Simulation or emulation} | 95 | \subsubsection{Simulation or emulation} |
| 96 | 96 | ||
| @@ -116,14 +116,14 @@ Eventually code containing a number of \texttt{maybe} statements will be | @@ -116,14 +116,14 @@ Eventually code containing a number of \texttt{maybe} statements will be | ||
| 116 | deployed on thousands or millions of devices. At this point, large-scale | 116 | deployed on thousands or millions of devices. At this point, large-scale |
| 117 | split testing and learning can begin. If the user community is large enough, | 117 | split testing and learning can begin. If the user community is large enough, |
| 118 | then it may be possible to collect statistically-significant results even for | 118 | then it may be possible to collect statistically-significant results even for |
| 119 | -all possible permutations of \texttt{maybe} alternatives. For apps | ||
| 120 | -with a small number of users, or comparatively large number of \texttt{maybe} | ||
| 121 | -statements, we can collect data for variations of one \texttt{maybe} statement | ||
| 122 | -at a time while holding the others constant. As an adaptation policy is | ||
| 123 | -designed and deployed for the statement being tested, we begin to vary and | ||
| 124 | -measure the next \texttt{maybe} statement. We | ||
| 125 | -will provide a developer web interface allowing the developer to determine | ||
| 126 | -which \texttt{maybe} statements should be tested at any given time. | 119 | +all possible permutations of \texttt{maybe} alternatives. For apps with a |
| 120 | +small number of users, or comparatively large number of \texttt{maybe} | ||
| 121 | +statements, we can collect data for variations of one \texttt{maybe} | ||
| 122 | +statement while holding the others constant. As an adaptation policy is | ||
| 123 | +designed and deployed for the statement being tested, we begin to vary and | ||
| 124 | +measure the next \texttt{maybe} statement. We will provide a web interface | ||
| 125 | +allowing the developer to determine which \texttt{maybe} statements should be | ||
| 126 | +tested at any given time. | ||
| 127 | 127 | ||
| 128 | Each time a \texttt{maybe} statement is reached or \texttt{maybe} variable is | 128 | Each time a \texttt{maybe} statement is reached or \texttt{maybe} variable is |
| 129 | set, the \texttt{maybe} system records: | 129 | set, the \texttt{maybe} system records: |
introduction.tex
| @@ -100,20 +100,19 @@ them at runtime.} | @@ -100,20 +100,19 @@ them at runtime.} | ||
| 100 | In this paper, we present a novel a language construct for expressing | 100 | In this paper, we present a novel a language construct for expressing |
| 101 | structured uncertainty: the \texttt{maybe} statement. Unlike previous | 101 | structured uncertainty: the \texttt{maybe} statement. Unlike previous |
| 102 | approaches to adaptation that relied on language support, \texttt{maybe} does | 102 | approaches to adaptation that relied on language support, \texttt{maybe} does |
| 103 | -not attempt to encourage the programmer to provide more information about | ||
| 104 | -their app to allow the compiler to improve performance or guarantee | ||
| 105 | -correctness. Rather, \texttt{maybe} allows the programmer to express and | ||
| 106 | -structure uncertainty by providing two or more different | ||
| 107 | -\textit{alternatives} implementing multiple approaches to runtime adaptation, | ||
| 108 | -possibly by making the same energy-performance or energy-accuracy tradeoffs | ||
| 109 | -described previously. Conceptually, \texttt{maybe} extends the process of | ||
| 110 | -compilation and optimization to include post-deployment testing while also | ||
| 111 | -enabling flexible adaptation that may produce per-user, per-device, or | ||
| 112 | -temporally-varying solutions. | 103 | +not encourage programmers to provide more information about their app to |
| 104 | +allow the compiler to improve performance or guarantee correctness. Rather, | ||
| 105 | +\texttt{maybe} allows the programmer to express and structure uncertainty by | ||
| 106 | +providing two or more different \textit{alternatives} implementing multiple | ||
| 107 | +approaches to runtime adaptation, possibly by making the same | ||
| 108 | +energy-performance or energy-accuracy tradeoffs described previously. | ||
| 109 | +Conceptually, \texttt{maybe} extends the process of compilation and | ||
| 110 | +optimization to include post-deployment testing while also enabling flexible | ||
| 111 | +adaptation that may produce per-user, per-device, or time-varying solutions. | ||
| 113 | 112 | ||
| 114 | Figure~\ref{fig-example-maybe} shows how our earlier example can be easily | 113 | Figure~\ref{fig-example-maybe} shows how our earlier example can be easily |
| 115 | -rewritten to use a \texttt{maybe} statement. Unlike the previous example | ||
| 116 | -\texttt{maybe} does not rely on the developer to implement a decision process | 114 | +rewritten using a \texttt{maybe} statement. Unlike the previous example |
| 115 | +\texttt{maybe}, does not rely on the developer to implement a decision process | ||
| 117 | or correctly anticipate the effects of each alternative. Instead, the | 116 | or correctly anticipate the effects of each alternative. Instead, the |
| 118 | \texttt{maybe} system makes runtime choices about which alternative to use by | 117 | \texttt{maybe} system makes runtime choices about which alternative to use by |
| 119 | measuring the tradeoffs produced by each alternative and (in this case) | 118 | measuring the tradeoffs produced by each alternative and (in this case) |
maybe.tex
| @@ -55,7 +55,7 @@ Code flow can also represent uncertainty. Examples include using multiple | @@ -55,7 +55,7 @@ Code flow can also represent uncertainty. Examples include using multiple | ||
| 55 | algorithms to compute the same result or multiple code paths representing | 55 | algorithms to compute the same result or multiple code paths representing |
| 56 | different tradeoffs between performance, energy, and quality. | 56 | different tradeoffs between performance, energy, and quality. |
| 57 | Figure~\ref{fig-example-maybe} shows the \texttt{maybe} statement in its | 57 | Figure~\ref{fig-example-maybe} shows the \texttt{maybe} statement in its |
| 58 | -simplest form controlling execution of multiple code blocks. If multiple | 58 | +simplest form, controlling execution of multiple code blocks. If multiple |
| 59 | alternatives are specified, the system chooses one to execute; if only one | 59 | alternatives are specified, the system chooses one to execute; if only one |
| 60 | alternative is specified, the system chooses whether or not to execute it. | 60 | alternative is specified, the system chooses whether or not to execute it. |
| 61 | Single-alternative \texttt{maybe} statements can encapsulate or reorganize | 61 | Single-alternative \texttt{maybe} statements can encapsulate or reorganize |
| @@ -83,8 +83,8 @@ rewrite-based prototype, described next in Section~\ref{sec-certainty}, we | @@ -83,8 +83,8 @@ rewrite-based prototype, described next in Section~\ref{sec-certainty}, we | ||
| 83 | will revisit the question of nesting in future compiler-driven \texttt{maybe} | 83 | will revisit the question of nesting in future compiler-driven \texttt{maybe} |
| 84 | systems. | 84 | systems. |
| 85 | 85 | ||
| 86 | -As a final remark, note that structured uncertainty is not randomness. | ||
| 87 | -Randomness weights multiple options statically---there is no right or wrong | ||
| 88 | -choice. In contrast, the \texttt{maybe} statement indicates that during any | ||
| 89 | -given execution one alternative may be the right choice---even if the | ||
| 90 | -developer or system cannot yet identify it. | 86 | +\sloppypar{As a final remark, note that structured uncertainty is not |
| 87 | +randomness. Randomness weights multiple options statically---there is no | ||
| 88 | +right or wrong choice. In contrast, the \texttt{maybe} statement indicates | ||
| 89 | +that during any given execution one alternative may be the right | ||
| 90 | +choice---even if the developer or system cannot yet identify it.} |
notes/OK-12242014.pdf
0 โ 100644
No preview for this file type