Skip to main content

Combining Model Learning and Model Checking to Analyze Java Libraries

  • 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))

  • 526 Accesses

Abstract

In the current technological era, the correct functionality and quality of software systems are of prime concern and require practical approaches to improve their reliability. Besides classical testing, formal verification techniques can be employed to enhance the reliability of software systems. In this connection, we propose an approach that combines the strengths of two effective techniques, i.e., Model learning and Model checking for the formal analysis of Java libraries. To evaluate the performance of the proposed approach, we consider the implementation of “Java.util” package as a case study. First, we apply model learning to infer behavior models of Java package and then use model checking to verify that the obtained models satisfy basic properties (safety, functional, and liveness) specified in LTL/CTL languages. Our results of the formal analysis reveal that the learned models of Java package satisfy all the selected properties specified in temporal logic. Moreover, the proposed approach is generic and very promising to analyze any software library/package considered as a black-box.

This work is supported by the National Natural Science Foundation of China (NSFC) under Grant No. 61872016 and by the National Key Research and Development Program of China under Grant No. 2016YFB1000804.

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.

    https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html.

  2. 2.

    https://learnlib.de/.

  3. 3.

    https://learnlib.de/projects/automatalib/.

  4. 4.

    https://www.graphviz.org.

  5. 5.

    http://nusmv.fbk.eu/.

  6. 6.

    https://github.com/bazali/SATE2019.

  7. 7.

    https://github.com/bazali/SATE2019/tree/master/APPENDICES

  8. 8.

    https://github.com/bazali/SATE2019/tree/master/SMVModels.

References

  1. Aarts, F., De Ruiter, J., Poll, E.: Formal models of bank cards for free. In: 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 461–468. IEEE (2013)

    Google Scholar 

  2. Aarts, F., Jonsson, B., Uijen, J.: Generating models of infinite-state communication protocols using regular inference with abstraction. ICTSS 6435, 188–204 (2010)

    MATH  Google Scholar 

  3. Aarts, F., Schmaltz, J., Vaandrager, F.: Inference and abstraction of the biometric passport. In: Margaria, T., Steffen, B. (eds.) ISoLA 2010. LNCS, vol. 6415, pp. 673–686. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16558-0_54

    Chapter  Google Scholar 

  4. Aarts, F.D.: Tomte: bridging the gap between active learning and real-world systems. [Sl: sn] (2014)

    Google Scholar 

  5. Angluin, D.: Learning regular sets from queries and counterexamples. Inf. Comput. 75(2), 87–106 (1987). https://doi.org/10.1016/0890-5401(87)90052-6

    Article  MathSciNet  MATH  Google Scholar 

  6. Arbab, F.: Reo: a channel-based coordination model for component composition. Math. Struct. Comput. Sci. 14(3), 329–366 (2004)

    Article  MathSciNet  Google Scholar 

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

    MATH  Google Scholar 

  8. Ball, T., Rajamani, S.K.: The SLAM project: debugging system software via static analysis. In: ACM SIGPLAN Notices, vol. 37, pp. 1–3. ACM (2002)

    Google Scholar 

  9. Broy, M., Jonsson, B., Katoen, J.-P., Leucker, M., Pretschner, A. (eds.): Model-Based Testing of Reactive Systems. LNCS, vol. 3472. Springer, Heidelberg (2005). https://doi.org/10.1007/b137241

    Book  MATH  Google Scholar 

  10. Chalupar, G., Peherstorfer, S., Poll, E., De Ruiter, J.: Automated reverse engineering using lego®. In: WOOT 2014, pp. 1–10 (2014)

    Google Scholar 

  11. Cimatti, A., et al.: NuSMV 2: an OpenSource tool for symbolic model checking. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 359–364. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45657-0_29

    Chapter  Google Scholar 

  12. Clarke, E.M., Grumberg, O., Peled, D.: Model Checking. MIT Press, Cambridge (1999)

    MATH  Google Scholar 

  13. De Ruiter, J., Poll, E.: Protocol state fuzzing of TLS implementations. In: USENIX Security Symposium, pp. 193–206 (2015)

    Google Scholar 

  14. Fiterău-Broştean, P., Janssen, R., Vaandrager, F.: Learning fragments of the TCP network protocol. In: Lang, F., Flammini, F. (eds.) FMICS 2014. LNCS, vol. 8718, pp. 78–93. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10702-8_6

    Chapter  Google Scholar 

  15. Fiterău-Broştean, P., Janssen, R., Vaandrager, F.: Combining model learning and model checking to analyze TCP implementations. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9780, pp. 454–471. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-41540-6_25

    Chapter  Google Scholar 

  16. Fiterău-Broştean, P., Lenaerts, T., Poll, E., de Ruiter, J., Vaandrager, F., Verleg, P.: Model learning and model checking of SSH implementations. In: Proceedings of the 24th ACM SIGSOFT International SPIN Symposium on Model Checking of Software, pp. 142–151. ACM (2017)

    Google Scholar 

  17. Fujiwara, S., Bochmann, G.V., Khendek, F., Amalou, M., Ghedamsi, A.: Test selection based on finite state models. IEEE Trans. Softw. Eng. 17(6), 591–603 (1991)

    Article  Google Scholar 

  18. Hungar, H., Niese, O., Steffen, B.: Domain-specific optimization in automata learning. In: Hunt, W.A., Somenzi, F. (eds.) CAV 2003. LNCS, vol. 2725, pp. 315–327. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45069-6_31

    Chapter  Google Scholar 

  19. Lorenzoli, D., Mariani, L., Pezzè, M.: Automatic generation of software behavioral models. In: Proceedings of the 30th International Conference on Software Engineering, pp. 501–510. ACM (2008)

    Google Scholar 

  20. Meinke, K., Sindhu, M.A.: Incremental learning-based testing for reactive systems. In: Gogolla, M., Wolff, B. (eds.) TAP 2011. LNCS, vol. 6706, pp. 134–151. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21768-5_11

    Chapter  Google Scholar 

  21. Müller-Olm, M., Schmidt, D., Steffen, B.: Model-checking. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 330–354. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48294-6_22

    Chapter  Google Scholar 

  22. Niese, O.: An integrated approach to testing complex systems. Ph.D. thesis, Technical University of Dortmund, Germany (2003)

    Google Scholar 

  23. Peled, D., Vardi, M.Y., Yannakakis, M.: Black box checking. J. Autom. Lang. Comb. 7(2), 225–246 (2002)

    MathSciNet  MATH  Google Scholar 

  24. Shahbaz, M.: Reverse engineering enhanced state models of black box software components to support integration testing. Ph.D. thesis (2008)

    Google Scholar 

  25. Smeenk, W.: Applying automata learning to complex industrial software. Master’s thesis, Radboud University Nijmegen (2012)

    Google Scholar 

  26. Steffen, B., Howar, F., Merten, M.: Introduction to active automata learning from a practical perspective. In: Bernardo, M., Issarny, V. (eds.) SFM 2011. LNCS, vol. 6659, pp. 256–296. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21455-4_8

    Chapter  Google Scholar 

  27. Vaandrager, F.: Model learning. Commun. ACM 60(2), 86–95 (2017). https://doi.org/10.1145/2967606. http://dl.acm.org/citation.cfm?doid=3042068.2967606

    Article  Google Scholar 

  28. Walkinshaw, N., Bogdanov, K., Ali, S., Holcombe, M.: Automated discovery of state transitions and their functions in source code. Softw. Test. Verif. Reliab. 18(2), 99–121 (2008)

    Article  Google Scholar 

  29. Walkinshaw, N., Bogdanov, K., Holcombe, M., Salahuddin, S.: Reverse engineering state machines by interactive grammar inference. In: 14th Working Conference on Reverse Engineering, WCRE 2007, pp. 209–218. IEEE (2007)

    Google Scholar 

  30. Xiao, H.: Automatic model learning and its applications in malware detection (2017)

    Google Scholar 

Download references

Acknowledgment

We are thankful to Mr. Markus Frohme from TU Dortmund University for constructive discussion on LearnLib and AutomataLib libraries. We are also grateful to Mr. Paul Fiterau-Brostean for assisting in converting the learned model (.dot format) to NuSMV format (.smv).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yongwang Zhao .

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

Ali, S., Sun, H., Zhao, Y. (2020). Combining Model Learning and Model Checking to Analyze Java Libraries. 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_18

Download citation

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

  • 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