Supporting the Specification and Runtime Validation of Asynchronous Calling Patterns in Reactive Systems

  • Jiannan Zhai
  • Nigamanth Sridhar
  • Jason O. Hallstrom
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8734)


Wireless sensor networks (“sensornets”) are highly distributed and concurrent, with program actions bound to external stimuli. They exemplify a system class known as reactive systems, which comprise execution units that have “hidden” layers of control flow. A key obstacle in enabling reactive system developers to rigorously validate their implementations has been the absence of precise software component specifications and tools to assist in leveraging those specifications at runtime. We address this obstacle in three ways: (i) We describe a specification approach tailored for reactive environments and demonstrate its application in the context of sensornets. (ii) We describe the design and implementation of extensions to the popular nesC tool-chain that enable the expression of these specifications and automate the generation of runtime monitors that signal violations, if any. (iii) Finally, we apply the specification approach to a significant collection of the most commonly used software components in the TinyOS distribution and analyze the overhead involved in monitoring their correctness.


Sensor Network Wireless Sensor Network Monitor Generation Symbolic Execution Concurrent Behavior 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abadi, M., Lamport, L.: Composing specifications. TOPLAS 15(1), 73–132 (1993)CrossRefGoogle Scholar
  2. 2.
    Adya, A., et al.: Cooperative task management without manual stack management. In: USENIX 2002, pp. 289–302 (2002)Google Scholar
  3. 3.
    Archer, W., et al.: Interface contracts for tinyos. In: IPSN 2007, pp. 158–165. ACM Press, New York (2007)Google Scholar
  4. 4.
    Bucur, D., Kwiatkowska, M.: On software verification for sensor nodes. J. Syst. Softw. 84, 1693–1707 (2011)CrossRefGoogle Scholar
  5. 5.
    Cao, Q., et al.: The liteos operating system: Towards unix-like abstractions for wireless sensor networks. In: IPSN 2008, Washington, DC, USA, pp. 233–244 (2008)Google Scholar
  6. 6.
    Chandy, K.M., Misra, J.: Parallel Program Design: A Foundation. Addison-Wesley, Reading (1988)zbMATHGoogle Scholar
  7. 7.
    Clarke, E., Kroning, D., Lerda, F.: A tool for checking ansi-c programs. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 168–176. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  8. 8.
    Collette, P.: Composition of assumption-commitment specifications in a UNITY style. SCP 23, 107–125 (1994)MathSciNetzbMATHGoogle Scholar
  9. 9.
    Cooprider, N., et al.: Efficient memory safety for tinyos. In: SenSys 2007, pp. 205–218. ACM, New York (2007)Google Scholar
  10. 10.
    Dalton, A.R., Hallstrom, J.O.: nait: A source analysis and instrumentation framework for nesc. J. Syst. Softw. 82, 1057–1072 (2009)CrossRefGoogle Scholar
  11. 11.
    Dunkels, A., et al.: Contiki - a lightweight and flexible operating system for tiny networked sensors. In: LCN 2004, Washington, DC, USA, pp. 455–462 (2004)Google Scholar
  12. 12.
    Gay, D., et al.: The nesC language: A holistic approach to networked embedded systems. In: PLDI 2003, pp. 1–11. ACM Press (June 2003)Google Scholar
  13. 13.
    Hammad, M., Cook, J.: Lightweight monitoring of sensor software. In: SAC 2009, pp. 2180–2185. ACM, New York (2009)Google Scholar
  14. 14.
    Hill, J., et al.: System architecture directions for networked sensors. In: ASPLOS, pp. 93–104. ACM Press (November 2000)Google Scholar
  15. 15.
    Jones, C.B.: Tentative steps toward a development method for interfering programs. TOPLAS 5(4), 596–619 (1983)CrossRefzbMATHGoogle Scholar
  16. 16.
    Khan, M.M.H., et al.: Dustminer: troubleshooting interactive complexity bugs in sensor networks. In: SenSys 2008, pp. 99–112. ACM, New York (2008)Google Scholar
  17. 17.
    Kothari, N., et al.: Deriving state machines from tinyos programs using symbolic execution. In: IPSN 2008, pp. 271–282. IEEE, Washington, DC (2008)Google Scholar
  18. 18.
    Kumar, S., et al.: Encapsulating concurrency as an approach to unification. In: SAVCBS 2004, Newport Beach, CA (October 2004)Google Scholar
  19. 19.
    Lamport, L.: The temporal logic of actions. TOPLAS 16(3), 872–923 (1994)CrossRefGoogle Scholar
  20. 20.
    Lee, I., et al.: A monitoring and checking framework for run-time correctness assurance. In: Proc. Korea-U.S. Tech Conf. Strat. Tech., Vienna, VA (October 1998)Google Scholar
  21. 21.
    Lewis, C., Whitehead, J.: Runtime repair of software faults using event-driven monitoring. In: ICSE 2010, pp. 275–280. ACM, New York (2010)Google Scholar
  22. 22.
    Li, P., Regehr, J.: T-check: bug finding for sensor networks. In: IPSN 2010, pp. 174–185. ACM Press, New York (2010)Google Scholar
  23. 23.
    Meyer, B.: Applying “design by contract”. Computer 25(10), 40–51 (1992)CrossRefGoogle Scholar
  24. 24.
    Peters, D.K., Parnas, D.L.: Requirements-based monitors for real-time systems. SIGSOFT Softw. Eng. Notes 25, 77–85 (2000)CrossRefGoogle Scholar
  25. 25.
    Pike, L., Goodloe, A., Morisset, R., Niller, S.: Copilot: a hard real-time runtime monitor. In: Barringer, H., et al. (eds.) RV 2010. LNCS, vol. 6418, pp. 345–359. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  26. 26.
    Sasnauskas, R., et al.: Kleenet: discovering insidious interaction bugs in wireless sensor networks before deployment. In: IPSN, New York, NY, pp. 186–196 (2010)Google Scholar
  27. 27.
    Seshia, S.A.: Autonomic reactive systems via online learning. In: Proc. IEEE ICAC. IEEE Press (June 2007)Google Scholar
  28. 28.
    Sokolsky, O., et al.: Steering of real-time systems based on monitoring and checking. In: WORDS 1999, p. 11. IEEE Computer Society, Washington, DC (1999)Google Scholar
  29. 29.
    Stark, E.W.: A proof technique for rely guarantee properties. In: Maheshwari, S.N. (ed.) FSTTCS 1985. LNCS, vol. 206, pp. 369–391. Springer, Heidelberg (1985)CrossRefGoogle Scholar
  30. 30.
    Sundaram, V., et al.: Efficient diagnostic tracing for wireless sensor networks. In: SenSys 2010, pp. 169–182. ACM, New York (2010)Google Scholar
  31. 31.
    Yang, J.: Clairvoyant: a comprehensive source-level debugger for wireless sensor networks. In: SenSys 2007, pp. 189–203. ACM, New York (2007)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Jiannan Zhai
    • 1
  • Nigamanth Sridhar
    • 2
  • Jason O. Hallstrom
    • 1
  1. 1.School of ComputingClemson UniversityClemsonUSA
  2. 2.Electrical and Computer EngineeringCleveland State UniversityClevelandUSA

Personalised recommendations