Abstract
This paper presents semantics, syntax, and tools for specification and verification of safety and liveness properties of behavioral programs. Verification is performed directly on program code, by traversing its transition system. Liveness properties are defined using “hot states”, in which scenarios are allowed to stay for a finite time, but not forever. Safety properties are defined using assertions which allow labeling program states as having violations, and by analyzing program states for deadlocks detection. The paper defines liveness violations with regards to specific program components and describes an approach for validating the absence of such violations is a system. The proposed approach is supported by BPjs, an open-source tool suite developed by the authors.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Code shown in this section is available in the code appendix [3].
- 2.
For this technically complex feat, BPjs relies in part on the Mozilla Rhino JavaScript engine [24]. For the work presented here, we expanded BPjs to support hot synchronization points, among other improvements. This work included code donations to Mozilla Rhino itself.
- 3.
See code appendix [3] for code and execution instructions.
- 4.
Sample execution logs are available at [3].
- 5.
Measurements were taken on a 2.9 GHz Intel Core i9 MacBook Pro with 32 GB RAM, of which 16 GB was allocated to Java. The JVM used was OpenJDK 18.9 (Java 11).
- 6.
BPjs visited state store is pluggable; other state stores exist as well.
- 7.
- 8.
Measurements were taken on a 2.9 GHz Intel Core i9 MacBook Pro with 32 GB RAM, of which 16 GB was allocated to Java. We used Java 8 (1.8.0_201), as JPF was not able to run on Java 11.
References
Runtime Verification Conference Website (2001–2019). http://www.runtime-verification.org/
A scenario based on-board software and testing environment for satellites. In: Proceedings of the 59th Israel Annual Conference on Aerospace Sciences (2019)
Appendix, Code: Verification of Liveness and Safety Properties of Behavioral Programs Using BPjs. Zenodo, July 2020. https://doi.org/10.5281/zenodo.3967250
Aljamaan, H., Garzon, M., Lethbridge, T.: UmpleRun: a dynamic analysis tool for textually modeled state machines using umple. In: EXE@MoDELS, pp. 16–20 (2015)
Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, Cambridge (2008)
Bar-Sinai, M.: BP visual running examples code repository (2019). https://github.com/bthink-bgu/VisualRunningExamples
Bar-Sinai, M., Weiss, G.: Code Appendix for “BPjs - A Behavioral Programming Tool Suite” (2018). https://github.com/michbarsinai/BPjs-SCP-OSP_CodeAppendix
Bar-Sinai, M., Weiss, G., Marron, A.: Defining semantic variations of diagrammatic languages using behavioral programming and queries. In: EXE@MoDELS (2016)
Bar-Sinai, M., Weiss, G., Shmuel, R.: BPjs: an extensible, open infrastructure for behavioral programming research. In: Proceedings of the 21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings, MODELS 2018, Copenhagen, Denmark, 14–19 October 2018, pp. 59–60 (2018). https://doi.org/10.1145/3270112.3270126
Beyer, D.: Advances in automatic software verification: SV-COMP 2020. In: TACAS 2020. LNCS, vol. 12079, pp. 347–367. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45237-7_21
Damm, W., Harel, D.: LSCs: breathing life into message sequence charts. Formal Methods Syst. Des. 19(1), 45–80 (2001). https://doi.org/10.1023/A:1011227529550
Gordon, M., Marron, A., Meerbaum-Salant, O.: Spaghetti for the main course?: observations on the naturalness of scenario-based programming. In: Proceedings of the 17th ACM Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE 2012). ACM, New York (2012). https://doi.org/10.1145/2325296.2325346
Greenyer, J., Bar-Sinai, M., Weiss, G., Sadon, A., Marron, A.: Modeling and programming a leader-follower challenge problem with scenario-based tools. In: Hebig, R., Berger, T. (eds.) Proceedings of MODELS 2018 Workshops: ModComp, MRT, OCL, FlexMDE, EXE, COMMitMDE, MDETools, GEMOC, MORSE, MDE4IoT, MDEbug, MoDeVVa, ME, MULTI, HuFaMo, AMMoRe, PAINS co-located with ACM/IEEE 21st International Conference on Model Driven Engineering Languages and Systems (MODELS 2018), Copenhagen, Denmark, 14 October 2018. CEUR Workshop Proceedings, vol. 2245, pp. 376–385. CEUR-WS.org (2018). http://ceur-ws.org/Vol-2245/mdetools_paper_8.pdf
Harel, D., Katz, G.: Scaling-up behavioral programming: steps from basic principles to application architectures. In: Proceedings of the 4th International Workshop on Programming Based on Actors Agents & Decentralized Control, pp. 95–108. ACM (2014)
Harel, D., Lampert, R., Marron, A., Weiss, G.: Model-checking behavioral programs. In: Proceedings of 11th International Conference on Embedded Software (EMSOFT), pp. 279–288 (2011)
Harel, D., Marelly, R.: Come, Let’s Play: Scenario-Based Programming Using LSCs and the Play-Engine. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-642-19029-2
Harel, D., Marron, A., Weiss, G.: Programming coordinated behavior in Java. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 250–274. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14107-2_12
Harel, D., Marron, A., Weiss, G.: Behavioral programming. Comm. ACM 55(7) (2012)
Havelund, K., Pressburger, T.: Model checking Java programs using Java PathFinder. Int. J. Softw. Tools Technol. Transfer 2(4), 366–381 (2000). https://doi.org/10.1007/s100090050043
Holzmann, G.J.: The model checker SPIN. IEEE Trans. Softw. Eng. 23(5), 279–295 (1997). https://doi.org/10.1109/32.588521
Keller, R.M.: Formal verification of parallel programs. Commun. ACM 19(7), 371–384 (1976). https://doi.org/10.1145/360248.360251
Klose, J., Toben, T., Westphal, B., Wittke, H.: Check it out: on the efficient formal verification of live sequence charts. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 219–233. Springer, Heidelberg (2006). https://doi.org/10.1007/11817963_22
Lethbridge, T.C., Mussbacher, G., Forward, A., Badreddin, O.: Teaching UML using umple: applying model-oriented programming in the classroom. In: 2011 24th IEEE-CS Conference on Software Engineering Education and Training (CSEE T), pp. 421–428, May 2011. https://doi.org/10.1109/CSEET.2011.5876118
Mozilla, individual contributors: The Mozilla Rhino JavaScript Engine (2019). https://mozilla.org/rhino
Rodrigues da Silva, A.: Model-driven engineering. Comput. Lang. Syst. Struct. 43(C), 139–155 (2015). https://doi.org/10.1016/j.cl.2015.06.001
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Bar-Sinai, M., Weiss, G. (2021). Verification of Liveness and Safety Properties of Behavioral Programs Using BPjs. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation: Tools and Trends. ISoLA 2020. Lecture Notes in Computer Science(), vol 12479. Springer, Cham. https://doi.org/10.1007/978-3-030-83723-5_14
Download citation
DOI: https://doi.org/10.1007/978-3-030-83723-5_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-83722-8
Online ISBN: 978-3-030-83723-5
eBook Packages: Computer ScienceComputer Science (R0)