Interface contracts for TinyOS

Will Archer, Philip Levis, John Regehr
2007 Proceedings of the 6th international conference on Information processing in sensor networks - IPSN '07  
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
more » ... 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.
doi:10.1145/1236360.1236382 dblp:conf/ipsn/ArcherLR07 fatcat:46lsx7ycmzhl5ntna7poyw62za