Implementing a semi-causal domain-specific language for context detection over binary sensors

Nic Volanschi 1 Bernard Serpette 1 Charles Consel 1
1 Phoenix - Programming Language Technology For Communication Services
LaBRI - Laboratoire Bordelais de Recherche en Informatique, Inria Bordeaux - Sud-Ouest, EA4136 - Handicap et système nerveux :Action, communication, interaction: rétablissement de la fonction et de la participation [Bordeaux]
Abstract : In spite of the fact that many sensors in use today are binary (i.e. produce only values of 0 and 1), and that useful context-aware applications are built exclusively on top of them, there is currently no development approach specifically targeted to binary sensors. Dealing with notions of state and state combinators, central to binary sensors, is tedious and error-prone in current approaches. For instance, developing such applications in a general programming language requires writing code to process events, maintain state and perform state transitions on events, manage timers and/or event histories. In another paper, we introduced a domain specific language (DSL) called Allen, specifically targeted to binary sensors. Allen natively expresses states and state combinations, and detects contexts on line, on incoming streams of binary events. Expressing state combinations in Allen is natural and intuitive due to a key ingredient: semi-causal operators. That paper focused on the concept of the language and its main operators, but did not address its implementation challenges. Indeed, online evaluation of expressions containing semi-causal operators is difficult, because semi-causal sub-expressions may block waiting for future events, thus generating unknown values, besides 0 and 1. These unknown values may or may not propagate to the containing expressions, depending on the current value of the other arguments. This paper presents a compiler and runtime for the Allen language, and shows how they implement its state combining operators, based on reducing complex expressions to a core subset of operators, which are implemented natively. We define several assisted living applications both in Allen and in a general scripting language. We show that the former are much more concise in Allen, achieve more effective code reuse, and ease the checking of some domain properties.
Type de document :
Communication dans un congrès
17th International Conference on Generative Programming: Concepts and Experiences (GPCE 2018), Nov 2018, Boston, Massachusetts, United States. pp.66-78, 2018, Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences. 〈https://conf.researchr.org/track/gpce-2018/〉. 〈10.1145/3278122.3278134〉
Liste complète des métadonnées

https://hal.inria.fr/hal-01956179
Contributeur : Eugene Volanschi <>
Soumis le : samedi 15 décembre 2018 - 00:02:13
Dernière modification le : mardi 18 décembre 2018 - 01:23:12

Fichier

main.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

Citation

Nic Volanschi, Bernard Serpette, Charles Consel. Implementing a semi-causal domain-specific language for context detection over binary sensors. 17th International Conference on Generative Programming: Concepts and Experiences (GPCE 2018), Nov 2018, Boston, Massachusetts, United States. pp.66-78, 2018, Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences. 〈https://conf.researchr.org/track/gpce-2018/〉. 〈10.1145/3278122.3278134〉. 〈hal-01956179〉

Partager

Métriques

Consultations de la notice

26

Téléchargements de fichiers

44