[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article

Scalaness/nesT: type specialized staged programming for sensor networks

Published: 27 October 2013 Publication History

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.
[2]
L. Cardelli. Program fragments, linking, and modularization. In POPL, pages 266--277, 1997.
[3]
L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv., 17(4):471--523, 1985.
[4]
P. Chapin and C. Skalka. SpartanRPC: Secure WSN middleware for cooperating domains. In MASS, November 2010.
[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.
[6]
E. Cheong. Actor-Oriented Programming for Wireless Sensor Networks. PhD thesis, University of California, Berkeley, 2007.
[7]
A. Chlipala. Ur: Statically-typed metaprogramming with type-level record computation. In PLDI, 2010.
[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.
[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.
[10]
M. Flatt and M. Felleisen. Units: Cool modules for HOT languages. In PLDI, 1998.
[11]
J. Frolik and C. Skalka. Snowcloud: A complete system for snow hydrology research. In RealWSN, 2013.
[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.
[13]
G. Ghelli and B. Pierce. Bounded existentials and minimal typing. Theoretical Computer Science, 193(1-2):75--96, 1998.
[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.
[15]
K. Hammond and G. Michaelson. Hume: A domain-specific language for real-time embedded systems. In GPCE, pages 37--56. Springer- Verlag, 2003.
[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.
[17]
A. Igarashi, B. C. Pierce, and P. Wadler. Featherweight Java. ACM Trans. Program. Lang. Syst., 23(3):396--450, 2001.
[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.
[19]
A. Liu and P. Ning. Tinyecc: A configurable library for elliptic curve cryptography in wireless sensor networks. In IPSN, pages 245--256, 2008.
[20]
Y. Liu, C. Skalka, and S. Smith. Type-specialized staged programming with process separation. HOSC, pages 341--385, 2011.
[21]
D. MacQueen. Modules for Standard ML. In Proceedings of ACM Conference on Lisp and Functional Programming, 1984.
[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.
[23]
G. Mainland. Explicitly heterogeneous metaprogramming with MetaHaskell. In ICFP, 2012.
[24]
G. Mainland, G. Morrisett, and M. Welsh. Flask: staged functional programming for sensor networks. In ICFP, 2008.
[25]
J. Mitchell, S. Meldal, and N. Madhav. An extension of standard ML modules with subtyping and inheritance. In POPL, 1991.
[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.
[27]
T. Molhave and L. H. Petersen. Assignment Featherweight Java. Master's thesis, University of Aarhus, 2005.
[28]
L. Mottola and G. P. Picco. Programming wireless sensor networks. ACM Computing Surveys, 2011.
[29]
G. C. Necula, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy code. In POPL, 2002.
[30]
M. Odersky, L. Spoon, and B. Venners. Programming in Scala, second edition. Artima, Inc, 2011.
[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.
[32]
W. Taha. Resource-aware programming. In ICESS, pages 38--43, 2004.
[33]
W. Taha and T. Sheard. Multi-stage programming with explicit annotations. In PEPM, pages 203--217, 1997. ISBN 0-89791-917-3.
[34]
R. Willett, A. Martin, and R. Nowak. Backcasting: adaptive sampling for sensor networks. In IPSN, pages 124--133, 2004.

Index Terms

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

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    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
    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: 27 October 2013
    Published in SIGPLAN Volume 49, Issue 3

    Check for updates

    Author Tags

    1. nesC
    2. scala
    3. staged programming

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)1
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 21 Dec 2024

    Other Metrics

    Citations

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media