Flask: staged functional programming for sensor networks. 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.

This software is also peer reviewed by journal TOMS.

References in zbMATH (referenced in 5 articles )

Showing results 1 to 5 of 5.
Sorted by year (citations)

  1. Liu, Yu David; Skalka, Christian; Smith, Scott F.: Type-specialized staged programming with process separation (2011)
  2. Marron, Pedro José (ed.); Karnouskos, Stamatis (ed.); Minder, Daniel (ed.); Ollero, Aníbal (ed.): The emerging domain of cooperating objects. (2011)
  3. Mottola, Luca; Picco, Gian Pietro: Programming wireless sensor networks: fundamental concepts and state of the art (2011) ioport
  4. Rudolph, Johannes; Thiemann, Peter: \textscMnemonics: type-safe bytecode generation at run time (2010)
  5. Mainland, Geoffrey; Morrisett, Greg; Welsh, Matt: Flask: staged functional programming for sensor networks (2008) ioport