Programming wireless sensor networks is a major challenge, evenfor experienced programmers. To alleviate this problem, prior workhas proposed a paradigm shift from node-level microprogrammingto macroprogramming, where the user specifies a distributed applicationusing a single macroprogram that is automatically translatedinto a set of node-level microprograms. This paper makes thecase that node-level microprogramming itself can be made mucheasier by using the right set of programming abstractions. To supportthis claim, this paper presents uSETL, a programming abstractionfor sensor networks based on set theory. Sets offer a powerfulformalism and high expressiveness, yet are a natural way ofthinking about resource abstraction in sensor networks. In additionto the set abstraction, uSETL features programming constructsthat enable event-driven programming at a high level of abstraction,thereby significantly simplifying node-level microprogramming.uSETL consists of a set-based programming language, acompiler that translates uSETL programs into node-specific applicationcode, and a runtime environment that provides various servicesto support the set-based programming abstraction. uSETLhas been implemented using the Contiki operating system and runson the Telos motes. Experimental results demonstrate that uSETLenables programmers to write various sensor network applicationsin a natural and highly compact manner with minimal overheads.

Date of this Version