Skip to main content

Towards Better Tool Support for Code Comprehension

  • Conference paper
  • First Online:
Composability, Comprehensibility and Correctness of Working Software (CEFP 2019)

Abstract

In software development, bug fixing and feature development requires a thorough understanding of all details and consequences of the planned changes. For long-existing large software systems, the code-base has been developed and maintained for decades by fluctuating teams, thus original intentions are lost, the documentation is untrustworthy or missing. Most times, the only reliable information is the code itself. Source code comprehension of such large software is an essential, but usually very challenging task. The comprehension process and approach of existing systems is fundamentally different from writing new software, and the usual development tools provide poor support in this area. Throughout the years, different tools have been developed with various complexity and feature set for code comprehension but none of them fulfilled all specific requirements yet. In this paper we discuss the most accepted models for code comprehension, the required feature set for tools supporting the comprehension process and the various approaches of existing solutions. We present CodeCompass – an open source LLVM/Clang based tool to help understanding large legacy software systems – in detail to analyse the required interface, possible design choices and implementation considerations. Based on the LLVM/Clang compiler infrastructure, CodeCompass gives exact information on complex C/C++ language elements such as inheritance, overloading, variable usage, possible function pointer and virtual function calls etc. These are all features for which various existing tools provide only partial support. Although CodeCompass supports mainly the C and C++ programming languages, it has a restricted support for Java and Python languages as well, therefore our investigation is language-independent.

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 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.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. Ferraro-Esparza, V., Gudmandsen, M., Olsson, K.: Ericsson telecom server platform 4. Ericsson Rev. 3, 104–113 (2002)

    Google Scholar 

  2. Enderin, M., LeCorney, D., Lindberg, M., Lundqvist, T.: Axe 810-the evolution continues. Ericsson Rev. 4, 10–23 (2001)

    Google Scholar 

  3. Karlsson, E.-A., Taxen, L.: Incremental development for AXE 10. In: Jazayeri, M., Schauer, H. (eds.) ESEC/SIGSOFT FSE -1997. LNCS, vol. 1301, pp. 519–520. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-63531-9_34

    Chapter  Google Scholar 

  4. Brunner, T.: CodeCompass: an extensible code comprehension framework. Eötvös Loránd University, Faculty of Informatics, Budapest, Tech. Rep. IK-TR1 (2018)

    Google Scholar 

  5. Szabó, C.: Programme of the winter school of project no.2017-1-sk01-ka203-035402: “focusing education on composability, comprehensibility and correctness of working software”. TUKE Kosice (2018) . Accessed 02 July 2019. https://kpi.fei.tuke.sk/sites/www2.kpi.fei.tuke.sk/files/personal/programme_of_the_first_intensive_programme_for_higher_education_learners_in_the_frame_of_the_project.pdf

  6. CodeCompass. https://github.com/Ericsson/CodeCompass

  7. Von Mayrhauser, A., Vans, A.M.: Program comprehension during software maintenance and evolution. Computer 28(8), 44–55 (1995)

    Article  Google Scholar 

  8. Storey, M.-A.: Theories, methods and tools in program comprehension: past, present and future. In: 13th International Workshop on Program Comprehension (IWPC2005), pp. 181–191. IEEE (2005)

    Google Scholar 

  9. O’brien, M.P.: Software comprehension-a review & research direction. Department of Computer Science & Information Systems University of Limerick, Ireland, Technical Report (2003)

    Google Scholar 

  10. Brooks, R.: Towards a theory of the cognitive processes in computer programming. Int. J. Man Mach. Stud. 9(6), 737–751 (1977)

    Article  Google Scholar 

  11. Soloway, E., Adelson, B., Ehrlich, K.: Knowledge and processes in the comprehension of computer programs. The Nature of Expertise, pp. 129–152 (1988)

    Google Scholar 

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

    Google Scholar 

  13. Shneiderman, B., Mayer, R.: Syntactic/semantic interactions in programmer behavior: a model and experimental results. Int. J. Comput. Inf. Sci. 8(3), 219–238 (1979)

    Article  MATH  Google Scholar 

  14. Levy, O., Feitelson, D.G.: Understanding large-scale software: a hierarchical view. In: Proceedings of the 27th International Conference on Program Comprehension, pp. 283–293. IEEE Press (2019)

    Google Scholar 

  15. Letovsky, S.: Cognitive processes in program comprehension. J. Syst. Softw. 7(4), 325–339 (1987)

    Article  Google Scholar 

  16. Marcus, A., Sergeyev, A., Rajlich, V., Maletic, J.I.: An information retrieval approach to concept location in source code. In: 11th Working Conference on Reverse Engineering, pp. 214–223. IEEE (2004)

    Google Scholar 

  17. Rajlich, V., Wilde, N.: The role of concepts in program comprehension. In: Proceedings 10th International Workshop on Program Comprehension, pp. 271–278. IEEE (2002)

    Google Scholar 

  18. 3GPP technical specifications. https://www.3gpp.org/specifications/79-specification-numbering

  19. Krzysztof, C., Eisenecker, U.W.: Generative Programming: Methods. Addison-Wesley, Tools and Applications (2000)

    MATH  Google Scholar 

  20. Hennert, L., Larruy, A.: TelORB- the distributed communications operating system. Ericsson Rev.(Engl. Ed.) 76(3), 156–167 (1999)

    Google Scholar 

  21. xxx

    Google Scholar 

  22. Apache thrift. https://Thrift.apache.org/

  23. Woboq. https://woboq.com/codebrowser.html

  24. Opengrok. https://opengrok.github.io/OpenGrok

  25. Doxygen. https://ctags.sourceforge.net

  26. Ctags. https://www.stack.nl/~dimitri/doxygen/

  27. Henderson-Sellers, B.: Object-oriented metrics: measures of complexity. Prentice-Hall Inc. (1995)

    Google Scholar 

  28. McCabe, T.J.: A complexity measure. IEEE Trans. Software Eng. 4, 308–320 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  29. CodeSurfer. https://www.grammatech.com/products/codesurfer

  30. The clang JSON compilation database format specification. https://clang.llvm.org/docs/JSONCompilationDatabase.html

  31. Fekete, A., Cserép, M.: Incremental parsing of large legacy C/C++ software. In: 21st International Multiconference on Information Society (IS), Collaboration, Software and Services in Information Society (CSS), vol. G, pp. 51–54 (2018)

    Google Scholar 

  32. Krupp, D., Orban, G., Horvath, G., Babati, B.: Industrial experiences with the clang static analysis toolset (2015)

    Google Scholar 

  33. Horváth, G., Pataki, N.: Clang matchers for verified usage of the c++ standard template library. Ann. Math. Inform. 44, 99–109 (2015)

    MathSciNet  Google Scholar 

  34. Horváth, G., Szécsi, P., Gera, Z., Krupp, D., Pataki, N.: [Engineering Paper] Challenges of implementing cross translation unit analysis in clang static analyzer. In: 2018 IEEE 18th International Working Conference on Source Code Analysis and Manipulation (SCAM), pp. 171–176. IEEE (2018)

    Google Scholar 

  35. Szalay, R., Porkoláb, Z.: Visualising compiler-generated special member functions of C++ types (2018)

    Google Scholar 

  36. De Alwis, B., Murphy, G.C.: Using visual momentum to explain disorientation in the eclipse IDE. In: Visual Languages and Human-Centric Computing (VL/HCC2006), pp. 51–54. IEEE (2006)

    Google Scholar 

  37. Woods, D.D.: Visual momentum: a concept to improve the cognitive coupling of person and computer. Int. J. Man Mach. Stud. 21(3), 229–244 (1984)

    Article  Google Scholar 

  38. Herrmann, D., Brubaker, B., Yoder, C., Sheets, V., Tio, A.: Devices that remind (1999)

    Google Scholar 

  39. Microsoft Corporation: Language Server Protocol Specification. Tech. Rep. 3.14.0 (2018). https://microsoft.github.io/language-server-protocol/specification

  40. Mészáros, M., Cserép, M., Fekete, A.: Delivering comprehension features into source code editors through LSP. In: 2019 42nd International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), pp. 1581–1586. IEEE (2019)

    Google Scholar 

  41. Microsoft Corporation. Language Server Extension Guide. https://code.visualstudio.com/api/language-extensions/language-server-extension-guide

  42. Sillito, J., Murphy, G.C., De Volder, K.: Asking and answering questions during a programming change task. IEEE Trans. Software Eng. 34(4), 434–451 (2008)

    Article  Google Scholar 

  43. Sillito, J., De Voider, K., Fisher, B., Murphy, G.: Managing software change tasks: an exploratory study. In: 2005 International Symposium on Empirical Software Engineering (2005), p. 10. IEEE (2005)

    Google Scholar 

  44. Kim, S., Zimmermann, T., Pan, K., James, E., et al.: Automatic identification of bug-introducing changes. In: 21st IEEE/ACM International Conference on Automated Software Engineering (ASE2006), pp. 81–90. IEEE (2006)

    Google Scholar 

  45. Doxygen. https://www.stack.nl/~dimitri/doxygen/

  46. Hawes, N., Marshall, S., Anslow, C.: Codesurveyor: mapping large-scale software to aid in code comprehension. In: 2015 IEEE 3rd Working Conference on Software Visualization (VISSOFT), pp. 96–105. IEEE (2015)

    Google Scholar 

  47. Darvas, A., Konnerth, R.: System architecture recovery based on software structure model. In: 2016 13th Working IEEE/IFIP Conference on Software Architecture (WICSA), pp. 109–114. IEEE (2016)

    Google Scholar 

  48. de Jonge, M.: Build-level components. IEEE Trans. Software Eng. 31(7), 588–600 (2005)

    Article  Google Scholar 

Download references

Acknowledgement

This work was supported by the European Union, co-financed by the European Social Fund (EFOP-3.6.3-VEKOP-16-2017-00002)

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zoltán Porkoláb .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 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

Brunner, T., Cserép, M., Fekete, A., Mészáros, M., Porkoláb, Z. (2023). Towards Better Tool Support for Code Comprehension. In: Porkoláb, Z., Zsók, V. (eds) Composability, Comprehensibility and Correctness of Working Software. CEFP 2019. Lecture Notes in Computer Science, vol 11950. Springer, Cham. https://doi.org/10.1007/978-3-031-42833-3_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-42833-3_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-42832-6

  • Online ISBN: 978-3-031-42833-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics