StaticGen: Static Generation of UML Sequence Diagrams

  • Chris AlvinEmail author
  • Brian  Peterson
  • Supratik Mukhopadhyay
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10202)


UML sequence diagrams are visual representations of object interactions in a system and can provide valuable information for program comprehension, debugging, maintenance, and software archeology. Sequence diagrams generated from legacy code are independent of existing documentation that may have eroded. We present a framework for static generation of UML sequence diagrams from object-oriented source code. The framework provides a query refinement system to guide the user to interesting interactions in the source code. Our technique involves constructing a hypergraph representation of the source code, traversing the hypergraph with respect to a user-defined query, and generating the corresponding set of sequence diagrams. We implemented our framework as a tool, StaticGen, analyzing a corpus of 30 Android applications. We provide experimental results demonstrating the efficacy of our technique.


Source Code Target Node Sequence Diagram Code Base Execution Path 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    List of Open-Source Android Apps (2013).
  2. 2.
    Alur, R., Etessami, K., Yannakakis, M.: Inference of message sequence charts. In: ICSE 2000, pp. 304–313 (2000).
  3. 3.
    Alvin, C., Peterson, B., Mukhopadhyay, S.: \(\sf StaticGen\): Static Generation of UML Sequence Diagrams - Technical Report (2017).
  4. 4. Introduction to Architexa—Sequence Diagram Generation (2015).
  5. 5.
    Bedrin, D.: jtracert (2015).
  6. 6.
    Berge, C.: Graphs and Hypergraphs, vol. 45. North-Holland Mathematical Library, Elsevier Science Publishers B.V. (1989)Google Scholar
  7. 7.
    Burén, R.: BlueBlog. Accessed 16 Oct 2016
  8. 8.
    Dowling, W.F., Gallier, J.H.: Linear-time algorithms for testing the satisfiability of propositional horn formulae. J. Log. Program. 1(3), 267–284 (1984).–1 MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Eclipse Foundation Inc: Eclipse (2015).
  10. 10.
    Gestwicki, P.V., Jayaraman, B.: JIVE: Java interactive visualization environment. In: OOPSLA 2004, pp. 226–228. ACM, New York (2004).
  11. 11.
    Harel, D., Thiagarajan, P.: Message sequence charts. In: Lavagno, L., Martin, G., Selic, B. (eds.) UML for Real: Design of Embedded Real-time Systems, 1st edn. Kluwer Academic Publishers (2003)Google Scholar
  12. 12.
    Ishio, T., Watanabe, Y., Inoue, K.: AMIDA: A sequence diagram extraction toolkit supporting automatic phase detection. In: ICSE 2008, pp. 969–970 (2008).
  13. 13.
    Jerding, D.F., Stasko, J.T., Ball, T.: Visualizing interactions in program executions. In: ICSE 1997, pp. 360–370 (1997).
  14. 14.
    Korshunova, E., Petkovic, M., van den Brand, M.G.J., Mousavi, M.R.: CPP2XMI: Reverse engineering of UML class, sequence, and activity diagrams from C++ source code. In: WCRE 2006, pp. 297–298 (2006).
  15. 15.
    Kroening, D.: goto-cc–A C/C++ Front-End for Verification (2015).
  16. 16.
    Kumar, S., Khoo, S., Roychoudhury, A., Lo, D.: Mining message sequence graphs. In: ICSE 2011, pp. 91–100 (2011).
  17. 17.
    Kumar, S., Khoo, S., Roychoudhury, A., Lo, D.: Inferring class level specifications for distributed systems. In: ICSE 2012, pp. 914–924 (2012).
  18. 18.
    Leucker, M., Madhusudan, P., Mukhopadhyay, S.: Dynamic message sequence charts. In: Agrawal, M., Seth, A. (eds.) FSTTCS 2002. LNCS, vol. 2556, pp. 253–264. Springer, Heidelberg (2002). doi: 10.1007/3-540-36206-1_23 CrossRefGoogle Scholar
  19. 19.
    Livshits, V.B., Lam, M.S.: Finding security vulnerabilities in java applications with static analysis. In: SSYM 2005, pp. 18–18. USENIX Association, Berkeley (2005).
  20. 20.
    Lo, D., Maoz, S.: Mining scenario-based triggers and effects. In: ASE 2008, pp. 109–118 (2008).
  21. 21.
    Lo, D., Maoz, S.: Mining hierarchical scenario-based specifications. In: ASE 2009, pp. 359–370 (2009).
  22. 22.
    Lo, D., Maoz, S., Khoo, S.: Mining modal scenario-based specifications from execution traces of reactive systems. In: ASE 2007, pp. 465–468 (2007).
  23. 23. Visualize Code on Sequence Diagrams (2015).
  24. 24.
    Myers, D., Storey, M.A.: Using dynamic analysis to create trace-focused user interfaces for IDEs. In: FSE 2010, pp. 367–368. ACM, New York (2010).
  25. 25. UML Explorer (2015).
  26. 26.
    Roubtsov, S.A., Serebrenik, A., Mazoyer, A., van den Brand, M.G.J., Roubtsova, E.E.: I2SD: Reverse engineering sequence diagrams from enterprise java beans with interceptors. IET Softw. 7(3) (2013).
  27. 27.
    Rountev, A., Connell, B.H.: Object naming analysis for reverse-engineered sequence diagrams. In: ICSE 2005, pp. 254–263 (2005).
  28. 28.
    Rountev, A., Volgin, O., Reddoch, M.: Static control-flow analysis for reverse engineering of UML sequence diagrams. In: PASTE 2005, pp. 96–102 (2005).
  29. 29.
    Sable Research Group: Soot: A framework for Analyzing and Transforming Java and Android Applications (2015).
  30. 30.
    Sampaio, L.: Early Security Vulnerability Detector. Accessed 16 Oct 2016
  31. 31.
    Sampaio, L., Garcia, A.: Exploring context-sensitive data flow analysis for early vulnerability detection. J. Syst. Softw. 113, 337–361 (2016). CrossRefGoogle Scholar
  32. 32. Soyatec - Sequence diagram generation (2015).
  33. 33.
    Tonella, P., Potrich, A.: Reverse engineering of the interaction diagrams from C++ code. In: ICSM 2003, pp. 159–168 (2003).
  34. 34. Reverse Engineering Sequence Diagram from Java Source Code (2015).
  35. 35.
    Wikipedia: List of Free and Open-Source Android Applications (2015).
  36. 36.
    Ziadi, T., da Silva, M.A.A., Hillah, L., Ziane, M.: A fully dynamic approach to the reverse engineering of UML sequence diagrams. In: ICECCS 2011, pp. 107–116 (2011).

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  • Chris Alvin
    • 1
    Email author
  • Brian  Peterson
    • 2
  • Supratik Mukhopadhyay
    • 2
  1. 1.Bradley UniversityPeoriaUSA
  2. 2.Louisiana State University Baton RougeBaton RougeUSA

Personalised recommendations