Towards behavioral programming in distributed architectures

David Harel, Amir Kantor, Guy Katz, Assaf Marron*, Gera Weiss, Guy Wiener

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

18 Scopus citations


As part of expanding the implementation and use of the behavioral programming (BP) approach in a variety of languages and configurations, we tackle some of the challenges associated with applying the approach in a truly distributed, decentralized manner, where different modules run on separate machines. BP supports the development of reactive applications from modules that are aligned with the desired and undesired scenarios of system behaviors as described, say, in a requirements document, in an enhancement request, or a field problem report. A key advantage of this approach is that it facilitates incremental development where loosely coupled modules are added as requirements are introduced, and meaningful prototype execution can be carried out from early stages of development. In BP, each behavioral module (called a behavior thread) takes care of a separate facet of the requirements, thus control is conceptually decentralized. However, as the underlying principles of BP call for constant synchronization of, and "consultation" with, all behavior threads, efficient implementation in a physically distributed environment is a significant challenge on the road to broader acceptance of BP as a viable new way to develop systems. We begin by describing an implementation of BP in Erlang, where the coordination protocol is implemented via message passing. We demonstrate through examples how developing distributed systems in Erlang can benefit from BP advantages of incremental development and alignment of the code modules with the requirements. Next, we propose general BP design patterns (not limited to Erlang) for using BP in distributed applications, showing how to design applications using BP without forcing full synchronization among all threads at each step of the execution. This allows modules to run at different time scales and to wait for external input without stalling the entire system. Finally, we propose ways to alter the execution mechanism of BP so that execution can progress without necessarily waiting for the synchronization of all the threads. The enhanced execution algorithm has the potential of accelerating the distributed execution of behavioral programs.

Original languageAmerican English
Pages (from-to)233-267
Number of pages35
JournalScience of Computer Programming
Issue numberP2
StatePublished - 1 Feb 2015
Externally publishedYes

Bibliographical note

Funding Information:
The research of the D. Harel, A. Kantor, G. Katz, A. Marron and G. Wiener was supported by the John von Neumann Minerva Center for the Development of Reactive Systems at the Weizmann Institute of Science , by an Advanced Research Grant to Harel from the European Research Council (ERC) under the European Community's Seventh Framework Programme (FP7/2007-2013) and by the Israel Science Foundation . The research of G. Weiss was supported by the Lynn and William Frankel Center for Computer Science at Ben-Gurion University, by a reintegration ( IRG ) grant PIRG07-GA-2010-268310 under the European Community's FP7 Programme, and by the Israel Science Foundation (grant number 857/12 ).

Publisher Copyright:
© 2014 Elsevier B.V. All rights reserved.


  • Behavioral programming
  • Live sequence charts
  • Logical execution time
  • Synchronization
  • Time scales


Dive into the research topics of 'Towards behavioral programming in distributed architectures'. Together they form a unique fingerprint.

Cite this