Commit 9867b4984c4556369979228c498c848baeedf8c3

Authored by Geoffrey Challen
1 parent 4e09b796

Back to six pages.

.ispell_english
1 1 Android
  2 +API
2 3 APIs
3 4 app
4 5 apps
  6 +codebase
5 7 Endgames
6 8 JSON
  9 +logcat
  10 +Navjack
  11 +Navjack's
7 12 outsourced
  13 +PhoneLab
  14 +PocketParker
8 15 pre
  16 +refactored
9 17 runtime's
10 18 smartphone
  19 +smartphone's
11 20 smartphones
  21 +testbed
  22 +USB
12 23 Wifi
... ...
conclusion.tex
... ... @@ -5,8 +5,7 @@ To conclude, we have described the \texttt{maybe} statement: a new language
5 5 construct allowing developers to express structured uncertainty at
6 6 development time and for that uncertainty to be resolved through later
7 7 testing and adaptation. We are in the process of building a prototype of the
8   -\texttt{maybe} system for Android smartphones and are excited to share
9   -results from our experiences.
  8 +\texttt{maybe} system for Android smartphones.
10 9  
11 10 \section*{Acknowledgments}
12 11  
... ...
discussion.tex
1 1 \section{Discussion}
2 2 \label{sec-discussion}
3 3  
4   -We have yet to determine how well programmers will be able to use the
5   -\texttt{maybe} statement. Structurally \texttt{maybe} statements are similar
6   -to the ubiquitous \texttt{if-else} construct in that at the bottom of the
7   -statement the programmer may not be sure which block was executed. However,
8   -while with \texttt{if-else} blocks it can be determined which block was
9   -executed by examining the branch conditions, \texttt{maybe} statements
10   -require developers to record which alternative was executed if downstream
11   -code depends on the decision. To coordinate the adaptation of multiple code
12   -paths a single \texttt{maybe} variable---such as the policy string in
13   -Figure~\ref{fig-maybeexamples}---can be used to control multiple
14   -\texttt{if-else} statements.
  4 +We have yet to determine how natural programmers will find the \texttt{maybe}
  5 +statement. Encouragingly, \texttt{maybe} statements are similar to the
  6 +ubiquitous \texttt{if-else} statement, and in many cases can be used to
  7 +directly replace \texttt{if-else} statements that attempt runtime adaptation.
  8 +To coordinate the adaptation of multiple code paths a single \texttt{maybe}
  9 +variable---such as the policy string in Figure~\ref{fig-maybeexamples}---can
  10 +be used to control multiple \texttt{if-else} statements.
15 11  
16 12 While \texttt{maybe} is a powerful programming tool, it is important that it
17 13 be used sparingly. If objective dependencies exist between \texttt{maybe}
18 14 statements, the overall configuration space may expand exponentially,
19   -complicating the process of determining the best alternatives described in
20   -Section~\ref{sec-certainty}. (A similar problem exists with nested
21   -\texttt{maybe} statements.) Compile-time analysis may be required to detect
22   -dependencies between \texttt{maybe} statements and ensure that downstream
23   -optimization remains feasible.
  15 +complicating post-deployment adaptation process. Compile-time analysis may be
  16 +required to detect dependencies between \texttt{maybe} statements and
  17 +encourage programmers to limit their use of \texttt{maybe} if to ensure that
  18 +downstream optimization remains feasible.
24 19  
25   -One important place where \texttt{maybe} should not be used is when
26   -adaptation is not app-specific and can be refactored into a library serving
27   -multiple apps. As an example, an app should not use \texttt{maybe} to decide
28   -which network interface to use when attempting to achieve a common objective,
29   -such as maximizing throughput. This choice would be better refactored into a
30   -dedicated library, which might use its own internal \texttt{maybe}
31   -statements. Not only is the resulting codebase smaller, but the total number
32   -of \texttt{maybe} statements that the system has to determine how to handle
33   -is reduced.
  20 +\texttt{maybe} statements should not be used when adaptation is not
  21 +app-specific and can be refactored into a library. As an example, an app
  22 +should not use \texttt{maybe} to decide which network interface to use when
  23 +attempting to achieve a common objective, such as maximizing throughput. This
  24 +choice would be better refactored into a dedicated library, which might use
  25 +its own internal \texttt{maybe} statements. Not only is the resulting
  26 +codebase smaller, but the total number of \texttt{maybe} statements that the
  27 +system has to test is reduced.
34 28  
35 29 However, the \texttt{maybe} statement represents a fundamentally different
36   -approach from previously attempts to enable runtime adaptation that relied on
37   -libraries. As a code organization stategy, the benefits that libraries provide
38   -in terms of reduced duplication and more powerful interfaces are orthogonal and
39   -complementary to the \texttt{maybe} statement. That said, a large amount of
  30 +approach from attempts to enable runtime adaptation that rely on libraries.
  31 +As a code organization strategy, the benefits that libraries provide in terms
  32 +of reduced duplication and more powerful interfaces are orthogonal and
  33 +complementary to the \texttt{maybe} statement. However, a large amount of
40 34 code including adaptation logic remains app specific and cannot be refactored
41 35 into a library.
42 36  
... ...
references.bib
... ... @@ -60,7 +60,7 @@
60 60 Title = {{The Mote is Dead. Long Live the Discarded Smartphone!}},
61 61 Author = {Geoffrey Challen and Scott Haseley and Anudipa Maiti and Anand
62 62 Nandugudi and Guru Prasad and Mukta Puri and Junfei Wang},
63   - Month = {February},
  63 + Month = {Feb.},
64 64 Year = {2014},
65 65 }
66 66  
... ...
related.tex
... ... @@ -4,25 +4,16 @@
4 4 New systems such as EnFrame~\cite{arxiv13-enframe} reflect growing interest
5 5 in managing uncertainty at the language level. EnFrame focuses on enabling
6 6 programming with uncertain data, rather than the runtime adaptation enabled
7   -by the \texttt{maybe} statement. Specifically a variable controlled by a
8   -\texttt{maybe} statement has a single value that is being evaluated at any
9   -given time, while EnFrame allows that same variable to have a distribution of
10   -values reflecting error or other forms of uncertainty about what it's true
11   -value should be.
  7 +by \texttt{maybe}.
12 8  
13   -Aspect oriented programming (AOP)~\cite{aop} was proposed by Kiczales et al.
14   -as a programming paradigm geared toward increasing modularity through the
15   -separation of cross-cutting concerns in software. The programmer can express
16   -cross cutting concerns in stand alone modules, or aspects. Aspects are
  9 +Aspect oriented programming (AOP)~\cite{aop} aims to increase modularity
  10 +through the separation of cross-cutting concerns. The programmer can express
  11 +cross-cutting concerns in stand alone modules, or aspects. Aspects are
17 12 composed of advice, which specifies a computation to be performed as well as
18 13 points in the program at which that computation should be performed.
19   -Abstractly, aspects provide an interesting framework on top of which we could
20   -realize \texttt{maybe} blocks. At runtime, different aspects could be weaved
21   -depending on the framework decisions. Aspects would also allow ``chained''
22   -\texttt{maybe} blocks through the use of multiple join points and point-cuts.
23   -Fundamentally, however, the goals of AOP and the \texttt{maybe} statement
24   -differ, with AOP focusing on modularity and \texttt{maybe} focused on
25   -increasing runtime flexibility in the face of uncertainty.
  14 +Fundamentally, the goals of AOP and the \texttt{maybe} statement differ, with
  15 +AOP focusing on modularity and \texttt{maybe} focused on increasing runtime
  16 +flexibility in the face of uncertainty.
26 17  
27 18 \texttt{maybe} shares similaries with language-based approaches to managing
28 19 energy consumption in wireless sensor networks such as
... ... @@ -33,11 +24,10 @@ which energy states are appropriate as the \texttt{maybe} system would do.
33 24 \texttt{maybe} can also enable adaptation driven by goals other than energy
34 25 management.
35 26  
36   -Enabling more adaptive mobile systems is a challenge with a long history dating
37   -back to work on systems such as Odyssey~\cite{odyssey-sosp97}. However, a
38   -taxonomy of approaches to enabling adaptation on early mobile
39   -systems~\cite{badrinath2000conceptual} reflects the focus of early efforts on
40   -incorporating adaptation into libraries that could be used by multiple apps. As
41   -we have pointed out previously, while adaptation libraries are useful,
42   -\texttt{maybe} statements can make them more powerful by allowing programmers
43   -to express uncertainty.
  27 +Attempts to enable more adaptive mobile systems date back to systems such as
  28 +Odyssey~\cite{odyssey-sosp97}. However, a taxonomy of approaches to enabling
  29 +adaptation on early mobile systems~\cite{badrinath2000conceptual} reflects
  30 +the focus of early efforts on incorporating adaptation into libraries that
  31 +could be used by multiple apps. As we have pointed out previously, while
  32 +adaptation libraries are useful, \texttt{maybe} statements can make them more
  33 +powerful by allowing programmers to express uncertainty.
... ...
usage.tex
... ... @@ -36,7 +36,7 @@ each user enjoys whichever approach is most effective for them.
36 36 \subsection{\texttt{\large PhoneLab} Conductor}
37 37  
38 38 \PhoneLab{} is a large scale smartphone platform testbed at the University at
39   -Buffalo~\cite{phonelab-sensemine13,phonelab-url}. We leverage the Android
  39 +Buffalo~\cite{phonelab-sensemine13}. We leverage the Android
40 40 \texttt{logcat} subsystem as a data collection mechanism---experiment apps
41 41 write their data into a system-wide log buffer and we collect and upload this
42 42 data on their behalf.
... ... @@ -58,7 +58,7 @@ allows us to control aspects of program behavior such as the amount of
58 58 storage space we use on each device for logs, how often we check for updates,
59 59 and how to decide whether to upload data. Several of these features have
60 60 proven essential after deployment---for example, when an upload policy that
61   -worked previously abruptly stopped working on a newer Androiod version.
  61 +worked previously abruptly stopped working on a newer Android version.
62 62 Development of this app would have been considerably easier using
63 63 \texttt{maybe}, which could automate the process of pushing policies to
64 64 clients in an energy-efficient way, and enable per-user goal-driven
... ... @@ -68,9 +68,9 @@ adaptation.
68 68 \subsection{Navjack Sensing Platform}
69 69  
70 70 The Navjack project is exploring hijacking in-car navigation devices built
71   -from repurposed smartphones~\cite{sustain-hotmobile14} and deployed in
  71 +from recycled smartphones~\cite{sustain-hotmobile14} and deployed in
72 72 personal vehicles to enable city-scale sensing. Volunteers install a device
73   -that acts as a dedicated navigational aid and car performance monitor but
  73 +that acts as a dedicated navigation aid and car performance monitor but
74 74 also continuously collects sensor data, utilizing the car's battery for
75 75 power, the car's driver for maintenance, and inexpensive machine-to-machine
76 76 (M2M) data plans for telemetry.
... ... @@ -91,38 +91,3 @@ space that can potentially get quite large, and so it may provide a good
91 91 chance to evaluate both our ability to perform pre-deployment simulations to
92 92 reduce the state space and the success of post-deployment clustering
93 93 techniques to identify salient user differences.
94   -
95   -\subsection{Android Platform Services}
96   -
97   -Earlier, we noted that that app developers should not use \texttt{maybe} to
98   -make decisions that are best left to libraries and platform services. However,
99   -those same
100   -libraries and platform services can themselves use \texttt{maybe} to enable
101   -post-deployment testing and adaptation. We are particularly interested in how
102   -\texttt{maybe} can be used within the Android platform itself wherever
103   -structured uncertainty must be expressed.
104   -
105   -One use case is determining whether to use Wifi or cellular network. While this is
106   -a hot topic in current mobile systems research~\cite{shen2008cost}, the approaches
107   -that are currently being tested may struggle to adapt to many of the
108   -variable that the \texttt{maybe} system incorporates and arrive at an
109   -effective per-user approach. A similar example is optimizing the state of
110   -GPS. With three modes already present---``High accuracy'', ``Battery saving'', and
111   -``Device only'', the choice may need to be adapted both to app usage and more
112   -user- or device-specific factors. \texttt{maybe} allows post-deployment
113   -testing of a variety of different approaches to make this runtime decision.
114   -
115   -\begin{comment}
116   -
117   -Stretching this idea further, what if the developer didn't have to think
118   -about cache or object availability? The language itself could determine which
119   -block to run based on the semantics of the \texttt{maybe} case definition.
120   -For instance, in the \texttt{android.emoji.EmojiFactory} class, there is a
121   -method to get an eomji via its Unicode PUA (Private Use Area). To do this,
122   -the emoji is either grabbed from a platform-level cache or is created then
123   -written to the cache then returned. With \texttt{maybe}, the developer could
124   -have two blocks one for the cache being empty for the PUA and one where an
125   -object exists. Now, the developer doesn't need to think about the
126   -possibilities of cache-state, but instead can move on to other functionality.
127   -
128   -\end{comment}
... ...