Programming the Internet of Uncertain hings

The transformation from desktops and servers to devices and cloud services—the Internet of things (IoT)—is well underway. A key problem facing IoT applications is their increasing reliance on estimated data from diverse sources, such as sensors, machine learning, and human computing. Current programming abstractions treat these estimates as if they were precise, creating buggy applications. Existing approaches to mitigate noise in estimates either add naive ad-hoc filters or construct sophisticated statistical models. They are either too fragile or too complex for ordinary developers to use. IoT developers need abstractions that help them (1) reason about estimates, because they are noisy and inherently inaccurate; (2) trade accuracy for energy efficiency on battery limited devices; and (3) compose data from disparate sources on devices and in the cloud. In prior work, we proposed a new programming abstraction called Uncertain〈T 〉 to help developers reason about noise in estimates. This abstraction embeds statistical reasoning into programming language semantics for commonly used languages, such as C++, C#, and Java, instead of making developers program their own statistics. This paper further improves programmability and accuracy for estimates by (1) providing two program constructs to specify context—application-specific domain knowledge—and showing how improving estimates requires such context; and (2) implementing a runtime which automatically composes context with estimates. A case study shows that developers easily use our constructs to add context and improve application accuracy. This paper motivates the need for programming abstractions for estimates to build correct IoT applications, and shows how they make IoT programming more accessible to a wider class of developers. I. CALL TO ACTION We believe that hardware and software that produce estimates and the systems that consume them are in desperate need of a standard for describing estimates. Put another way, what good is a sensor if a programmer cannot reason about whether their use of that sensor is correct? Consider the IEEE Floating Point standard as an analogy. As computer hardware proliferated in the late 1970s and early 1980s, software that computed and reasoned about floating point values was often incorrect, unreliable, and not portable. Codification of the IEEE Floating Point Standard in 1985 for hardware and software was wildly successful in delivering programmability, reliability, and portability of applications that reasoned and computed with floating point numbers. Computing is at a similar point in its history for uncertain data, and this inflection point is being accelerated by IoT systems. Hardware and software are producing, computing with, and reasoning about estimates without the appropriate specifications of error distributions and programming models. This paper suggests one programming model the industry could standardize on, in which all systems that produce estimates should produce both the estimate and a model of error in that estimate. We believe this standardization will accelerate innovation in IoT and other applications that consume estimates. I