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.
- Unai Alegre, Juan Carlos Augusto, and Tony Clark. 2016. Engineering context-aware systems and applications: A survey. Journal of Systems and Software 117 (2016), 55-83. Google Scholar
Digital Library
- James F. Allen. 1983. Maintaining Knowledge About Temporal Intervals. Commun. ACM 26, 11 (Nov. 1983), 832-843. Google Scholar
Digital Library
- Ronald M. Baecker, Karyn Moffatt, and Michael Massimi. 2012. Technologies for Aging Gracefully. interactions 19, 3 (May 2012), 32-36. Google Scholar
Digital Library
- Engineer Bainomugisha, Andoni Lombide Carreton, Tom van Cutsem, Stijn Mostinckx, and Wolfgang de Meuter. 2013. A Survey on Reactive Programming. ACM Comput. Surv. 45, 4, Article 52 (Aug. 2013), 34 pages. Google Scholar
Digital Library
- T. Bourke and A. Sowmya. 2010. Delays in Esterel. In SYNCHRON 2009 (Dagstuhl Seminar Proceedings), Albert Benveniste, Stephen A. Edwards, Edward Lee, Klaus Schneider, and Reinhard von Hanxleden (Eds.). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Germany, Dagstuhl, Germany. http://drops.dagstuhl.de/opus/volltexte/2010/2434.Google Scholar
- Yann Busnel, Leonardo Querzoni, Roberto Baldoni, Marin Bertier, and Anne-Marie Kermarrec. 2011. Analysis of Deterministic Tracking of Multiple Objects using a Binary Sensor Network. ACM Transactions on Sensor Networks 8 (2011). https://hal.inria.fr/inria-00590873. Google Scholar
Digital Library
- Charles Consel, Lucile Dupuy, and Hélène Sauzéon. 2017. HomeAssist: An Assisted Living Platform for Aging in Place Based on an Interdisciplinary Approach. In Proceedings of the 8th International Conference on Applied Human Factors and Ergonomics (AHFE 2017). Springer.Google Scholar
- Joëlle Coutaz and James L Crowley. 2016. A First-Person Experience with End-User Development for Smart Homes. IEEE Pervasive Computing 15 (May 2016), 26-39. Google Scholar
Digital Library
- Gianpaolo Cugola and Alessandro Margara. 2012. Processing Flows of Information: From Data Stream to Complex Event Processing. ACM Comput. Surv. 44, 3, Article 15 (June 2012), 62 pages. Google Scholar
Digital Library
- Conal Elliott. 2000. Declarative Event-oriented Programming. In Proceedings of the 2Nd ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP '00). ACM, New York, NY, USA, 56-67. Google Scholar
Digital Library
- Abdoulaye Gamatié. 2010. Designing Embedded Systems with the SIGNAL Programming Language: Synchronous, Reactive Specification. Springer New York, New York, NY, Chapter Synchronous Programming: Overview, 21-39.Google Scholar
- Malik Ghallab and Amine Mounir Alaoui. 1989. Managing Efficiently Temporal Relations Through Indexed Spanning Trees. In Proceedings of the 11th International Joint Conference on Artificial Intelligence-Volume 2 (IJCAI'89). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1297-1303. http://dl.acm.org/citation.cfm?id=1623891.1623963. Google Scholar
Digital Library
- Justin Huang and Maya Cakmak. 2015. Supporting Mental Model Accuracy in Trigger-action Programming. In Proceedings of the 2015 ACM International Joint Conference on Pervasive and Ubiquitous Computing (UbiComp '15). ACM, New York, NY, USA, 215-225. Google Scholar
Digital Library
- David Janin and Bernard Paul Serpette. 2016. Timed Denotational Semantics for Causal Functions over Timed Streams. Research Report. LaBRI-Laboratoire Bordelais de Recherche en Informatique. https://hal.archives-ouvertes.fr/hal-01402209.Google Scholar
- Narayanan C. Krishnan and Diane J. Cook. 2014. Activity recognition on streaming sensor data. Pervasive and Mobile Computing 10 (2014), 138-154. Google Scholar
Digital Library
- Fco. Javier Ordóñez, Paula de Toledo, and Araceli Sanchis. 2013. Activity Recognition Using Hybrid Generative/Discriminative Models on Home Environments Using Binary Sensors. Sensors 13, 5 (2013), 5460-5477.Google Scholar
Cross Ref
- C. Perera, A. Zaslavsky, P. Christen, and D. Georgakopoulos. 2014. Context Aware Computing for The Internet of Things: A Survey. IEEE Communications Surveys Tutorials 16, 1 (First 2014), 414-454.Google Scholar
Cross Ref
- J. Saives, C. Pianon, and G. Faraut. 2015. Activity Discovery and Detection of Behavioral Deviations of an Inhabitant From Binary Sensors. IEEE Transactions on Automation Science and Engineering 12, 4 (Oct 2015), 1211-1224.Google Scholar
Cross Ref
- Lénaïc Terrier, Alexandre Demeure, and Sybille Caffiau. 2017. CCBL: A Language for Better Supporting Context Centered Programming in the Smart Home. In The 9th ACM SIGCHI Symposium on Engineering Interactive Computing Systems (PACM on Human-Computer Interaction), Vol. 1. Lisbonne, Portugal. https://hal.archives-ouvertes.fr/hal-01534805. Google Scholar
Digital Library
- Lenaïc Terrier, Alexandre Demeure, and Sybille Caffiau. 2017. CCBL: A new language for End User Development in the Smart Homes. In Proceedings of IS-EUD 2017. 82-87. https://pure.tue.nl/ws/files/69763287/IS_EUD2017_extended_abstracts.pdf#page=83.Google Scholar
- Blase Ur, Elyse McManus, Melwyn Pak Yong Ho, and Michael L. Littman. 2014. Practical Trigger-action Programming in the Smart Home. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI '14). ACM, New York, NY, USA, 803-812. Google Scholar
Digital Library
- Nic Volanschi, Bernard Serpette, Adrien Carteron, and Charles Consel. 2018. A Language for Online State Processing of Binary Sensors, Applied to Ambient Assisted Living. Technical Report submitted for publication. Inria Bordeaux. Available upon request.Google Scholar
- Le Yi Wang, Ji-Feng Zhang, and G. G. Yin. 2003. System identification using binary sensors. IEEE Trans. Automat. Control 48, 11 (Nov 2003), 1892-1907.Google Scholar
Index Terms
Implementing a semi-causal domain-specific language for context detection over binary sensors
Recommendations
Implementing a semi-causal domain-specific language for context detection over binary sensors
GPCE 2018: Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and ExperiencesIn 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 ...
A domain-specific language for building self-optimizing AST interpreters
GPCE '14Self-optimizing AST interpreters dynamically adapt to the provided input for faster execution. This adaptation includes initial tests of the input, changes to AST nodes, and insertion of guards that ensure assumptions still hold. Such specialization ...
A domain-specific language for building self-optimizing AST interpreters
GPCE 2014: Proceedings of the 2014 International Conference on Generative Programming: Concepts and ExperiencesSelf-optimizing AST interpreters dynamically adapt to the provided input for faster execution. This adaptation includes initial tests of the input, changes to AST nodes, and insertion of guards that ensure assumptions still hold. Such specialization ...







Comments