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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Ferraro-Esparza, V., Gudmandsen, M., Olsson, K.: Ericsson telecom server platform 4. Ericsson Rev. 3, 104–113 (2002)
Enderin, M., LeCorney, D., Lindberg, M., Lundqvist, T.: Axe 810-the evolution continues. Ericsson Rev. 4, 10–23 (2001)
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
Brunner, T.: CodeCompass: an extensible code comprehension framework. Eötvös Loránd University, Faculty of Informatics, Budapest, Tech. Rep. IK-TR1 (2018)
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
CodeCompass. https://github.com/Ericsson/CodeCompass
Von Mayrhauser, A., Vans, A.M.: Program comprehension during software maintenance and evolution. Computer 28(8), 44–55 (1995)
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)
O’brien, M.P.: Software comprehension-a review & research direction. Department of Computer Science & Information Systems University of Limerick, Ireland, Technical Report (2003)
Brooks, R.: Towards a theory of the cognitive processes in computer programming. Int. J. Man Mach. Stud. 9(6), 737–751 (1977)
Soloway, E., Adelson, B., Ehrlich, K.: Knowledge and processes in the comprehension of computer programs. The Nature of Expertise, pp. 129–152 (1988)
Pennington, N.: Comprehension strategies in programming. In: Empirical Studies of Programmers: Second Workshop, pp. 100–113. Ablex Publishing Corp. (1987)
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)
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)
Letovsky, S.: Cognitive processes in program comprehension. J. Syst. Softw. 7(4), 325–339 (1987)
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)
Rajlich, V., Wilde, N.: The role of concepts in program comprehension. In: Proceedings 10th International Workshop on Program Comprehension, pp. 271–278. IEEE (2002)
3GPP technical specifications. https://www.3gpp.org/specifications/79-specification-numbering
Krzysztof, C., Eisenecker, U.W.: Generative Programming: Methods. Addison-Wesley, Tools and Applications (2000)
Hennert, L., Larruy, A.: TelORB- the distributed communications operating system. Ericsson Rev.(Engl. Ed.) 76(3), 156–167 (1999)
xxx
Apache thrift. https://Thrift.apache.org/
Opengrok. https://opengrok.github.io/OpenGrok
Doxygen. https://ctags.sourceforge.net
Henderson-Sellers, B.: Object-oriented metrics: measures of complexity. Prentice-Hall Inc. (1995)
McCabe, T.J.: A complexity measure. IEEE Trans. Software Eng. 4, 308–320 (1976)
CodeSurfer. https://www.grammatech.com/products/codesurfer
The clang JSON compilation database format specification. https://clang.llvm.org/docs/JSONCompilationDatabase.html
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)
Krupp, D., Orban, G., Horvath, G., Babati, B.: Industrial experiences with the clang static analysis toolset (2015)
Horváth, G., Pataki, N.: Clang matchers for verified usage of the c++ standard template library. Ann. Math. Inform. 44, 99–109 (2015)
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)
Szalay, R., Porkoláb, Z.: Visualising compiler-generated special member functions of C++ types (2018)
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)
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)
Herrmann, D., Brubaker, B., Yoder, C., Sheets, V., Tio, A.: Devices that remind (1999)
Microsoft Corporation: Language Server Protocol Specification. Tech. Rep. 3.14.0 (2018). https://microsoft.github.io/language-server-protocol/specification
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)
Microsoft Corporation. Language Server Extension Guide. https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
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)
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)
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)
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)
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)
de Jonge, M.: Build-level components. IEEE Trans. Software Eng. 31(7), 588–600 (2005)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)