Abstract:The development of wireless sensor networks requires the ability of efficiently updating application software running on sensors. To address this problem, this paper proposes ReLog, a reprogramming-oriented logical programming language for wireless sensor network applications and its processing system. Based on common characteristics of wireless sensor network applications, the ReLog language extends a traditional logical programming language and provides suitable programming abstractions with which programmers can write and modify programs efficiently. Meanwhile, the language processing system leverages on intermediate code to decouple application programs from system software so as to reduce the size of updating code to improve the updating efficiency. This paper demonstrates ReLog through a case of data collection application. Results show that ReLog can achieve compact and ease-to-modified source code. In addition, the executing mechanism of ReLog can significantly reduce the cost of energy and time when transmitting updating code of applications.