Bachelor's thesis presentation. Christian is advised by Jonas Schuhmacher.
Previous talks at the SCCS Colloquium
Christian Ispas: Implementation and Comparison of Code Complexity Metrics to Assess Developer Productivity
SCCS Colloquium |
Code complexity metrics exist in many forms as well as many approaches. Unlike runtime and space complexity, their goal is to quantify the complexity behind developing a codebase. The complexity may be interpreted as implementation difficulty of the code or similarly as the difficulty in understanding the code. Diverse metrics tend toward one of the two interpretations by differing amounts. A field of application for code complexity metrics, with strong research potential is analyzing the code complexity of parallel models built to run computationally intensive applications on GPGPUs. In this thesis, five code complexity metrics will be introduced, discussed and compared with an emphasis on using them to analyze C++ codebases using a corresponding GPU-based parallel framework model. The metrics are Source Lines of Code (SLOC) complexity, Cyclomatic Complexity, Nesting Depth Complexity, Cognitive Complexity, and Halstead complexity. The language of implementation for these metrics is Python with an integrated CLI tool to analyze codebases for code complexity and evaluate corresponding statistical measures graphically. It is pip-installable and follows best software practices under the scope of building a performant code analysis tool. Under a polyhedral gravity model a combined Halstead perspective with SLOC is shown to be the most difficult when implemented in the Vulkan graphics API. For algorithmic implementations of matrix multiplication, vector addition and a n-body simulation, CUDA is shown to be the most difficult framework of implementation. While holding the framework of implementation constant, the polyhedral gravity model implementation is shown to have the highest code complexity. We validate our implementation through manual testing of the metrics, as well as automating Pytests with an integrated CI pipeline using GitHub actions.