Programming and Debugging Cyber-Physical Systems

Over the past ten years, we have created an evolving series of tools for programming, debugging, testing, and analyzing Cyber-physical Systems (CPSs) to make software both easier to create and more reliable. Early work on TinyOS, Hood, Semantic Streams, and Marionette explored different styles of prorgamming, from node-level code to network-level code. These system also tested how well the domain matches with imperative, declarative, and logical programming. In 2007, ideas from all of these programming techniques culminated into a system called MacroLab, which is a vector-based programming language modeled after Matlab that allows scientists to write a single program for an entire CPS. It automatically decomposes the program into node-local actions for each device, and the decomposition is optimized based on network topology, energy availability, or changing data patterns. The goal of MacroLab is to convert a CPS into a single programmable substrate, instead of a collection of individually programmed nodes. This approach enables a holistic analysis of the system.

In parallel to designing new programming abstractions, we produced an array of new debugging, testing, and analysis tools for CPSs. We built three debugging tools. Marionette provided rudimentary debugging through RPC, and Clairvoyant provided the first comprehensive GDB-like debugging interface for CPSs. These systems proved that severe limitations on energy, memory, and bandwidth do not preclude run-time visibility into software execution. Declarative Tracepoints generalized this functionality and improved efficiency. We then built three testing tools. The first was an automated unit testing system for TinyOS, designed to facilitate simultaneously development on tightly coupled software modules by a large numbers of programmers. We then developed a system for Run-Time Assurance and the SMART failure assessment system that use high-level application semantics to define and score automated testing techniques with few false positives and negatives than application-agnostic reliability testing. Finally, we have laid the groundwork for a tool that can perform path-based analysis on interrupt-driven code that avoids the state explosion problem by restricting the entry points of interrupt handlers at run time.

As a direction of future work, we have begun to help bridge the gap between wireless embedded devices and the Web, in what is often called the Internet of Things. We created a tool to automatically export TinyOS modules as Web services and produced the Stream Feeds abstraction for querying streams of data over HTTP. More details about these systems can be found in the publications below.

Sub-projects
MacroLab allows a user to write a single macroprogram for an entire Cyber-Physical System. It is the first system that can perform automatic, topology-specific decomposition of programs describing parallel operations on parallel data structures. More...

Clairvoyant is the first comprehensive source-level debugger for WSNs. It provides standard debugging commands, including break, step, watch, and backtrace as well as new, special-purpose commands that deal with interrupts, conditional breakpoints, and new global commands such as gstop and gcontinue. More...

Marionette is a development tool for wireless embedded networks. It provides a tight coupling between the program running on the wireless nodes and a python user environment, so that the programmer can call functions and read/write variables on the nodes from within a python shell or script. This provides unprecedented run-time visibility and control for wireless embedded devices, and can be used to rapid application prototyping and/or debugging. More...


Hood is the first neighborhood-based programming abstraction for sensor networks. It performs neighbor discovery, neighbor list management, and data sharing automatically, allowing the programmer to access the data values of neighboring nodes through a Get/Set interface, instead of through messaging protocols. More...


Semantic Streams is a system that allows people to pose semantic queries over sensor data. It produces logical interpretations of data, in contrast to most query systems which produce the data itself or mathematical aggregations of the data, e.g. the user queries for the number of cars or trucks that pass through an intersection instead of raw magnetometer values. More...

Publications

Wei Le, Jing Yang, Mary Lou Soffa and Kamin Whitehouse. Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code. The 2nd Workshop on Software Engineering for Sensor Network Applications (SESENA), in conjunction with ACM/IEEE Intl. Conference on Software Engineering (ICSE). May 22, 2011, Honolulu, Hawaii.

Krasimira Kapitanova, Enamul Hoque, Jingyuan Li, Daniele Alessandrelli, John Stankovic, Sang H Son, and Kamin Whitehouse. Repair Assessment of Sensor Node Failures for Activity Detection. The Second International Workshop on Networks of Cooperating Objects (CONET 2011). April 11, Chicago, IL.

Timothy Hnat and Kamin Whitehouse. A Relaxed Synchronization Primitive for Macroprogramming Systems. The Seventh International Conference on Networked Sensing Systems. June 15 - 18, 2010, Kassel, Germany.
(23% acceptance rate)

Timothy Hnat, Tamim Sookoor, Pieter Hooimeijer, Westley Weimer, and Kamin Whitehouse A Modular and Extensible Macroprogramming Compiler. Workshop on Software Engineering for Sensor Network Applications (SESENA), in conjunction with ACM/IEEE Intl. Conference on Software Engineering (ICSE). May 2-8, 2010, Cape Town, South Africa.

Michael Okola and Kamin Whitehouse Unit Testing for Wireless Sensor Networks. Workshop on Software Engineering for Sensor Network Applications (SESENA), in conjunction with ACM/IEEE Intl. Conference on Software Engineering (ICSE). May 2-8, 2010, Cape Town, South Africa.

Yafeng Wu, Krasimira Kapitanova, Jingyuan Li, John A. Stankovic, Sang H. Son, and Kamin Whitehouse. Run Time Assurance of Application-level Requirements in Wireless Sensor Networks. The 9th ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN '10).  Stockholm, Sweden, April 12-16, 2010.
(18% acceptance rate)

Michael Okola and Kamin Whitehouse. Automatically Exporting TinyOS Modules as Web Services. The First International Workshop on Networks of Cooperating Objects (CONET). April 12th, 2010, Stockholm, Sweden.

Tamim Sookoor, Timothy Hnat, Pieter Hooimeijer, Westley Weimer, and Kamin Whitehouse. Macrodebugging: Global Views of Distributed Program Execution. The 7th ACM Conference on Embedded Networked Sensor Systems (SenSys 2009).  Berkeley, CA, Nov. 2009.
(17.6% acceptance rate)

Timothy Hnat, Tamim Sookoor, Pieter Hooimeijer, Westley Weimer, and Kamin Whitehouse "MacroLab: A Vector-based Macroprogramming Framework for Cyber-Physical Systems". . The 6th ACM Conference on Embedded Networked Sensor Systems (SenSys 2008).  Raleigh, NC, Nov. 2008.
(16% acceptance rate) (ppt)

Qing Cao, Tarek Abdelzaher, John Stankovic, Kamin Whitehouse, and Liqian Luo. Declarative Tracepoints: A Programmable and Application Independent Debugging System for Wireless Sensor Networks. The 6th ACM Conference on Embedded Networked Sensor Systems (SenSys 2008).  Raleigh, NC, Nov. 2008.
(16% acceptance rate)

Robert Dickerson, Jiakang Lu, Jian Lu, and Kamin Whitehouse. Stream Feeds - An Abstraction for the World Wide Sensor Web. Conference on the Internet of Things (IOT). Zurich, Switzerland, March 2008.
(25% acceptance rate)

Jing Yang, M.L. Soffa, L. Selavo, and K. Whitehouse. Clairvoyant: A Comprehensive Source-Level Debugger for Wireless Sensor Networks. The 5th ACM Conference on Embedded Networked Sensor Systems (Sensys). Sydney, Australia, November 2007.
(17% acceptance rate) (PPT)

Kamin Whitehouse, Gilman Tolle, Jay Taneja, Cory Sharp, Sukun Kim, Jaein Jeong, Jonathan Hui, Prabal Dutta, and David Culler. "Marionette: Using RPC for Interactive Development and Debugging of Wireless Embedded Networks".  The Fifth International Conference on Information Processing in Sensor Networks (IPSN '06).  Nashville, TN, April 21, 2006.
(25% acceptance rate) (ppt)

Kamin Whitehouse, Jie Liu, Feng Zhao."Semantic Streams: a Framework for Composable Inference over Sensor Data". The Third European Workshop on Wireless Sensor Networks (EWSN), Springer-Verlag Lecture Notes in Computer Science. Zurich, Switzerland. February 13-15, 2006.
(16% acceptance rate) (ppt)

Kamin Whitehouse, Cory Sharp, Eric Brewer, David Culler.  "Hood: a Neighborhood Abstraction for Sensor Networks."  In Proceedings of ACM International Conference on Mobile Systems, Applications, and Services (MobiSys '04).  Boston, MA, June, 2004.  ACM Press.
(14% acceptance rate) (ppt)

"TinyOS: An Operating System for Wireless Sensor Networks" , Philip Levis, Sam Madden, Joseph Polastre, Robert Szewczyk, Kamin Whitehouse, Alec Woo, David Gay, Jason Hill, Matt Welsh, Eric Brewer, and David Culler. Ambient Intelligence. W. Weber, J. Rabaey, and E. Aarts (Eds.), Springer-Verlag, 2004.

Funding

We gratefully acknowledge that this project is currently funded by: