Model-driven software development involves constructing behavioral models from informal English requirements. These models are then used to guide software construction. The compilation of behavioral models into software is the topic of many existing research works. There also exist a number of UML-based modeling tools which support such model compilation. In this paper, we show how Statechart models can be validated/debugged by (a) generating code from the Statechart models, (b) employing established software debugging methods like program slicing on the generated code, and (c) relating the program slice back to the Statechart level. Our study is presented concretely in terms of dynamic slicing of Java code produced from Statechart models. The slice produced at the code level is mapped back to the model level for enhanced design comprehension. We use the open-source JSlice tool for dynamic slicing of Java programs in our experiments. We present results on a wide variety of real-life control systems which are modeled as Statecharts (from the informal English requirements) and debugged using our methodology. We feel that our debugging methodology fits in well with design flows in model-driven software development.


Statecharts Traceability Debugging Slicing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Rhapsody tool. I-logix, inc. website,
  2. 2.
    Harel, D.: Statecharts: A visual formalism for complex systems. Science of Computer Programming 8(3), 231–274 (1987)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Agrawal, H., Horgan, J.: Dynamic program slicing. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (1990)Google Scholar
  4. 4.
    Korel, B., Laski, J.W.: Dynamic program slicing. Information Processing Letters 29(3), 155–163 (1988)CrossRefMATHGoogle Scholar
  5. 5.
    Heimdahl, M.P.E., Whalen, M.W.: Reduction and slicing of hierarchical state machines. In: Intl. Symp. on Foundations of Software Engineering (FSE) (1997)Google Scholar
  6. 6.
    Feldman, Y.A., Schneider, H.: Simulating reactive systems by deduction. ACM Transactions on Software Engineering and Methodology (TOSEM) 2(2) (1993)Google Scholar
  7. 7.
    Nguyen, K.D., Sun, Z., Thiagarajan, P.S., Wong, W.-F.: Model-driven SoC design via executable UML to systemc. In: IEEE Real-time Systems Symp (RTSS) (2004)Google Scholar
  8. 8.
    Wasowski, A.: On efficient program synthesis from statecharts. In: Intl. Conf. on Languages, Compilers and Tools for Embedded Systems (LCTES) (2003)Google Scholar
  9. 9.
    Kohler, H.J., Nickel, U., Niere, J., Zundorf, A.: Integrating UML diagrams for production control systems. In: Intl. Conf. on Software engineering (ICSE) (2000)Google Scholar
  10. 10.
    Harrison, W., Barton, C., Raghavachari, M.: Mapping UML designs to Java. In: Intl. Conf. on Object-oriented Prog. Sys. and Languages (OOPSLA) (2000)Google Scholar
  11. 11.
    Stateflow tool. The MathWorks, inc. website,
  12. 12.
    Harel, D., Gery, E.: Executable object modeling with statecharts. IEEE Computer 30(7) (1997)Google Scholar
  13. 13.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Addison-Wesley, Reading (1995)MATHGoogle Scholar
  14. 14.
    Wang, T., Roychoudhury, A.: Using compressed bytecode traces for slicing Java programs. In: Intl. Conf. on Software Engineering (ICSE) (2004)Google Scholar
  15. 15.
    Guo, L., Roychoudhury, A., Wang, T.: Accurately choosing execution runs for software fault localization. In: Mycroft, A., Zeller, A. (eds.) CC 2006. LNCS, vol. 3923, pp. 80–95. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  16. 16.
    Wang, T., Roychoudhury, A.: Hierarchical dynamic slicing. In: International Symposium on Software Testing and Analysis (ISSTA) (2007)Google Scholar
  17. 17.
    Shuttle_Control_System. New rail-technology Paderborn,
  18. 18.
    CTAS. Center TRACON automation system,
  19. 19.
  20. 20.
    JSlice: dynamic slicing tool for Java. T. Wang and A. Roychoudhury, National University of Singapore,
  21. 21.
    Wang, T., Roychoudhury, A.: Dynamic slicing on Java bytecode traces. ACM Transactions on Programming Languages and Systems (TOPLAS) 30(2) (2008)Google Scholar
  22. 22.
    Gyimóthy, T., Beszédes, Á., Forgács, I.: An efficient relevant slicing method for debugging. In: 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 303–321 (1999)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Liang Guo
    • 1
  • Abhik Roychoudhury
    • 1
  1. 1.School of ComputingNational University of SingaporeSingapore

Personalised recommendations