Skip to main content

Visualizing Data Flows in Computer Graphics Programs for Code Comprehension and Debugging

  • Conference paper
  • First Online:
Advances in Visual Computing (ISVC 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13598))

Included in the following conference series:

  • 589 Accesses

Abstract

OpenGL is the most widely used API and programming language in college-level computer graphics courses. However, OpenGL programs are difficult to comprehend and debug because they involve programming for both CPU and GPU and the data transfer between them. Modern OpenGL is a complex data flow machine with multiple programmable stages, and it is difficult to trace the partially hidden data flows in the source code written in C++, OpenGL, and OpenGL Shading Language. We have developed a web-based data visualization tool to analyze OpenGL source code and generate interactive data flow diagrams from the source code. The diagrams can help novice programmers build clear mental images of complex data flows. The source code viewer and the data flow diagram are synchronized so that a user can select an OpenGL API call, and the corresponding component in the data flow diagram is highlighted, and vice versa. A programmer can visually step through the data flows and detect specific bugs that are otherwise difficult to find. The main contribution of this paper is an interactive learning tool for computer graphics education.

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 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.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. diagrams.net (2022). https://github.com/jgraph/drawio. Accessed July 2022

  2. Angel, E., Shreiner, D.: Interactive Computer Graphics: A Top-Down Approach with Shader-Based OpenGL, 6 edn. Pearson (2011)

    Google Scholar 

  3. Apple: Metal (2022). https://developer.apple.com/documentation/metal. Accessed July 2022

  4. Asenov, D., Hilliges, O., Müller, P.: The effect of richer visualizations on code comprehension. In: Proceedings of the Conference on Human Factors in Computing Systems, pp. 5040–5045. ACM (2016)

    Google Scholar 

  5. Bacher, I., Namee, B.M., Kelleher, J.D.: On using tree visualisation techniques to support source code comprehension. In: Proceedings of the 2016 IEEE Working Conference on Software Visualization (VISSOFT), pp. 91–95. IEEE (2016)

    Google Scholar 

  6. Balreira, D.G., Walter, M., Fellner, D.W.: A survey of the contents in introductory computer graphics courses. Comput. Graph. 77, 88–96 (2018)

    Article  Google Scholar 

  7. Bedu, L., Tinh, O., Petrillo, F.: A tertiary systematic literature review on software visualization. In: Proceedings of the 7th IEEE Working Conference on Software Visualization (VISSOFT), pp. 33–44. IEEE (2019)

    Google Scholar 

  8. Blackwell, A.F., Petre, M., Church, L.: Fifty years of the psychology of programming. Int. J. Hum Comput Stud. 131, 52–63 (2019)

    Article  Google Scholar 

  9. Butler, K., et al.: Creating a user-centric data flow visualization: a case study. In: Yamamoto, S., Mori, H. (eds.) HCII 2019. LNCS, vol. 11569, pp. 174–193. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-22660-2_12

    Chapter  Google Scholar 

  10. Caserta, P., Zendra, O.: Visualization of the static aspects of software: a survey. IEEE Trans. Vis. Comput. Graph. 17, 913–933 (2011)

    Article  Google Scholar 

  11. Chotisarn, N., et al.: A systematic literature review of modern software visualization. J. Vis. 23, 539–558 (2020). https://doi.org/10.1007/s12650-020-00647-w

    Article  Google Scholar 

  12. Cornelissen, B., Zaidman, A., Deursen, A.V.: A controlled experiment for program comprehension through trace visualization. IEEE Trans. Softw. Eng. 37, 341–355 (2011)

    Article  Google Scholar 

  13. Cornelissen, B., Zaidman, A., Deursen, A.V., Moonen, L., Koschke, R.: A systematic survey of program comprehension through dynamic analysis. IEEE Trans. Softw. Eng. 35, 684–702 (2009)

    Article  Google Scholar 

  14. Dias, M., Orellana, D., Vidal, S., Merino, L., Bergel, A.: Evaluating a visual approach for understanding JavaScript source code. In: Proceedings of the IEEE/ACM International Conference on Program Comprehension, vol. 20, pp. 128–138. IEEE (2020)

    Google Scholar 

  15. Duru, H.A., Çakır, M.P., İşler, V.: How does software visualization contribute to software comprehension? A grounded theory approach. Int. J. Hum.-Comput. Interact. 29(11), 743–763 (2013)

    Article  Google Scholar 

  16. Fix, V., Wiedenbeck, S., Scholtz, J.: Mental representations of programs by novices and experts. In: Proceedings of the INTERACT 1993 and CHI 1993 Conference on Human Factors in Computing Systems, pp. 74–79. ACM (1993)

    Google Scholar 

  17. Ghaleb, T.A., Alturki, M.A., Aljasser, K.: Program comprehension through reverse-engineered sequence diagrams: a systematic review. J. Softw. Evol. Process 30, e1965 (2018)

    Article  Google Scholar 

  18. Hendrix, D., Cross, J.H., Maghsoodloo, S.: The effectiveness of control structure diagrams in source code comprehension activities. IEEE Trans. Softw. Eng. 28, 463–477 (2002)

    Article  Google Scholar 

  19. Jacobs, T., Musial, B.: Interactive visual debugging with UML. In: Proceedings of the 2003 ACM Symposium on Software Visualization, pp. 115–122. ACM (2003)

    Google Scholar 

  20. Klerkx, J., Verbert, K., Duval, E.: Enhancing learning with visualization techniques. In: Spector, J.M., Merrill, M.D., Elen, J., Bishop, M.J. (eds.) Handbook of Research on Educational Communications and Technology, pp. 791–807. Springer, New York (2014). https://doi.org/10.1007/978-1-4614-3185-5_64

    Chapter  Google Scholar 

  21. Koschke, R.: Software visualization in software maintenance, reverse engineering, and re-engineering: a research survey. J. Softw. Maint. Evol. 15, 87–109 (2003)

    Article  Google Scholar 

  22. Lemieux, F., Salois, M.: Visualization techniques for program comprehension - a literature review. In: Fujita, H., Mejri, M. (eds.) New Trends in Software Methodologies, Tools and Techniques, pp. 22–47. IOS Press (2006)

    Google Scholar 

  23. Lommerse, G., Nossin, F., Voinea, L., Telea, A.: The visual code navigator: an interactive toolset for source code investigation. In: Proceedings of the IEEE Symposium on Information Visualization (InfoVis), pp. 24–31. IEEE (2005)

    Google Scholar 

  24. Ma, L., Ferguson, J., Roper, M., Wood, M.: Investigating and improving the models of programming concepts held by novice programmers. Comput. Sci. Educ. 21, 57–80 (2011)

    Article  Google Scholar 

  25. Medeiros, R.P., Ramalho, G.L., Falcao, T.P.: A systematic literature review on teaching and learning introductory programming in higher education. IEEE Trans. Educ. 62, 77–90 (2019)

    Article  Google Scholar 

  26. Microsoft: Direct3D (2022). https://docs.microsoft.com/en-us/windows/win32/directx. Accessed July 2022

  27. Mysore, S., Mazloom, B., Agrawal, B., Sherwood, T.: Understanding and visualizing full systems with data flow tomography. SIGOPS Oper. Syst. Rev. 42, 211–221 (2008)

    Article  Google Scholar 

  28. Navarro-Prieto, R., Cañas, J.J.: Are visual programming languages better? The role of imagery in program comprehension. Int. J. Hum Comput Stud. 54, 799–829 (2001)

    Article  MATH  Google Scholar 

  29. Nguyen, H.T., et al.: Visualizing hierarchical performance profiles of parallel codes using CallFlow. IEEE Trans. Vis. Comput. Graph. 27, 2455–2468 (2021)

    Article  Google Scholar 

  30. Pancake, C.M., Utter, S.: Models for visualization in parallel debuggers. In: Proceedings of the 1989 ACM/IEEE Conference on Supercomputing, pp. 627–636 (1989)

    Google Scholar 

  31. Pennington, N.: Comprehension strategies in programming. In: Empirical Studies of Programmers: Second Workshop, pp. 100–113. Ablex Publishing Corp. (1987)

    Google Scholar 

  32. Pilskalns, O., Wallace, S., Ilas, F.: Runtime debugging using reverse-engineered UML. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) MODELS 2007. LNCS, vol. 4735, pp. 605–619. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-75209-7_41

    Chapter  Google Scholar 

  33. Podila, S., Zhu, Y.: A visualization tool for 3D graphics program comprehension and debugging. In: Proceedings of the IEEE Working Conference on Software Visualization (VISSOFT), pp. 111–115 (2016)

    Google Scholar 

  34. Price, B.A., Baecker, R.M., Small, I.S.: A principled taxonomy of software visualization. J. Vis. Lang. Comput. 4, 211–266 (1993)

    Article  Google Scholar 

  35. Robins, A., Rountree, J., Rountree, N.: Learning and teaching programming: a review and discussion. Comput. Sci. Educ. 13, 137–172 (2003)

    Article  Google Scholar 

  36. The Khronos Group: OpenGL (2022). https://www.khronos.org/opengl/. Accessed July 2022

  37. The Khronos Group: Vulkan (2022). https://www.vulkan.org/. Accessed July 2022

  38. The Khronos Group: WebGL (2022). https://www.khronos.org/webgl/. Accessed July 2022

  39. Umphress, D.A., Hendrix, T.D., Cross, J.H., Maghsoodloo, S.: Software visualizations for improving and measuring the comprehensibility of source code. Sci. Comput. Program. 60, 121–133 (2006)

    Article  MATH  Google Scholar 

  40. Šurkovský, M.: MP net as abstract model of communication for message-passing applications. In: Proceedings of the 16th ACM International Conference on Computing Frontiers, pp. 263–267. ACM (2019)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ying Zhu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zhu, Y. (2022). Visualizing Data Flows in Computer Graphics Programs for Code Comprehension and Debugging. In: Bebis, G., et al. Advances in Visual Computing. ISVC 2022. Lecture Notes in Computer Science, vol 13598. Springer, Cham. https://doi.org/10.1007/978-3-031-20713-6_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-20713-6_28

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-20712-9

  • Online ISBN: 978-3-031-20713-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics