[Updates] [Overview] [Tutorials] [Downloads] [Documentation] [The Beverage] [Contact]

Maté allows you to program TinyOS networks using simple, high-level scripts. Maté has two parts: an application-specific virtual machine (ASVM), and a scripting environment for that virtual machine. To program a network, you first install the ASVM on your TinyOS motes. You reprogram a network using either the Maté Java GUI/editor or command line compiler, which compile scripts to the VM instruction set. Maté VMs automatically share and propagate programs: if you install a new Maté program on a single node, the network will automatically reprogram itself.

Maté virtual machines are application specific because you can customize their triggering events and computational primitives. For example, a Maté ASVM for habitat monitoring could have periodic timer events for sampling and primitives for sending readings to a collection point. In contrast, an ASVM for tracking could have events for target detection and primitives for nodes to collaboratively estimate target position. You build a ASVM by writing a short description file, stating what events and primitives are needed: the Maté toolchain generates all of the necessary files. In addition to composing a Maté VM and scripting environment, experienced users can also extend the set of available primitives and events.

The basic idea is that customizing a VM to a particular application will make programs concise and simple. Simplicity leads to fewer bugs and easier programming, while conciseness reduces the energy cost and time to install a new program.

Finally, Maté VMs perform a wide range of safety checks to prevent a buggy script from disabling a network. If the VM detects an error, such as an array overflow, it enters an error state and periodically broadcasts a message stating the cause of the error. ASVMs can run multiple event handlers concurrently, but only do so when there doing so is safe (e.g., they do not share variables).

This is an example Maté program for periodic data sampling:

    buffer data;
    data[0] = light();
    send(data);         ! Route the data to a collection point
			
This program compiles to six bytes of code, and is written in the TinyScript language. Although Maté is flexible enough to support a wide range of languages, it currently only supports TinyScript. We are preparing a future release that will include a second language, motlle.


Last modified: Wed Jul 7 18:44:24 PDT 2004