Academia.eduAcademia.edu

Outline

Context-Oriented Behavioral Programming

2021, ArXiv

https://doi.org/10.1016/J.INFSOF.2020.106504

Abstract

Context: Modern systems require programmers to develop code that dynamically adapts to different contexts, leading to the evolution of new context-oriented programming languages. These languages introduce new software-engineering challenges, such as: how to maintain the separation of concerns of the codebase? how to model the changing behaviors? how to verify the system behavior? and more. Objective: This paper introduces Context-Oriented Behavioral Programming (COBP) — a novel paradigm for developing context-aware systems, centered on natural and incremental specification of context-dependent behaviors. As the name suggests, we combine behavioral-programming (BP) — a scenario-based modeling paradigm — with context idioms that explicitly specify when scenarios are relevant and what information they need. The core idea is to connect the behavioral model with a data model that represents the context, allowing an intuitive connection between the models via update and select queries. Co...

References (33)

  1. Gregory D. Abowd, Anind K. Dey, Peter J. Brown, Nigel Davies, Mark Smith, and Pete Steggles. Towards a Better Understand- ing of Context and Context-Awareness. Computing Systems, 40(3):304-307, 1999.
  2. Isaac Asimov. Runaround. Astounding Science Fiction, 29(1):94- 103, 1942.
  3. Yoram Atir, David Harel, Asaf Kleinbort, and Shahar Maoz. Object Composition in Scenario-Based Programming. In Proceed- ings of the Theory and Practice of Software, 11th International Conference on Fundamental Approaches to Software Engineer- ing, FASE'08/ETAPS'08, pages 301-316, Berlin, Heidelberg, 2008. Springer-Verlag.
  4. Michael Bar-Sinai. Extending Behavioral Programming for Model-Driven Engineering. PhD Thesis, Ben-Gurion University of the Negev, Israel, 2020.
  5. Michael Bar-Sinai, Gera Weiss, and Reut Shmuel. BPjs -An Extensible, Open Infrastructure for Behavioral Programming Research. In 21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings, MODELS-Companion 2018, 2018.
  6. Michele Colledanchise and Petter Ögren. Behavior Trees in Robotics and AI: An Introduction. CoRR, abs/1709.00084, 2017.
  7. Pascal Costanza and Theo D'Hondt. Feature Descriptions for Context-oriented Programming. In Steffen Thiel and Klaus Pohl, editors, Software Product Lines, 12th International Conference, SPLC 2008, Limerick, Ireland, September 8-12, 2008, Proceed- ings. Second Volume (Workshops), pages 9-14. Lero Int. Science Centre, University of Limerick, Ireland, 2008.
  8. Pascal Costanza and Robert Hirschfeld. Language Constructs for Context-Oriented Programming: An Overview of ContextL. In Proceedings of the 2005 Symposium on Dynamic Languages, pages 1-10. ACM, 2005.
  9. Werner Damm and David Harel. LSCs: Breathing Life into Message Sequence Charts. Formal Methods in System Design, 19(1):45-80, 2001.
  10. Achiya Elyasaf, Assaf Marron, Arnon Sturm, and Gera Weiss. A Context-Based Behavioral Language for IoT. In Regina Hebig and Thorsten Berger, editor, CEUR Workshop Proceedings, vol- ume 2245, pages 485-494, Copenhagen, Denmark, 2018. CEUR- WS.org.
  11. Achiya Elyasaf, Aviran Sadon, Gera Weiss, and Tom Yaacov. Using Behavioral Programming with Solver, Context, and Deep Reinforcement Learning for Playing a Simplified RoboCup-Type Game. In MDETools Workshop, 2019.
  12. Martin Gardner. Mathematical Games. Scientific American, 222(6):132-140, 1970.
  13. Sebastian Andres Gonzalez Montesinos, Nicolas Cardozo Alvarez, Kim Mens, Alfredo Jaime Cadiz Rodriguez, Jean-Christophe Libbrecht, and Julien Goffaux. Subjective-c: Bringing Context to Mobile Platform Programming. In International Software Language Engineering Conference, 2011.
  14. Joel Greenyer, Daniel Gritzner, Timo Gutahr, Florian König, Nils Glade, Assaf Marron, and Guy Katz. ScenarioTools -A Tool Suite for the Scenario-Based Modeling and Analysis of Reactive Systems. Science of Computer Programming, 2017.
  15. David Harel, Amir Kantor, Guy Katz, Assaf Marron, Lior Mizrahi, and Gera Weiss. On Composing and Proving the Correctness of Reactive Behavior. In Proceedings of the Inter- national Conference on Embedded Software (EMSOFT). IEEE, September 2013.
  16. David Harel, Hillel Kugler, Shahar Maoz, and Itai Segall. Accel- erating Smart Play-Out. In Jan van Leeuwen, Anca Muscholl, David Peleg, Jaroslav Pokorný, and Bernhard Rumpe, editors, SOFSEM 2010: Theory and Practice of Computer Science, 36th Conference on Current Trends in Theory and Practice of Com- puter Science, Spindleruv Mlýn, Czech Republic, January 23-29, 2010. Proceedings, volume 5901 of Lecture Notes in Computer Science, pages 477-488. Springer, 2010.
  17. David Harel, Hillel Kugler, Rami Marelly, and Amir Pnueli. Smart Play-out of Behavioral Requirements. In Mark Aagaard and John W. O'Leary, editors, Formal Methods in Computer- Aided Design, 4th International Conference, FMCAD 2002, Portland, OR, USA, November 6-8, 2002, Proceedings, volume 2517 of Lecture Notes in Computer Science, pages 378-398. Springer, 2002.
  18. David Harel, Hillel Kugler, and Amir Pnueli. Synthesis Revis- ited: Generating Statechart Models from Scenario-Based Re- quirements. In Hans-Jörg Kreowski, Ugo Montanari, Fernando Orejas, Grzegorz Rozenberg, and Gabriele Taentzer, editors, Formal Methods in Software and Systems Modeling, Essays Dedicated to Hartmut Ehrig, on the Occasion of His 60th Birth- day, volume 3393 of Lecture Notes in Computer Science, pages 309-324. Springer, 2005.
  19. David Harel, Robby Lampert, Assaf Marron, and Gera Weiss. Model-Checking Behavioral Programs. 2011 Proceedings of the Ninth ACM International Conference on Embedded Software (EMSOFT), pages 279-288, 2011.
  20. David Harel and Rami Marelly. Come, Let's Play: Scenario- Based Programming Using LSCs and the Play-Engine. Springer Science & Business Media, 2003.
  21. David Harel, Assaf Marron, and Gera Weiss. Programming Co- ordinated Behavior in Java. In ECOOP 2010 -Object-Oriented Programming, pages 250-274. Springer Berlin Heidelberg, 2010.
  22. David Harel, Assaf Marron, and Gera Weiss. Behavioral Pro- gramming. Communications of the ACM, 55(7):90, July 2012.
  23. David Harel and Itai Segall. Planned and Traversable Play- out: A Flexible Method for Executing Scenario-based Programs. In Proceedings of the 13th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS'07, pages 485-499, Berlin, Heidelberg, 2007. Springer- Verlag.
  24. Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. EventCJ: A Context-oriented Programming Language with Declarative Event-based Context transition. In Paulo Borba and Shigeru Chiba, editors, Proceedings of the 10th International Conference on Aspect-Oriented Software Development, AOSD 2011, Porto de Galinhas, Brazil, March 21-25, 2011, pages 253-264. ACM, 2011.
  25. Gal A. Kaminka, Mor Vered, and Noa Agmon. Plan Recognition in Continuous Domains. In Sheila A. McIlraith and Kilian Q. Weinberger, editors, Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th inno- vative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial In- telligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 6202-6210. AAAI Press, 2018.
  26. Robert M. Keller. Formal Verification of Parallel Programs. Communications of the ACM, 19(7):371-384, 1976.
  27. Gary Lindstrom, Peter C. Mehlitz, and Willem Visser. Model Checking Real Time Java Using Java PathFinder. In Doron A. Peled and Yih-Kuen Tsay, editors, Automated Technology for Verification and Analysis, Third International Symposium, ATVA 2005, Taipei, Taiwan, October 4-7, 2005, Proceedings, volume 3707 of Lecture Notes in Computer Science, pages 444- 456. Springer, 2005.
  28. Shahar Maoz and Jan Oliver Ringert. Synthesizing a Lego Fork- lift Controller in GR(1): A Case Study. In Pavol Cerný, Viktor Kuncak, and Parthasarathy Madhusudan, editors, Proceedings Fourth Workshop on Synthesis, SYNT 2015, San Francisco, CA, USA, 18th July 2015., volume 202 of EPTCS, pages 58-72, 2015.
  29. Santiago Matalonga, Felyppe Rodrigues, and Guilherme Horta Travassos. Characterizing Testing Methods for Context-aware Software Systems: Results from a Quasi-systematic Literature Review. Journal of Systems and Software, 131:1-21, 2017.
  30. Kenneth L. McMillan. The SMV Systems, 1993.
  31. Nir Piterman, Amir Pnueli, and Yaniv Sa'ar. Synthesis of Reac- tive(1) Designs. In E. Allen Emerson and Kedar S. Namjoshi, editors, Verification, Model Checking, and Abstract Interpreta- tion, pages 364-380, Berlin, Heidelberg, 2006. Springer Berlin Heidelberg.
  32. Guido Salvaneschi, Carlo Ghezzi, and Matteo Pradella. Context- Oriented Programming: A Software Engineering Perspective. Journal of Systems and Software, 85:1801-1817, 2012.
  33. Aotani Tomoyuki and Gary T. Leavens. Towards Modular Reasoning for Context-oriented Programs. In Proceedings of the 18th Workshop on Formal Techniques for Java-like Programs, FTfJPâĂŹ16, pages 1-7, New York, NY, USA, 2016. Association for Computing Machinery.