From e58abf6de466a86fd6f7c0d5331f065247b9046f Mon Sep 17 00:00:00 2001 From: Geoffrey Challen Date: Wed, 24 Dec 2014 14:37:09 -0500 Subject: [PATCH] OK notes. --- certainty.tex | 30 +++++++++++++++--------------- introduction.tex | 23 +++++++++++------------ maybe.tex | 12 ++++++------ notes/OK-12242014.pdf | Bin 0 -> 391111 bytes 4 files changed, 32 insertions(+), 33 deletions(-) create mode 100644 notes/OK-12242014.pdf diff --git a/certainty.tex b/certainty.tex index ee77fed..5dc553d 100644 --- a/certainty.tex +++ b/certainty.tex @@ -84,13 +84,13 @@ service tracks when alternative decisions change, runs \texttt{evaluate} evaluation logic when appropriate, and returns testing results to the \texttt{maybe} server. -Because unpredictable runtime variable changes could cause crashes or -incorrect behavior, our prototype currently only changes variable values when -they are set using a \texttt{maybe} statement. If the app wants to enable -periodic readaptation of certain global variables, such as the interval -controlling a timer, it can do so by periodically resetting the value using -another \texttt{maybe} statement. This ensures that \texttt{maybe} variables -only change when the developer expects them to. +\sloppypar{Because unpredictable runtime variable changes could cause crashes +or incorrect behavior, our prototype currently only changes variable values +when they are set using a \texttt{maybe} statement. If the app wants to +enable periodic readaptation of certain global variables, such as the +interval controlling a timer, it can do so by periodically resetting the +value using another \texttt{maybe} statement. This ensures that +\texttt{maybe} variables only change when the developer expects them to.} \subsubsection{Simulation or emulation} @@ -116,14 +116,14 @@ Eventually code containing a number of \texttt{maybe} statements will be deployed on thousands or millions of devices. At this point, large-scale split testing and learning can begin. If the user community is large enough, then it may be possible to collect statistically-significant results even for -all possible permutations of \texttt{maybe} alternatives. For apps -with a small number of users, or comparatively large number of \texttt{maybe} -statements, we can collect data for variations of one \texttt{maybe} statement -at a time while holding the others constant. As an adaptation policy is -designed and deployed for the statement being tested, we begin to vary and -measure the next \texttt{maybe} statement. We -will provide a developer web interface allowing the developer to determine -which \texttt{maybe} statements should be tested at any given time. +all possible permutations of \texttt{maybe} alternatives. For apps with a +small number of users, or comparatively large number of \texttt{maybe} +statements, we can collect data for variations of one \texttt{maybe} +statement while holding the others constant. As an adaptation policy is +designed and deployed for the statement being tested, we begin to vary and +measure the next \texttt{maybe} statement. We will provide a web interface +allowing the developer to determine which \texttt{maybe} statements should be +tested at any given time. Each time a \texttt{maybe} statement is reached or \texttt{maybe} variable is set, the \texttt{maybe} system records: diff --git a/introduction.tex b/introduction.tex index d4e1156..2ecdf5b 100644 --- a/introduction.tex +++ b/introduction.tex @@ -100,20 +100,19 @@ them at runtime.} In this paper, we present a novel a language construct for expressing structured uncertainty: the \texttt{maybe} statement. Unlike previous approaches to adaptation that relied on language support, \texttt{maybe} does -not attempt to encourage the programmer to provide more information about -their app to allow the compiler to improve performance or guarantee -correctness. Rather, \texttt{maybe} allows the programmer to express and -structure uncertainty by providing two or more different -\textit{alternatives} implementing multiple approaches to runtime adaptation, -possibly by making the same energy-performance or energy-accuracy tradeoffs -described previously. Conceptually, \texttt{maybe} extends the process of -compilation and optimization to include post-deployment testing while also -enabling flexible adaptation that may produce per-user, per-device, or -temporally-varying solutions. +not encourage programmers to provide more information about their app to +allow the compiler to improve performance or guarantee correctness. Rather, +\texttt{maybe} allows the programmer to express and structure uncertainty by +providing two or more different \textit{alternatives} implementing multiple +approaches to runtime adaptation, possibly by making the same +energy-performance or energy-accuracy tradeoffs described previously. +Conceptually, \texttt{maybe} extends the process of compilation and +optimization to include post-deployment testing while also enabling flexible +adaptation that may produce per-user, per-device, or time-varying solutions. Figure~\ref{fig-example-maybe} shows how our earlier example can be easily -rewritten to use a \texttt{maybe} statement. Unlike the previous example -\texttt{maybe} does not rely on the developer to implement a decision process +rewritten using a \texttt{maybe} statement. Unlike the previous example +\texttt{maybe}, does not rely on the developer to implement a decision process or correctly anticipate the effects of each alternative. Instead, the \texttt{maybe} system makes runtime choices about which alternative to use by measuring the tradeoffs produced by each alternative and (in this case) diff --git a/maybe.tex b/maybe.tex index 98aadc1..896d485 100644 --- a/maybe.tex +++ b/maybe.tex @@ -55,7 +55,7 @@ Code flow can also represent uncertainty. Examples include using multiple algorithms to compute the same result or multiple code paths representing different tradeoffs between performance, energy, and quality. Figure~\ref{fig-example-maybe} shows the \texttt{maybe} statement in its -simplest form controlling execution of multiple code blocks. If multiple +simplest form, controlling execution of multiple code blocks. If multiple alternatives are specified, the system chooses one to execute; if only one alternative is specified, the system chooses whether or not to execute it. Single-alternative \texttt{maybe} statements can encapsulate or reorganize @@ -83,8 +83,8 @@ rewrite-based prototype, described next in Section~\ref{sec-certainty}, we will revisit the question of nesting in future compiler-driven \texttt{maybe} systems. -As a final remark, note that structured uncertainty is not randomness. -Randomness weights multiple options statically---there is no right or wrong -choice. In contrast, the \texttt{maybe} statement indicates that during any -given execution one alternative may be the right choice---even if the -developer or system cannot yet identify it. +\sloppypar{As a final remark, note that structured uncertainty is not +randomness. Randomness weights multiple options statically---there is no +right or wrong choice. In contrast, the \texttt{maybe} statement indicates +that during any given execution one alternative may be the right +choice---even if the developer or system cannot yet identify it.} diff --git a/notes/OK-12242014.pdf b/notes/OK-12242014.pdf new file mode 100644 index 0000000..5432862 Binary files /dev/null and b/notes/OK-12242014.pdf differ -- libgit2 0.22.2