skip to main content
research-article

Scalaness/nesT: type specialized staged programming for sensor networks

Published:27 October 2013Publication History
Skip Abstract Section

Abstract

Programming wireless embedded networks is challenging due to severe limitations on processing speed, memory, and bandwidth. Staged programming can help bridge the gap between high level code refinement techniques and efficient device level programs by allowing a first stage program to specialize device level code. Here we introduce a two stage programming system for wireless sensor networks. The first stage program is written in our extended dialect of Scala, called Scalaness, where components written in our type safe dialect of nesC, called nesT, are composed and specialized. Scalaness programs can dynamically construct TinyOS-compliant nesT device images that can be deployed to motes. A key result, called cross-stage type safety, shows that successful static type checking of a Scalaness program means no type errors will arise either during programmatic composition and specialization of WSN code, or later on the WSN itself. Scalaness has been implemented through direct modification of the Scala compiler. Implementation of a staged public-key cryptography calculation shows the sensor memory footprint can be significantly reduced by staging.

References

  1. D. Ancona and E. Zucca. A calculus of module systems. Journal of functional programming, 11:91--132, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. Cardelli. Program fragments, linking, and modularization. In POPL, pages 266--277, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv., 17(4):471--523, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Chapin and C. Skalka. SpartanRPC: Secure WSN middleware for cooperating domains. In MASS, November 2010.Google ScholarGoogle ScholarCross RefCross Ref
  5. P. Chapin and C. Skalka. Spartan RPC. Technical report, University of Vermont, 2013. Submitted. http://www.cs.uvm.edu/~skalka/skalka-pubs/ chapin-skalka-spartanrpctr.pdf.Google ScholarGoogle Scholar
  6. E. Cheong. Actor-Oriented Programming for Wireless Sensor Networks. PhD thesis, University of California, Berkeley, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Chlipala. Ur: Statically-typed metaprogramming with type-level record computation. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Consel, L. Hornof, R. Marlet, G. Muller, S. Thibault, E.-N. Volanschi, J. Lawall, and J. Noyé. Tempo: specializing systems applications and beyond. ACM Comput. Surv., 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. K. Dutta, J. W. Hui, D. C. Chu, and D. E. Culler. Securing the deluge network programming system. In IPSN, pages 326--333, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Flatt and M. Felleisen. Units: Cool modules for HOT languages. In PLDI, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Frolik and C. Skalka. Snowcloud: A complete system for snow hydrology research. In RealWSN, 2013.Google ScholarGoogle Scholar
  12. D. Gay, P. Levis, R. von Behren, M. Welsh, E. Brewer, and D. Culler. The nesC language: A holistic approach to networked embedded systems. In PLDI, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. Ghelli and B. Pierce. Bounded existentials and minimal typing. Theoretical Computer Science, 193(1-2):75--96, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Gregor, J. Järvi, J. G. Siek, G. D. Reis, B. Stroustrup, and A. Lumsdaine. Concepts: Linguistic support for generic programming in C++. In OOPSLA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Hammond and G. Michaelson. Hume: A domain-specific language for real-time embedded systems. In GPCE, pages 37--56. Springer- Verlag, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. E. Culler, and K. S. J. Pister. System architecture directions for networked sensors. In ASPLAS, pages 93--104, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Igarashi, B. C. Pierce, and P. Wadler. Featherweight Java. ACM Trans. Program. Lang. Syst., 23(3):396--450, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Li and J. C. Mitchell. RT: A role-based trust-management framework. In Proceedings of the 3rd DARPA Information Survivability Conference and Exposition, pages 201--212, 2003.Google ScholarGoogle Scholar
  19. A. Liu and P. Ning. Tinyecc: A configurable library for elliptic curve cryptography in wireless sensor networks. In IPSN, pages 245--256, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Y. Liu, C. Skalka, and S. Smith. Type-specialized staged programming with process separation. HOSC, pages 341--385, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. MacQueen. Modules for Standard ML. In Proceedings of ACM Conference on Lisp and Functional Programming, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Madden, M. J. Franklin, J. M. Hellerstein, and W. Hong. TAG: a Tiny AGgregation service for ad-hoc sensor networks. SIGOPS Oper. Syst. Rev., 36(SI):131--146, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. G. Mainland. Explicitly heterogeneous metaprogramming with MetaHaskell. In ICFP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. G. Mainland, G. Morrisett, and M. Welsh. Flask: staged functional programming for sensor networks. In ICFP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Mitchell, S. Meldal, and N. Madhav. An extension of standard ML modules with subtyping and inheritance. In POPL, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. D. Moeser, M. Walker, C. Skalka, and J. Frolik. Application of a wireless sensor network for distributed snow water equivalence estimation. In Western Snow Conference, 2011.Google ScholarGoogle Scholar
  27. T. Molhave and L. H. Petersen. Assignment Featherweight Java. Master's thesis, University of Aarhus, 2005.Google ScholarGoogle Scholar
  28. L. Mottola and G. P. Picco. Programming wireless sensor networks. ACM Computing Surveys, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G. C. Necula, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy code. In POPL, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Odersky, L. Spoon, and B. Venners. Programming in Scala, second edition. Artima, Inc, 2011.Google ScholarGoogle Scholar
  31. T. Rompf and M. Odersky. Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs. In GPCE, pages 127--136, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. W. Taha. Resource-aware programming. In ICESS, pages 38--43, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. W. Taha and T. Sheard. Multi-stage programming with explicit annotations. In PEPM, pages 203--217, 1997. ISBN 0-89791-917-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. Willett, A. Martin, and R. Nowak. Backcasting: adaptive sampling for sensor networks. In IPSN, pages 124--133, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Scalaness/nesT: type specialized staged programming for sensor networks

    Recommendations

    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 SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 49, Issue 3
      GPCE '13
      March 2014
      181 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2637365
      Issue’s Table of Contents
      • cover image ACM Conferences
        GPCE '13: Proceedings of the 12th international conference on Generative programming: concepts & experiences
        October 2013
        198 pages
        ISBN:9781450323734
        DOI:10.1145/2517208

      Copyright © 2013 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 27 October 2013

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!