We present programming abstractions for implementing adaptive Wireless Sensor Network (WSN) software. The need for adaptability arises in WSNs because of unpredictable environment dynamics, changing requirements, and resource scarcity. However, after about a decade of research in WSN programming, developers are still left with no dedicated support. To address this issue, we bring concepts from Context-Oriented Programming (COP) down to WSN devices. Contexts model the situations that WSN software needs to adapt to. Using COP, programmers use a notion of layered function to implement context-dependent behavioral variations of WSN code. To this end, we provide language-independent design concepts to organize the context-dependent WSN operating modes, decoupling the abstractions from their concrete implementation in a programming language. Our own implementation, called CONESC, extends nesC with COP constructs. Based on three representative applications, we show that CONESC greatly simplifies the resulting code and yields increasingly decoupled implementations compared to nesC. For example, by model-checking every function in either implementations, we show a ~50% reduction in the number of program states that programmers need to deal with, indicating easier debugging. In our tests, this comes at the price of a maximum 2.5% (4.5%) overhead in program (data) memory.

Towards context-oriented self-adaptation in resource-constrained cyberphysical systems

AFANASOV, MIKHAIL;MOTTOLA, LUCA;GHEZZI, CARLO
2014-01-01

Abstract

We present programming abstractions for implementing adaptive Wireless Sensor Network (WSN) software. The need for adaptability arises in WSNs because of unpredictable environment dynamics, changing requirements, and resource scarcity. However, after about a decade of research in WSN programming, developers are still left with no dedicated support. To address this issue, we bring concepts from Context-Oriented Programming (COP) down to WSN devices. Contexts model the situations that WSN software needs to adapt to. Using COP, programmers use a notion of layered function to implement context-dependent behavioral variations of WSN code. To this end, we provide language-independent design concepts to organize the context-dependent WSN operating modes, decoupling the abstractions from their concrete implementation in a programming language. Our own implementation, called CONESC, extends nesC with COP constructs. Based on three representative applications, we show that CONESC greatly simplifies the resulting code and yields increasingly decoupled implementations compared to nesC. For example, by model-checking every function in either implementations, we show a ~50% reduction in the number of program states that programmers need to deal with, indicating easier debugging. In our tests, this comes at the price of a maximum 2.5% (4.5%) overhead in program (data) memory.
2014
IEEE 38th Annual International Computers, Software and Applications Conference Workshops (COMPSACW)
9781479935789
9781479935789
context; cyberphysical; languages; programming; resource-constrained; self-adaptivity;
File in questo prodotto:
File Dimensione Formato  
afanasov14towards.pdf

accesso aperto

: Post-Print (DRAFT o Author’s Accepted Manuscript-AAM)
Dimensione 210.24 kB
Formato Adobe PDF
210.24 kB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11311/983152
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 4
  • ???jsp.display-item.citation.isi??? 4
social impact