skip to main content
research-article

Modeling and Analysis of TinyOS Sensor Node Firmware: A CSP Approach

Published:01 January 2013Publication History
Skip Abstract Section

Abstract

Wireless sensor networks are an increasingly popular application area for embedded systems. Individual sensor nodes within a network are typically resource-constrained, event-driven, and require a high degree of concurrency. This combination of requirements motivated the development of the widely used TinyOS sensor node operating system. The TinyOS concurrency model is a lightweight nonpreemptive system designed to suit the needs of typical sensor network applications. Although the TinyOS concurrency model is easier to reason about than preemptive threads, it can still give rise to undesirable behavior due to unexpected interleavings of related tasks, or unanticipated preemption by interrupt handlers. To aid TinyOS developers in understanding the behavior of their programs we have developed a technique for using the process algebra Communicating Sequential Processes (CSP) to model the interactions between TinyOS components, and between an application and the TinyOS scheduling and preemption mechanisms. Analysis of the resulting models can help TinyOS developers to discover and diagnose concurrency-related errors in their designs that might otherwise go undetected until after the application has been widely deployed. Such analysis is particularly valuable for the TinyOS components that are used as building blocks for a large number of other applications, since a subtle or sporadic error in a widely deployed building block component could be extremely costly to repair.

References

  1. Archer, W., Levis, P., and Regehr, J. 2007. Interface contracts for TinyOS. In Proceedings of the 6th International Conference on Information Processing in Sensor Networks (IPSN’07). ACM, 158--165. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Bucur, D. and Kwiatkowska, M. 2009. Towards software verification for TinyOS applications. In Proceedings of the Workshop on Formal Approaches to Ubiquitous Systems (FAUSt’09).Google ScholarGoogle Scholar
  3. Clarke, E. M. and Wing, J. M. 1996. Formal methods: State of the art and future directions. ACM Comput. Surv. 28, 4, 626--643. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Culler, D. E. 2006. TinyOS: Operating system design for wireless sensor networks. Sensors 23, 5.Google ScholarGoogle Scholar
  5. Gardiner, P. et al. 2005. Failures-Divergences Refinement: FDR2 User Manual. Formal Systems (Europe) Ltd.Google ScholarGoogle Scholar
  6. Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., and Culler, D. 2003. The nesC language: A holistic approach to networked embedded systems. ACM SIGPLAN Not. 38, 5, 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Gay, D., Levis, P., Culler, D., and Brewer, E. 2005. nesC 1.2 language reference manual. http://nescc.cvs.sourceforge.net/viewvc/*checkout*/nescc/nesc/doc/ref.pdf?revision=1.18.Google ScholarGoogle Scholar
  8. Kleine, M. and Helke, S. 2009. Low-level code verification based on CSP models. In Proceedings of the Brazilian Symposium on Formal Methods (SBMF’09). Springer, 266--281. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Kothari, N., Millstein, T., and Govindan, R. 2008. Deriving state machines from TinyOS programs using symbolic execution. In Proceedings of the 7th International Conference on Information Processing in Sensor Networks (IPSN’08). IEEE Computer Society, 271--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Levis, P. 2006. TinyOS programming. http://csl.stanford.edu/ pal/pubs/tinyos-programming.pdf.Google ScholarGoogle Scholar
  11. Levis, P. 2007. TinyOS 2.x boot sequence. TinyOS Extension Proposal TEP-107, TinyOS Core Working Group.Google ScholarGoogle Scholar
  12. Levis, P., Lee, N., Welsh, M., and Culler, D. 2003. TOSSIM: Accurate and scalable simulation of entire TinyOS applications. In Proceedings of the 1st International Conference on Embedded Networked Sensor Systems (SenSys’03). ACM, 126--137. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Levis, P., Madden, N., et al. 2005. TinyOS: An operating system for sensor networks. In Ambient Intelligence, W. Weber, J. Rabaey, and E. Aarts, Eds. Springer, 115--148.Google ScholarGoogle Scholar
  14. McInnes, A. I. 2009. Using CSP to model and analyze TinyOS applications. In Proceedings of the 16th Annual IEEE International Conference and Workshop on the Engineering of Computer Based Systems (ECBS’09). IEEE Computer Society, 79--88. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Rosa, N. S. and Cunha, P. R. F. 2007. Using LOTOS for formalising wireless sensor network applications. Sensors 7, 8, 1447--1461.Google ScholarGoogle ScholarCross RefCross Ref
  16. Roscoe, A. W. 1998. The Theory and Practice of Concurrency. Prentice Hall, Englewood Cliffs, NJ. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Sharp, C. 2008. AlarmToTimerC.nc. TinyOS 2.x Source. http://code.google.com/p/tinyos-main/source/browse/trunk/tos/lib/timer/AlarmToTimerC.nc?r=5108.Google ScholarGoogle Scholar
  18. Völgyesi, P., Maróti, M., Dóra, S., Osses, E., and Lédeczi, Á. 2005. Software composition and verification for sensor networks. Sci. Comput. Prog. 56, 1--2, 191--210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Woehrle, M., Plessl, C., Beutel, J., and Thiele, L. 2007.Increasing the reliability of wireless sensor networks with a distributed testing framework. In Proceedings of the 4th Workshop on Embedded Networked Sensors (EmNets’07). ACM, 93--97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Xie, F., Yang, G., and Song, X. 2006. Compositional reasoning for hardware/software co-verification. In Proceedings of the 4th International Symposium on Automated Technology for Verification and Analysis. Springer, 154--169. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Modeling and Analysis of TinyOS Sensor Node Firmware: A CSP Approach

                Recommendations

                Reviews

                S. Ramesh

                This paper, as the name suggests, formalizes certain elements of TinyOS, an operating system that has become popular in the domain of sensor networks. The well-known formalism of communicating sequential processes (CSP) is used for modeling TinyOS, as there is a good match between the elements of CSP and TinyOS, such as concurrency and event-driven computation. The formalization involves translating programs written in nesC, the application language used in TinyOS, into CSP. This translation captures the interactions between multiple TinyOS applications. Besides this, CSP models of the scheduling, preemption, and priority mechanisms of TinyOS are also developed. The formalization is illustrated with a simple example of a TinyOS application. The motivation for the work is that a formal model of an application can be subjected to rigorous analysis, which can reveal subtle concurrency-related errors that are common in such applications. This well-written paper is easy to read and understand. That being said, I would have liked more illustrations and examples from real applications that bring out the need for formalization. The paper would be useful to beginners who are interested in formalizing concurrent systems, and for application developers wanting a better understanding of the TinyOS model. Online Computing Reviews Service

                Access critical reviews of Computing literature here

                Become a reviewer for Computing Reviews.

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in

                Full Access

                • Published in

                  cover image ACM Transactions on Embedded Computing Systems
                  ACM Transactions on Embedded Computing Systems  Volume 12, Issue 1
                  Special Issue on Modeling and Verification of Discrete Event Systems
                  January 2013
                  350 pages
                  ISSN:1539-9087
                  EISSN:1558-3465
                  DOI:10.1145/2406336
                  Issue’s Table of Contents

                  Copyright © 2013 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 1 January 2013
                  • Accepted: 1 June 2011
                  • Received: 1 March 2010
                  Published in tecs Volume 12, Issue 1

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article
                  • Research
                  • Refereed
                • Article Metrics

                  • Downloads (Last 12 months)3
                  • Downloads (Last 6 weeks)1

                  Other Metrics

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader