Abstract
Following the scenario-based approach to programming which centered around live sequence charts (LSCs), we propose a general approach to software development in Java. A program will consist of modules called behavior threads (b-threads ), each of which independently describes a scenario that may cross object boundaries. We identify a protocol and a coordination mechanism that allow such behavioral programming. Essentially, runs of programs are sequences of events that result from three kinds of b-thread actions: requesting that events be considered for triggering, waiting for triggered events, and blocking events requested by other b-threads. The coordination mechanism synchronizes and interlaces b-threads execution yielding composite, integrated system behavior. The protocol idioms and the coordination mechanism of b-threads are implemented as a Java library called BPJ. Throughout the exposition we illustrate benefits of the approach and discuss the merits of behavioral programming as a broad, implementation-independent paradigm.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in ERLANG. PrenticeHall, Englewood Cliffs (1993)
Atir, Y., Harel, D.: Using LSCs for scenario authoring in tactical simulators. In: SCSC, pp. 437–442 (2007)
Berry, G.: The foundations of Esterel. In: Proof, Language, and Interaction, pp. 425–454 (2000)
Bunker, A., Gopalakrishnan, G., Slind, K.: Live sequence charts applied to hardware requirements specification and verification. STTT 7(4), 341–350 (2005)
Combes, P., Harel, D., Kugler, H.: Modeling and verification of a telecommunication application using live sequence charts and the play-engine tool. Software and System Modeling 7(2), 157–175 (2008)
Crowley, K., Siegler, R.S.: Flexible Strategy Use in Young Children’s Tic-Tac-Toe. Cognitive Science 17(4), 531–561 (1993)
Damm, W., Harel, D.: LSCs: Breathing Life into Message Sequence Charts. J. on Formal Methods in System Design 19(1), 45–80 (2001)
Eugster, P., Felber, P., Guerraoui, R., Kermarrec, A.: The Many Faces of Publish/Subscribe. ACM Computing Surveys 35(2), 114–131 (2003)
Fisher, J., Harel, D., Hubbard, E.J.A., Piterman, N., Stern, M.J., Swerdlin, N.: Combining state-based and scenario-based approaches in modeling biological systems. In: Danos, V., Schachter, V. (eds.) CMSB 2004. LNCS (LNBI), vol. 3082, pp. 236–241. Springer, Heidelberg (2005)
Giarratano, J., Riley, G.: Expert systems: principles and programming. Brooks/Cole Publishing Co., Pacific Grove (1989)
Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The Synchronous Data-Flow Programming Language LUSTRE. Proc. IEEE 79(9), 1305–1320 (1991)
Harel, D.: Can Programming Be Liberated, Period? IEEE Computer 41(1), 28–37 (2008)
Harel, D., Kleinbort, A., Maoz, S.: S2A: A compiler for multi-modal UML sequence diagrams. In: FSE, pp. 121–124 (2007)
Harel, D., Kugler, H., Marelly, R., Pnueli, A.: Smart Play-out of Behavioral Requirements. In: Aagaard, M.D., O’Leary, J.W. (eds.) FMCAD 2002. LNCS, vol. 2517, pp. 378–398. Springer, Heidelberg (2002)
Harel, D., Kugler, H., Weiss, G.: Some Methodological Observations Resulting from Experience Using LSCs and the Play-In/Play-Out Approach. In: Scenarios: Models, Transformations and Tools, pp. 26–42 (2003)
Harel, D., Marelly, R.: Come, Let’s Play: Scenario-Based Programming Using LSCs and the Play-Engine. Springer, Heidelberg (2003)
Harel, D., Marron, A., Weiss, G.: Behavioral Programming (in preparation)
Harel, D., Marron, A., Weiss, G.: The BPJ Library, http://www.cs.bgu.ac.il/~geraw
Harel, D., Segall, I.: Planned and Traversable Play-Out: A Flexible Method for Executing Scenario-Based Programs. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 485–499. Springer, Heidelberg (2007)
Hoare, C.A.R.: Communicating Sequential Processes. CACM 21(8), 666–677 (1978)
Houssais, B.: The synchronous prog. language SIGNAL, a tutorial. In: IRISA (2002)
ITU. International Telecommunication Union Recommendation Z.120: Message Sequence Charts (1996)
Jagadish, H.V., Mendelzon, A.O., Mumick, I.S.: Managing Conflicts Between Rules. J. Comput. Syst. Sci. 58(1), 13–28 (1999)
Keller, R.: Formal verification of parallel programs. CACM 19(7), 371–384 (1976)
Kitchin, D., Quark, A., Cook, W., Misra, J.: The Orc Programming Language. In: FMOODS/FORTE, pp. 1–25 (2009)
LabVIEW. Getting Started with LabVIEW (June 2009)
Maoz, S., Harel, D.: From multi-modal scenarios to code: compiling LSCs into AspectJ. In: FSE, pp. 219–230 (2006)
Milner, R.: A Calculus of Communicating Systems. LNCS, vol. 92. Springer, Heidelberg (1980)
Milner, R., Parrow, J., Walker, D.: A Calculus of Mobile Processes. Inf. Comput. 100(1), 1–40 (1992)
Misra, J.: A foundation of parallel programming. In: International Summer School on Constructive Methods in Computer Science, pp. 397–433 (1988)
OASIS. Web Services Business Process Execution Language V2.0 (May 2007)
OMG. Unified Modeling Language Superstructure Specification, v2.0 (August 2005)
Sadot, A., Fisher, J., Barak, D., Admanit, Y., Stern, M.J., Hubbard, E.J.A., Harel, D.: Toward Verified Biological Models. IEEE/ACM Trans. Comput. Biology Bioinform. 5(2), 223–234 (2008)
TheMathWorks. The Simulink 7 Reference (2009)
Visser, W., Havelund, K., Brat, G., Park, S., Lerda, F.: Model Checking Programs. Automated Software Engineering 10, 203–232 (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Harel, D., Marron, A., Weiss, G. (2010). Programming Coordinated Behavior in Java. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_12
Download citation
DOI: https://doi.org/10.1007/978-3-642-14107-2_12
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14106-5
Online ISBN: 978-3-642-14107-2
eBook Packages: Computer ScienceComputer Science (R0)