Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Jonathan Erickson

Dr. Dobb's Bloggers

WASP: A Programming Language for Wireless Sensor Networks

April 08, 2009

Domain specific. Application specific. Archetype specific. Call it what you will, but WASP may be just what scientists  ordered. Scientists, that is, who use wireless sensor networks to do things like monitor earthquakes, track birds' behaviors, or gauge vibration in bridges.

The problem that WASP tackles is the complexity involved in programming sensor networks, complexity at least for scientists who may be experts in their domain, but not experts when it comes to programming embedded systems. To that end, WASP is a programming language designed specifically for programming wireless sensor networks by nonprogrammers.

"Most existing programming languages for wireless sensor networks are a nightmare for nonprogrammers," explains Robert Dick,  an associate professor in the University of Michigan's Department of Electrical Engineering and Computer Science who is part of the team implementing WASP. "We're working on ways to allow the scientists who actually use the devices to program them reliably without having to hire an embedded systems programming expert."

Actually WASP, short for "Wireless sensor network Archetype-Specific Programming language," is part of a larger program called ABSYNTH: The Archetype-Based SYNTHesis Project which has the goal of making it easier for domain experts to design and implement wireless sensor network applications.  As part of the ABSYNTH project, the research team -- Robert Dick, Lan Bai, and Peter Dinda -- examined a range of wireless sensor networks to develop a taxonomy which enabled them to design a language (and compiler) appropriate for novice programmers. As described in their paper Archetype-Based Design: Sensor Network Programming for Application Experts, Not Just Programming Experts, they also conducted a user study to evaluate several sensor network languages -- TinyScript, TinySQL, SwissQM, and TinyTemplate, along with WASP.

To create their language, the team examined the variables a scientist  might want to monitor, and the areas where flexibility would be useful. This led them to 19 "application level properties" that they eventually grouped into seven categories ("archetypes") that specific types of monitoring researchers might use. These seven archetypes form WASP's core functionality. A language tailored for an archetype is called an "archetype-specific language." The team's long term goals include developing multiple specialized, but easy to use, languages that in total address most of the sensor network application domain.

A WASP program is composed of a node-level code segment, initiated with the keyword “local:” which specifies single node behavior, and a network-level code segment, initiated with the keyword “network:”, and which specifies how data are aggregated through the network and gathered at the base station. The node-level code segment specifies two types of functionalities: sampling and data processing. The WASP compiler translates a WASP program into nesC code. The generated nesC code is then compiled to executables with ncc, the nesC compiler for TinyOS. The parser is written with PLY, a Python implementation of lex and yacc.

So what's the bottom line? According to user studies, WASP reduced average development time by 44.4  percent compared to other languages. The researchers see this as the first step towards their ultimate goal of developing a set of archetype-specific programming language for wireless sensor network applications.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.