Master's Thesis

Background

My work was with a research group at Northwestern University as part of the Absynth Project. A Wireless Sensor Network (WSN) can be thought of as a collection of small devices (called nodes) that have tiny computers, sensors, and radios. The nodes are spread out to monitor an area and collect data. These nodes use their radios to communicate the data wirelessly. WSNs can be useful to many types of people. One such example is a group of scientists who wish to study the migration patterns and inter-species interactions of zebras by attaching nodes to collars on zebras (ZebraNet).

Problem

The problem with developing WSNs is that they are very difficult to program well. The nodes are battery-powered, so energy consumption is a big issue. Also, radio communication tends to be tricky in real-world applications due to things like node failure and multi-hop communication (communicating with another node through intermediate nodes). Because of these, and other challenges, an embedded systems expert is almost mandatory when designing a WSN. Since the majority of people that want to deploy WSNs aren't embedded systems experts (and don't want to become one), the Absynth Project is trying to design a tool to allow anyone to develop their own WSN.

Solution

The Absynth Project is attempting to create a tool that allows anyone to create their own WSN with little to no programming background. Our current model has several modules: the expert system, the user programming language, the intermediate language, and the end code and hardware. The expert system is a series of questions that narrows down what the user is trying to do with their WSN. Next, the system chooses an easy-to-learn programming language that is suitable for their application. Then, the user programs in that language, and the code is compiled into a common intermediate language. The intermediate language then applies optimizations to produce many equivalent programs and uses an objective function to choose the best one. Finally, the user receives a list of hardware to buy and instructions on how to put the hardware together and the code to load onto it.

My Work

My master's thesis focuses on the design and implementation of the intermediate language, the optimizations, and the end code and hardware. Since it is a master's thesis, and not a Ph.D., there is still much work left to be done on the project even though I've received my degree.

The interesting part of my work is the language that I designed, called GAIL. GAIL (Guarded Action Intermediate Language) is based on a guarded action model where actions are taken when their associated guard conditions are met. GAIL is intentionally not Turing complete. This allows programs in GAIL to be expressed as finite-state machines, which in turn allows programs to be statically analyzed at compile time to determine things such as maximum stack depth, memory usage, program size, and estimates of energy/power consumption.

Another interesting part of my work is the optimizations. I attempt to optimize GAIL code using rewrite rules. These rules look for expressions that match certain patterns in and replace them with equivalent expressions. This process generates many equivalent programs, all of which can then be analyzed to determine the "best" one. These optimizations aren't limited to software optimizations like traditional compilers. Since GAIL expresses both hardware and software, the rewrite optimizations can explore the trade-offs of using hardware vs. using software.

Thesis

The PDF of my master's thesis can be viewed here, or in the viewer below. The PDF of the technical report version, which just has an additional cover page from Northwestern, can be downloaded here.

To view this content, please make sure you have JavaScript enabled.

Presentation

Part of obtaining a thesis-based master's degree at Northwestern is defending your thesis in front of a committee of professors. The PDF of my master's thesis presentation can be viewed here, or in the viewer below.