Systematically Ensuring The Confidence of Real Time Home Automation IoT Systems - Bu, Lei; Xiong, Wen; Liang, Chieh-Jan Mike; Han, Shi; Lin, Shan; Zhang, Dongmei; Li, Xuandong (TCPS (ACM Transactions on Cyber-Physical Systems), 2018)
Recent advances and industry standards in Internet of Things (IoT) have accelerated the real-world adoption of connected devices. To manage this hybrid system of digital real-time devices and analog environments, the industry has pushed several popular home automation IoT (HA-IoT) frameworks, e.g., IFTTT (If-This-Then-That), Apple HomeKit, and Google Brillo. Typically, users author device interactions by specifying the triggering sensor event and the triggered device command. In this seemingly simple software system, two dominant factors govern the system confidence properties with respect to the physical world. First, IoT users are largely non-expert users, who lack the comprehensive consideration regarding potential impact and joint effect with existing rules. Second, while the increasing complexity of IoT devices enables fine-grained control (e.g., heater temperature) on the continuous real time environments, even two simply connected devices can have a huge state space to explore. In fact, bugs that wrongfully control devices and home appliances can have ramifications to system correctness and even user physical safety. It is crucial to help users to make sure the system they created meets their expectation. In this paper, we introduce how techniques from hybrid automata can be practically applied to assist non-expert IoT users in the confidence checking of such hybrid HA-IoT systems. We propose an automated framework for end-to-end programming assistance. We build and check the linear hybrid automata (LHA) model of the system automatically. We also present a quantifier elimination based method to analyze the counterexample found and synthesize the fix suggestions. We implemented a platform, MenShen, based on this framework and proposed techniques. We conducted sets of real HA-IoT case studies with up to 46 devices and 65 rules. Empirical results show that MenShen can find violations and generate rule fix suggestions in only 10 seconds.