|
ABSTRACT
Severely resource-constrained devices present a confounding challenge to the functional programmer: we are used to having powerful abstraction facilities at our fingertips, but how can we make use of these tools on a device with an 8- or 16-bit CPU and at most tens of kilobytes of RAM? Motivated by this challenge, we have developed Flask, a domain specific language embedded in Haskell that brings the power of functional programming to sensor networks, collections of highly resource-constrained devices. Flask consists of a staging mechanism that cleanly separates node-level code from the meta-language used to generate node-level code fragments; syntactic support for embedding standard sensor network code; a restricted subset of Haskell that runs on sensor networks and constrains program space and time consumption; a higher-level "data stream" combinator library for quickly constructing sensor network programs; and an extensible runtime that provides commonly-used services. We demonstrate Flask through several small code examples as well as a compiler that generates node-level code to execute a network-wide query specified in a SQL-like language. We show how using Flask ensures constraints on space and time behavior. Through microbenchmarks and measurements on physical hardware, we demonstrate that Flask produces programs that are efficient in terms of CPU and memory usage and that can run effectively on existing sensor network hardware.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
Andreas M. Ali , Kung Yao , Travis C. Collier , Charles E. Taylor , Daniel T. Blumstein , Lewis Girod, An empirical study of collaborative acoustic source localization, Proceedings of the 6th international conference on Information processing in sensor networks, April 25-27, 2007, Cambridge, Massachusetts, USA
[doi> 10.1145/1236360.1236367]
|
| |
2
|
Amol Bakshi , Viktor K. Prasanna , Jim Reich , Daniel Larner, The Abstract Task Graph: a methodology for architecture-independent programming of networked sensor systems, Proceedings of the 2005 workshop on End-to-end, sense-and-respond systems, applications and services, June 05-05, 2005, Seattle, Washington
|
| |
3
|
Amol Bakshi , Viktor K. Prasanna , Jim Reich , Daniel Larner, The Abstract Task Graph: a methodology for architecture-independent programming of networked sensor systems, Proceedings of the 2005 workshop on End-to-end, sense-and-respond systems, applications and services, June 05-05, 2005, Seattle, Washington
|
 |
4
|
|
 |
5
|
|
| |
6
|
Antony Courtney and Conal Elliott. Genuinely functional user interfaces. In 2001 Haskell Workshop, September 2001.
|
 |
7
|
|
 |
8
|
David Gay , Philip Levis , Robert von Behren , Matt Welsh , Eric Brewer , David Culler, The nesC language: A holistic approach to networked embedded systems, Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, June 09-11, 2003, San Diego, California, USA
|
 |
9
|
Omprakash Gnawali , Ki-Young Jang , Jeongyeup Paek , Marcos Vieira , Ramesh Govindan , Ben Greenstein , August Joki , Deborah Estrin , Eddie Kohler, The Tenet architecture for tiered sensor networks, Proceedings of the 4th international conference on Embedded networked sensor systems, October 31-November 03, 2006, Boulder, Colorado, USA
[doi> 10.1145/1182807.1182823]
|
 |
10
|
Michael I. Gordon , William Thies , Michal Karczmarek , Jasper Lin , Ali S. Meli , Andrew A. Lamb , Chris Leger , Jeremy Wong , Henry Hoffmann , David Maze , Saman Amarasinghe, A stream compiler for communication-exposed architectures, Proceedings of the 10th international conference on Architectural support for programming languages and operating systems, October 05-09, 2002, San Jose, California
|
| |
11
|
E. Goto. Monocopy and associative algorithms in an extended LISP. Technical Report 74-03, Univ. of Tokyo, Information Science Lab., May 1974.
|
 |
12
|
|
 |
13
|
Jason Hill , Robert Szewczyk , Alec Woo , Seth Hollar , David Culler , Kristofer Pister, System architecture directions for networked sensors, Proceedings of the ninth international conference on Architectural support for programming languages and operating systems, p.93-104, November 2000, Cambridge, Massachusetts, United States
|
| |
14
|
Paul Hudak, Antony Courtney, Henrik Nilsson, and John Peterson. Arrows, robots, and functional reactive programming. In Summer School on Advanced Functional Programming 2002, Oxford University, volume 2638 of Lecture Notes in Computer Science, pages 159--187. Springer-Verlag, 2003.
|
| |
15
|
|
| |
16
|
John Hughes. Programming with arrows. In Advanced Functional Programming, volume 3622 of Lecture Notes in Computer Science, pages 73--129. Springer, 2004.
|
| |
17
|
Graham Hutton. Higher-order functions for parsing. Journal of Functional Programming, 2 (3): 323--343, July 1992.
|
| |
18
|
|
 |
19
|
Simon Peyton Jones , Dimitrios Vytiniotis , Stephanie Weirich , Geoffrey Washburn, Simple unification-based type inference for GADTs, Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, September 16-21, 2006, Portland, Oregon, USA
|
 |
20
|
|
 |
21
|
Nupur Kothari , Ramakrishna Gummadi , Todd Millstein , Ramesh Govindan, Reliable and efficient programming abstractions for wireless sensor networks, Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, June 10-13, 2007, San Diego, California, USA
|
| |
22
|
|
| |
23
|
Liqian Lu, Tian He, Tarek Abdelzaher, and John Stankovic. Design and comparison of lightweight group management strategies in EnviroSuite. In Proc. International Conference on Distributed Computing in Sensor Networks (DCOSS), Marina Del Rey, CA, June 2005.
|
 |
24
|
|
 |
25
|
|
 |
26
|
|
| |
27
|
Ryan Newton, Lewis Girod, Michael Craig, Sam Madden, and Greg Morrisett. Wavescript: A case-study in applying a distributed stream-processing language. Technical Report MIT-CSAIL-TR-2008-005, MIT CSAIL, 2008.
|
 |
28
|
Henrik Nilsson , Antony Courtney , John Peterson, Functional reactive programming, continued, Proceedings of the 2002 ACM SIGPLAN workshop on Haskell, p.51-64, October 03, 2002, Pittsburgh, Pennsylvania
[doi> 10.1145/581690.581695]
|
 |
29
|
Izzet Pembeci , Henrik Nilsson , Gregory Hager, Functional reactive robotics: an exercise in principled integration of domain-specific languages, Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming, p.168-179, October 06-08, 2002, Pittsburgh, PA, USA
[doi> 10.1145/571157.571174]
|
| |
30
|
|
 |
31
|
|
 |
32
|
Jacob Sorber , Alexander Kostadinov , Matthew Garber , Matthew Brennan , Mark D. Corner , Emery D. Berger, Eon: a language and runtime system for perpetual systems, Proceedings of the 5th international conference on Embedded networked sensor systems, November 06-09, 2007, Sydney, Australia
[doi> 10.1145/1322263.1322279]
|
 |
33
|
Martin Sulzmann , Manuel M. T. Chakravarty , Simon Peyton Jones , Kevin Donnelly, System F with type equality coercions, Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation, January 16-16, 2007, Nice, Nice, France
[doi> 10.1145/1190315.1190324]
|
| |
34
|
|
| |
35
|
|
| |
36
|
|
 |
37
|
|
| |
38
|
|
| |
39
|
|
| |
40
|
Stephen Weeks, Matthew Fluet, Henry Cejtin, and Suresh Jagannathan. http://www.mlton.org/.
|
| |
41
|
Geoff Werner-Allen, Jeff Johnson, Mario Ruiz, Jonathan Lees, and Matt Welsh. Monitoring volcanic eruptions with a wireless sensor network. In Proc. Second European Workshop on Wireless Sensor Networks (EWSN '05), January 2005a.
|
| |
42
|
|
| |
44
|
Geoff Werner-Allen , Konrad Lorincz , Jeff Johnson , Jonathan Lees , Matt Welsh, Fidelity and yield in a volcano monitoring sensor network, Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation, p.27-27, November 06-08, 2006, Seattle, WA
|
| |
45
|
Kamin Whitehouse, Feng Zhao, and Jie Liu. Semantic Streams: a framework for declarative queries and automatic data interpretation. Technical Report MSR-TR-2005-45, Microsoft Research, One Microsoft Way, Redmond, WA 98052, April 2005.
|
| |
46
|
Kamin Whitehouse, Jie Liu, and Feng Zhao. Semantic Streams: a framework for composable inference over sensor data. In Proc. Third European Workshop on Wireless Sensor Networks (EWSN), Zurich, Switzerland, February 2006.
|
 |
47
|
Hongwei Xi , Chiyan Chen , Gang Chen, Guarded recursive datatype constructors, Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.224-235, January 15-17, 2003, New Orleans, Louisiana, USA
|
 |
48
|
Ning Xu , Sumit Rangwala , Krishna Kant Chintalapudi , Deepak Ganesan , Alan Broad , Ramesh Govindan , Deborah Estrin, A wireless sensor network For structural monitoring, Proceedings of the 2nd international conference on Embedded networked sensor systems, November 03-05, 2004, Baltimore, MD, USA
[doi> 10.1145/1031495.1031498]
|
CITED BY
|
|
Konrad Lorincz , Bor-rong Chen , Jason Waterman , Geoff Werner-Allen , Matt Welsh, Resource aware programming in the Pixie OS, Proceedings of the 6th ACM conference on Embedded network sensor systems, November 05-07, 2008, Raleigh, NC, USA
|
|