首页> 外文期刊>Information and software technology >Toward recursion aware complexity metrics
【24h】

Toward recursion aware complexity metrics

机译:迈向递归感知的复杂性指标

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

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.
机译:上下文:软件开发人员在阅读,理解和调试源代码上花费大量时间。众多软件指标可以使我们意识到功能难以理解或协作中存在的缺陷。调用链,尤其是递归链,会影响解决方案的复杂性,可读性和可理解性。尽管与迭代解决方案相比,分解解决方案和递归解决方案的特点是简短明了,但它们掩盖了观察到的问题和解决方案的复杂性。由于功能之间的协作可能严重依赖于上下文,因此通常在调试,测试或静态分析中会发现困难,而指标支持仍然非常薄弱。目的:我们引入了一种新的复杂性指标,称为总体路径复杂度(OPC),在观察到的源代码中了解(递归)调用链。由于调用是基本的协作机制,并且递归被广泛接受,因此OPC指标旨在独立应用于编程语言和范式。方法:我们提出了四种不同版本的OPC计算算法,并探讨和讨论了它们的适用性。我们已经根据专门用于评估和验证软件复杂性指标的框架验证了建议的指标,并相应地进行了理论,经验和实践验证。对用Erlang编写的玩具示例和工业案例(47012 LOC,2899函数和758递归路径)进行了实际验证。结果:基于我们的分析,我们选择了(在建议的4个中)最合适的OPC计算公式,结果表明与通过低相关性确认的其他可用度量相比,新度量表达了软件的高级属性。结论:我们引入了在“总体控制流图”上计算出的OPC度量,作为对循环复杂性的扩展,通过增加了对(递归)调用的认识。新指标的值可以使我们找到有问题的代码片段或执行路径片段。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号