Skip to main content

A Divide & Conquer Approach to Testing Concurrent Java Programs with JPF and Maude

  • Conference paper
  • First Online:
Structured Object-Oriented Formal Language and Method (SOFL+MSVL 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12028))

Abstract

The paper proposes a new testing technique for concurrent programs. The technique is basically a specification-based testing one. For a formal specification S and a concurrent program P, state sequences are generated from P and checked to be accepted by S. We suppose that S is specified in Maude and P is implemented in Java. Java Pathfinder (JPF) and Maude are then used to generate state sequences from P and to check if such state sequences are accepted by S, respectively. Even without checking any property violations with JPF, JPF often encounters the notorious state space explosion while only generating state sequences. Thus, we propose a technique to generate state sequences from P and check if such state sequences are accepted by S in a stratified way. Some experiments demonstrate that the proposed technique mitigates the state space explosion instances from which otherwise only one JPF instance cannot suffice.

This work was supported in part by JSPS KAKENHI Grant Number JP19H04082.

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

References

  1. Arora, V., Bhatia, R.K., Singh, M.: A systematic review of approaches for testing concurrent programs. Concurr. Comput.: Pract. Exp. 28(5), 1572–1611 (2016). https://doi.org/10.1002/cpe.3711

    Article  Google Scholar 

  2. Choudhary, A., Lu, S., Pradel, M.: Efficient detection of thread safety violations via coverage-guided generation of concurrent tests. In: 39th ICSE, pp. 266–277 (2017). https://doi.org/10.1109/ICSE.2017.32

  3. Clavel, M., et al.: Some tools. All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350, pp. 667–693. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71999-1_21

    Chapter  Google Scholar 

  4. Do, C.M., Ogata, K.: Specification-based testing with simulation relations. In: 31st SEKE. KSI Research Inc. (2019, to appear)

    Google Scholar 

  5. Huang, J.: Stateless model checking concurrent programs with maximal causality reduction. In: 36th PLDI, pp. 165–174 (2015). https://doi.org/10.1145/2737924.2737975

  6. Kurita, T., Chiba, M., Nakatsugawa, Y.: Application of a formal specification language in the development of the “Mobile FeliCa” IC chip firmware for embedding in mobile phone. In: Cuellar, J., Maibaum, T., Sere, K. (eds.) FM 2008. LNCS, vol. 5014, pp. 425–429. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68237-0_31

    Chapter  Google Scholar 

  7. Metzler, P., Saissi, H., Bokor, P., Suri, N.: Quick verification of concurrent programs by iteratively relaxed scheduling. In: 32nd ASE, pp. 776–781 (2017). https://doi.org/10.1109/ASE.2017.8115688

  8. Ogata, K.: Model checking designs with CafeOBJ - a contrast with a software model checker. Workshop on Formal Method and Internet of Mobile Things, ECNU, Shanghai, China (2014)

    Google Scholar 

  9. Ogata, K., Futatsugi, K.: Simulation-based verification for invariant properties in the OTS/CafeOBJ method. ENTCS 201, 127–154 (2007). Refine 2007

    Google Scholar 

  10. Visser, W., Havelund, K., Brat, G.P., Park, S., Lerda, F.: Model checking programs. Autom. Softw. Eng. 10(2), 203–232 (2003). https://doi.org/10.1023/A:1022920129859

    Article  Google Scholar 

  11. Yi, Q., Huang, J.: Concurrency verification with maximal path causality. In: 26th FSE/17th ESEC, pp. 366–376 (2018). https://doi.org/10.1145/3236024.3236048

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Canh Minh Do .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Minh Do, C., Ogata, K. (2020). A Divide & Conquer Approach to Testing Concurrent Java Programs with JPF and Maude. In: Miao, H., Tian, C., Liu, S., Duan, Z. (eds) Structured Object-Oriented Formal Language and Method. SOFL+MSVL 2019. Lecture Notes in Computer Science(), vol 12028. Springer, Cham. https://doi.org/10.1007/978-3-030-41418-4_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-41418-4_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-41417-7

  • Online ISBN: 978-3-030-41418-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics