Skip to main content
Log in

Extracting finite state representation of Java programs

  • Regular Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

We present a static analysis-based technique for reverse engineering finite state machine models from a large subset of sequential Java programs. Our approach enumerates all feasible program paths in a class using symbolic execution and records execution summary for each path. Subsequently, it creates states and transitions by analyzing symbolic execution summaries. Our approach also detects any unhandled exceptions.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. Symbolic execution has inherent limitations, which makes it infeasible to explore all paths of an arbitrary method in the presence of loops and recursions. We discuss implementation details of our symbolic execution engine in Sect. 4.

References

  1. Beydeda, S., Gruhn, V.: Black- and white-box self-testing cots components. In: International Conference on Software Engineering and Knowledge Engineering, pp. 104–109 (2004)

  2. Corbett, J.C., Dwyer, M.B., Hatcliff, J., Laubach, S., Pasareanu, C.S., Zheng, H.: Bandera: extracting finite-state models from Java source code. In: Proceedings of ICSE, pp. 439–448 (2000)

  3. Dallmeier, V., Lindig, C., Wasylkowski, A., Zeller, A.: Mining object behavior with ADABU. In: Proceedings of the 2006 International Workshop on Dynamic Systems Analysis, WODA ’06, pp. 17–24 (2006)

  4. Guéhéneuc, Y.G.: Automated reverse-engineering of UML v2.0 dynamic models. In: Proceedings of the 6th ECOOP Workshop on Object-Oriented Reengineering (2005)

  5. Gallagher, L., Offutt, J., Cincotta, A.: Integration testing of object-oriented components using finite state machines. Softw. Test. Verif. Reliab. 16(4), 215–266 (2006)

    Article  Google Scholar 

  6. Harel, D.: Statecharts: A visual formalism for complex systems. Sci. Comput. Program. 8(3) (1987)

  7. Graphviz—graph visualization software. http://www.graphviz.org

  8. Java pathfinder. http://goo.gl/reTQe

  9. King, J.C.: Symbolic execution and program testing. Commun. ACM 19, 385–394 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  10. Koskimies, K., Mäkinen, E.: Automatic synthesis of state machines from trace diagrams. Softw. Pract. Exp. 24(7), 643–658 (1994)

  11. Koskimies, K., Systa, T., Tuomi, J., Mannisto, T.: Automated support for modeling OO software. Software, IEEE 15(1), 87–94 (1998)

    Article  Google Scholar 

  12. Kung, D.C., Suchak, N., Gao, J., Hsia, P., Toyoshima, Y., Chen, C.: On object state testing. In: Proceedings of Computer Software and Applications Conference, pp. 222–227. IEEE Computer Society Press (1994)

  13. Larsen, L. Harrold, M.J.: Slicing object-oriented software. In: ICSE, pp. 495–505 (1996)

  14. Logozzo, F., Fähndrich, M.: On the relative completeness of bytecode analysis versus source code analysis. In: Proceedings of CC ’08, LNCS (2008)

  15. Pasareanu, C.S., Mehlitz, P.C., Bushnell, D.H., Gundy-Burlet, K., Lowry, M.R., Person, S., Pape, M.: Combining unit-level symbolic execution and system-level concrete execution for testing nasa software. In: ISSTA, pp. 15–26 (2008)

  16. Peterson, J.L.: Petri Net Theory and the Modeling of Systems. Prentice Hall PTR, Upper Saddle River (1981)

    MATH  Google Scholar 

  17. Sen, T., Mall, R.: State-model-based regression test reduction for component-based software. ISRN J. Softw. Eng. 2012, 1–9 (2012). Article No 561502. doi:10.5402/2012/561502

  18. Somé, S.S., Lethbridge, T.: Enhancing program comprehension with recovered state models. In: IWPC, pp. 85–96 (2002)

  19. Suman, R.R., Mall, R., Sukumaran, S., Satpathy, M.: Extracting state models for black-box software components. J. Object Technol. 9(3), 79–103 (2010)

    Article  Google Scholar 

  20. Systä, T., Koskimies, K., Müller, H.: Shimba-an environment for reverse engineering java software systems. Softw. Pract. Exp. 31(4), 371–394 (2001)

    Article  MATH  Google Scholar 

  21. Tonella, P., Potrich, A.: Reverse Engineering of Object Oriented code. Springer, Berlin (2005)

    MATH  Google Scholar 

  22. Wagner, S., Jürjens, J.: Model-based identification of fault-prone components. In: EDCC, pp. 435–452 (2005)

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

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

  25. Xie, T., Marinov, D., Schulte, W., Notkin, D.: Symstra: A framework for generating object-oriented unit tests using symbolic execution. In: Proceedings of the 11th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS’05, pp. 365–381 (2005)

  26. Xie, T., Notkin, D.: Automatic extraction of object-oriented observer abstractions from unit-test executions. In: ICFEM, pp. 290–305 (2004)

Download references

Acknowledgments

We are thankful to the anonymous reviewers who provided thoughtful comments on our work which, we believe, have greatly enriched this work.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tamal Sen.

Additional information

Communicated by Prof. Gary Leavens.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sen, T., Mall, R. Extracting finite state representation of Java programs. Softw Syst Model 15, 497–511 (2016). https://doi.org/10.1007/s10270-014-0415-3

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-014-0415-3

Keywords

Navigation