Skip to main content

Verification of Liveness and Safety Properties of Behavioral Programs Using BPjs

  • Conference paper
  • First Online:
Leveraging Applications of Formal Methods, Verification and Validation: Tools and Trends (ISoLA 2020)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Code shown in this section is available in the code appendix [3].

  2. 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. 3.

    See code appendix [3] for code and execution instructions.

  4. 4.

    Sample execution logs are available at [3].

  5. 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. 6.

    BPjs visited state store is pluggable; other state stores exist as well.

  7. 7.

    https://www.graalvm.org.

  8. 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

  1. Runtime Verification Conference Website (2001–2019). http://www.runtime-verification.org/

  2. A scenario based on-board software and testing environment for satellites. In: Proceedings of the 59th Israel Annual Conference on Aerospace Sciences (2019)

    Google Scholar 

  3. Appendix, Code: Verification of Liveness and Safety Properties of Behavioral Programs Using BPjs. Zenodo, July 2020. https://doi.org/10.5281/zenodo.3967250

  4. 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)

    Google Scholar 

  5. Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, Cambridge (2008)

    Google Scholar 

  6. Bar-Sinai, M.: BP visual running examples code repository (2019). https://github.com/bthink-bgu/VisualRunningExamples

  7. Bar-Sinai, M., Weiss, G.: Code Appendix for “BPjs - A Behavioral Programming Tool Suite” (2018). https://github.com/michbarsinai/BPjs-SCP-OSP_CodeAppendix

  8. Bar-Sinai, M., Weiss, G., Marron, A.: Defining semantic variations of diagrammatic languages using behavioral programming and queries. In: EXE@MoDELS (2016)

    Google Scholar 

  9. 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

  10. 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

    Chapter  Google Scholar 

  11. 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

    Article  MATH  Google Scholar 

  12. 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

  13. 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

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. 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

  17. 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

    Chapter  Google Scholar 

  18. Harel, D., Marron, A., Weiss, G.: Behavioral programming. Comm. ACM 55(7) (2012)

    Google Scholar 

  19. 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

  20. Holzmann, G.J.: The model checker SPIN. IEEE Trans. Softw. Eng. 23(5), 279–295 (1997). https://doi.org/10.1109/32.588521

  21. Keller, R.M.: Formal verification of parallel programs. Commun. ACM 19(7), 371–384 (1976). https://doi.org/10.1145/360248.360251

  22. 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

  23. 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

  24. Mozilla, individual contributors: The Mozilla Rhino JavaScript Engine (2019). https://mozilla.org/rhino

  25. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Bar-Sinai .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics