Interface Contracts for TinyOS

TinyOS applications are built with software components that communicate through narrow interfaces. Since components enable finegrained code reuse, this approach has been successful in creating applications that make very efficient use of the limited code and data memory on sensor network nodes. However, the other important benefit of components-rapid application development through black-box reuse-remains largely unrealized because in many cases interfaces have implied usage constraints that can be the source of frustrating program errors. Developers are commonly forced to read the source code for components, partially defeating the purpose of using components in the first place. Our research helps solve these problems by allowing developers to explicitly specify and enforce component interface contracts. Due to the extensive reuse of the most common interfaces, implementing contracts for a small number of frequently reused interfaces permitted us to extensively check a number of applications. We uncovered some subtle and previously unknown bugs in applications that have been in common use for years.

[1]  David E. Culler,et al.  System architecture directions for networked sensors , 2000, SIGP.

[2]  Dawson R. Engler,et al.  EXE: automatically generating inputs of death , 2006, CCS '06.

[3]  Ben L. T itzer Virgil : Objects on the Head of a Pin , 2006 .

[4]  E. Kohler,et al.  Software-Based Memory Protection In Sensor Nodes , 2006 .

[5]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[6]  Thomas A. Henzinger,et al.  Interface Compatibility Checking for Software Modules , 2002, CAV.

[7]  Miklós Maróti,et al.  Software composition and verification for sensor networks , 2005, Sci. Comput. Program..

[8]  Deborah Estrin,et al.  Sympathy for the sensor network debugger , 2005, SenSys '05.

[9]  David E. Culler,et al.  The nesC language: A holistic approach to networked embedded systems , 2003, PLDI.

[10]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[11]  Corina S. Pasareanu,et al.  Assume-guarantee verification of source code with design-level assumptions , 2004, Proceedings. 26th International Conference on Software Engineering.

[12]  John A. Stankovic,et al.  t-kernel: providing reliable OS support to wireless sensor networks , 2006, SenSys '06.

[13]  Jens Palsberg,et al.  Avrora: scalable sensor network simulation with precise timing , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..

[14]  Eric Eide,et al.  Efficient type and memory safety for tiny embedded systems , 2006, PLOS '06.

[15]  John Regehr,et al.  Pluggable abstract domains for analyzing embedded software , 2006, LCTES '06.