Determining Method-Call Sequences for Object Creation in C++

Thomas Bach, Ralf Pannemans, A. Andrzejak
{"title":"Determining Method-Call Sequences for Object Creation in C++","authors":"Thomas Bach, Ralf Pannemans, A. Andrzejak","doi":"10.1109/ICST46399.2020.00021","DOIUrl":null,"url":null,"abstract":"Unit tests in object-oriented programming languages must instantiate objects as an essential part of their set-up. Finding feasible method-call sequences for object creation and selecting a most desirable sequence can be a time-consuming challenge for developers in large C++ projects. This is caused by the intricacies of the C++ language, complexity of recursive object creation, and a large number of alternatives. We confirm the significance of the problem by analysis of 7large C++ projects and a survey with 143 practitioners. We then design an approach for recommending method-call sequences for object creation that align with criteria gathered by the survey. Our approach exploits accurate and efficient compiler-based source code analysis to build an object dependency graph that is processed by a divide-and-conquer algorithm.An evaluation on a large industrial project shows that our tool finds solutions that require in 99% of 1104 cases identical or fewer objects compared to manually crafted solutions. Developer feedback and manual analysis confirm these results. Moreover, solutions found by our tool require up to 6 times fewer objects on average compared to approaches from prior work.","PeriodicalId":235967,"journal":{"name":"2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST)","volume":"50 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICST46399.2020.00021","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Unit tests in object-oriented programming languages must instantiate objects as an essential part of their set-up. Finding feasible method-call sequences for object creation and selecting a most desirable sequence can be a time-consuming challenge for developers in large C++ projects. This is caused by the intricacies of the C++ language, complexity of recursive object creation, and a large number of alternatives. We confirm the significance of the problem by analysis of 7large C++ projects and a survey with 143 practitioners. We then design an approach for recommending method-call sequences for object creation that align with criteria gathered by the survey. Our approach exploits accurate and efficient compiler-based source code analysis to build an object dependency graph that is processed by a divide-and-conquer algorithm.An evaluation on a large industrial project shows that our tool finds solutions that require in 99% of 1104 cases identical or fewer objects compared to manually crafted solutions. Developer feedback and manual analysis confirm these results. Moreover, solutions found by our tool require up to 6 times fewer objects on average compared to approaches from prior work.
确定c++中对象创建的方法调用序列
面向对象编程语言中的单元测试必须实例化对象作为其设置的基本部分。对于大型c++项目中的开发人员来说,为对象创建找到可行的方法调用序列并选择最理想的序列可能是一项耗时的挑战。这是由于c++语言的复杂性、递归对象创建的复杂性以及大量替代方法造成的。通过对7个大型c++项目的分析和对143名从业者的调查,我们确认了这个问题的重要性。然后,我们设计了一种方法,为对象创建推荐与调查收集的标准一致的方法调用序列。我们的方法利用精确和高效的基于编译器的源代码分析来构建对象依赖图,该图由分治算法处理。对一个大型工业项目的评估表明,与手工制作的解决方案相比,我们的工具找到的解决方案在1104个案例中需要99%的相同或更少的对象。开发人员的反馈和手工分析证实了这些结果。此外,与以前的方法相比,我们的工具找到的解决方案平均需要的对象减少了6倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信