Posts by Collection

portfolio

publications

Using Behavioural Programming with Solver, Context, and Deep Reinforcement Learning for Playing a Simplified RoboCup-Type Game

Published in ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C), 2019

How to cite

A. Elyasaf, A. Sadon, G. Weiss and T. Yaacov, Using Behavioural Programming with Solver, Context, and Deep Reinforcement Learning for Playing a Simplified RoboCup-Type Game 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C), 2019, pp. 243-251, doi: 10.1109/MODELS-C.2019.00039.

Abstract

We describe four scenario-based implementations of controllers for a player in a simplified RoboCup-type game. All four implementations are based on the behavioural programming (BP) approach. We first describe a simple controller for the player using the state-of-the-art BPjs tool and then show how it can be extended in various ways. The first extension is based on a version of BP where the Z3 SMT solver is used to provide mechanisms for richer composition of modules within the BP model. This allows for modules with higher cohesion and lower coupling. It also allows incrementality: we could use the scenarios we developed for the challenge of MDETOOLS’18 and extend the model to handle the new system. The second extension of BP demonstrated in this paper is a set of idioms for subjecting model components to context. One of the differences between this year’s challenge and the challenge we dealt with last year is that following the ball is not the only task that a player needs to handle, there is much more to care for. We demonstrate how we used the idioms for handling context to parametrize scenarios like “go to a target” in a dynamic and natural fashion such that modelers can efficiently specify reusable components similar to the way modern user manuals for advanced products are written. Lastly, in an attempt to make the instructions to the robot even more natural, we demonstrate a third extension based on deep reinforcement learning. Towards substantiating the observation that it is easier to explain things to an intelligent agent than to dumb compiler, we demonstrate how the combination of BP and deep reinforcement learning (DRL) allows for giving abstract instructions to the robot and for teaching it to follow them after a short training session.

Keyword

Behavioral Programming , Deep Reinforcement Learning, Context Oriented Modelling , BPjs, DRL

Published in , 1900

Extending Behavioral Programming Towards Improved Software Engineering Practices

Published in , 2021

How to cite

T. Yaacov, Extending behavioral programming towards improvedsoftware engineering practices, M.Sc. Thesis, 2021.

Abstract

This thesis presents several extensions of the Behavioral Programming (BP) paradigm to make it more accessible and usable for applications. Our contributions are as follows:

  • BP/Python: A stable, unified implementation of BP in Python. This implementation is used as an infrastructure for the research presented here and is already being used by others in our research group and outside of it.
  • BP/DRL: An experimental protocol for a more natural and abstract system modelling. In this protocol, a combination of BP and Deep Reinforcement Learning (DRL) allows for giving abstract instructions to a system and for teaching it to follow them.
  • BP/Liveness: A method for allowing direct specification of liveness requirements in BP. By integrating Reinforcement Learning to the event selection mechanism, we show that liveness requirements can be enforced in execution without adding unnecessary external constraints.
  • BP/DES: A methodology for Discrete Event Systems (DES) modelling using BP and Petri Net. The methodology offers to model system requirements with BP prior to implementing it with petri net, to avoid premature implementation decisions.

What Petri Nets Oblige Us to Say Comparing Approaches for Behavior Composition

Published in IEEE Transactions on Software Engineering, 2022

How to cite

A. Elyasaf, T. Yaacov and G. Weiss, What Petri Nets Oblige us to Say Comparing Approaches for Behavior Composition in IEEE Transactions on Software Engineering, vol. 49, no. 04, pp. 2303-2317, 2023. doi: 10.1109/TSE.2022.3216683

Abstract

We identify and demonstrate a weakness of Petri Nets (PN) in specifying composite behavior of reactive systems. Specifically, we show how, when specifying multiple requirements in one PN model, modelers are obliged to specify mechanisms for combining these requirements. This yields, in many cases, over-specification and incorrect models. We demonstrate how some execution paths are missed, and some are generated unintentionally. To support this claim, we analyze PN models from the literature, identify the combination mechanisms, and demonstrate their effect on the correctness of the model. To address this problem, we propose to model the system behavior using behavioral programming (BP), a software development and modeling paradigm designed for seamless integration of independent requirements. Specifically, we demonstrate how the semantics of BP, which define how to interweave scenarios into a single model, allow for avoiding the over-specification. Additionally, while BP maintains the same mathematical properties as PN, it provides means for changing the model dynamically, thus increasing the agility of the specification. We compare BP and PN in quantitative and qualitative measures by analyzing the models, their generated execution paths, and the specification process. Finally, while BP is supported by tools that allow for applying formal methods and reasoning techniques to the model, it lacks the legacy of PN tools and algorithms. To address this issue, we propose semantics and a tool for translating BP models to PN and vice versa.

Keyword

behavioral sciences, synchronization, programming, analytical models, benchmark testing, semantics, petri nets

BPpy: Behavioral programming in Python

Published in SoftwareX2023, 2023

How to cite

T. Yaacov, ``BPpy: Behavioral programming in Python,’’ SoftwareX, vol. 24, p. 101556, Dec. 2023.

Abstract

This paper presents BPpy, a novel framework for behavioral programming (BP) in Python. Designed with a flexible architecture, BPpy is crafted for easy integration with various Python platforms and systems, enabling the utilization of scenario-based programming for creating enhanced models for artificial intelligence (AI)-driven systems and vice versa. We illustrate how BPpy implements the principles of BP and extends them towards integrating with existing AI-based tools. The framework’s core principles and design are presented, followed by a comparison of its main features against those of current state-of-the-art BP-based frameworks.

Keyword

Behavioral programming, Artificial intelligence

talks

teaching