arrow
返回

Toward recursion aware complexity metrics

delete2020-02-01
delete6
PRE
AI
G
Gordana Rakić *
M
Melinda Tóth
Z
Zoran Budimac
DOI:10.1016/j.infsof.2019.106203delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Context: Software developers spend a significant amount of time on reading, comprehending, and debugging of source code. Numerous software metrics can give us awareness of incomprehensible functions or of flaws in their collaboration. Invocation chains, especially recursive ones, affect solution complexity, readability, and understandability. Even though decomposed and recursive solutions are characterized as short and clear in comparison with iterative ones, they hide the complexity of the observed problem and solution. As the collaboration between functions can strongly depend on context, difficulties are usually detected in debugging, testing or by static analysis, while metrics support is still very weak. Objective: We introduce a new complexity metric, called Overall Path Complexity (OPC), which is aware of (recursive) call chains in the observed source code. As invocations are basic collaboration mechanism and recursions are broadly accepted, the OPC metric is intended to be applicable independently on programming language and paradigm. Method: We propose four different versions of the OPC calculation algorithm and explore and discuss their suitability. We have validated proposed metrics based on a Framework specially designed for evaluation and validation of software complexity metrics and accordingly performed theoretical, empirical and practical validation. Practical validation was performed on toy examples and industrial cases (47012 LOCs, 2899 functions, and 758 recursive paths) written in Erlang. Result: Based on our analysis we selected the most suitable (of 4 proposed) OPC calculation formula, and showed that the new metric expresses advanced properties of the software in comparison with other available metrics that was confirmed by low correlation. Conclusion: We introduced the OPC metric calculated on the Overall Control Flow Graph as an extension of Cyclomatic Complexity by adding awareness of (recursive) invocations. The values of the new metric can lead us to find the problematic fragments of the code or of the execution paths.
Keyword:
Software maintainability
Source code readability
Source code comprehension
Debugging
Source code complexity
Complexity metrics
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

Automatic detection of code smells using metrics and CodeT5 embeddings: a case study in C#使用指标和CodeT5嵌入进行代码异味自动检测:C#案例研究
err2024-02-24
err0
PREAI
errAleksandar Kovačević; Nikola Luburić; Jelena Slivka; Simona Prokić; Katarina-Glorija Grujić; Dragan Vidaković; Goran Sladić
err分享
err收藏
Revisiting the debate: Are code metrics useful for measuring maintenance effort?
err2022-08-17
err7
PREAI
errChowdhury, Shaiful; Holmes, Reid; Zaidman, Andy; Kazman, Rick
err分享
err收藏
err分享
err收藏

期刊

Information and Software Technology 封面图
Information and Software Technology
IF:
4.3
论文数:
3.8K
被引数:
9.5K

机构

E
eotvos lorand university
学者数:
452
论文数: 178
被引数: 3.4K
U
University of Novi Sad
学者数:
490
论文数: 144
被引数: 2.5K
引用论文

引用论文

The Daidzein Metabolite, 6,7,4'-Trihydroxyisoflavone, Is a Novel Inhibitor of PKCα in Suppressing Solar UV-Induced Matrix Metalloproteinase 1
err2014-11-19
err0
errOAAI
errTae-Gyu Lim; Jong-Eun Kim; Sung-Young Lee; Jun Park; Myung Yeom; Hanyong Chen; Ann Bode; Zigang Dong; Ki Lee
err分享
err收藏
A Suite of Object Oriented Cognitive Complexity Metrics
err2018-01-01
err35
errOAAI
errMisra, Sanjay; Adewumi, Adewole; Fernandez-Sanz, Luis; Damasevicius, Robertas
err分享
err收藏
Re-Cloning the N27 Dopamine Cell Line to Improve a Cell Culture Model of Parkinson's Disease
err2016-08-11
err0
errOAAI
errLu Gao; Wenbo Zhou; Breanna Symmes; Curt R. Freed
err分享
err收藏
Synthetic slings: Pros and cons
err2002-09-01
err0
PREAI
errDavid R. Staskin; Louis Plzak
err分享
err收藏
学者 查看更多内容