arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.02395cs.SE
收藏

使用单元测试检测语义冲突

Detecting Semantic Conflicts with Unit Tests

Léuson Da Silva, Paulo Borba, Toni Maciel, Wardah Mahmood, Thorsten Berger, João Moisakis, Aldiberg Gomes, Vinícius Leite

AI总结:

针对语义合并冲突问题,提出基于自动生成单元测试作为部分规范的语义合并工具SAM,实证评估显示结合特定测试生成工具与可测试性转换可有效检测冲突。

摘要:

分支与合并是协作式软件开发中的常见实践,能够提高开发者的生产力。尽管有这些好处,开发者仍需合并软件并解决合并冲突。虽然现代合并技术可以自动解决文本冲突,但当冲突出现在语义层面时,这些技术便失效了。尽管已有语义合并工具被提出,但它们通常基于重量级的静态分析或需要程序行为的显式规范。在这项工作中,我们采取了不同的路线,提出了SAM(语义合并),一种基于自动生成单元测试作为部分规范的语义合并工具。为了评估SAM检测冲突的可行性,我们进行了一项实证研究,分析了来自51个合并场景中集成到公共类元素中的80多对变更。此外,我们还评估了SAM使用的四种单元测试生成工具对冲突识别的贡献。我们提出并评估了可测试性转换和序列化的采用。我们的结果表明,当仅结合Differential EvoSuite和EvoSuite生成的测试并使用所提出的可测试性转换时,SAM表现最佳(在28个冲突中检测到9个)。这些结果强化了先前关于使用测试用例生成来检测测试冲突潜力的发现。

英文摘要:

Branching and merging are common practices in collaborative software development, increasing developer's productivity. Despite such benefits, developers need to merge software and resolve merge conflicts. While modern merge techniques can resolve textual conflicts automatically, they fail when the conflict arises at the semantic level. Although semantic merge tools have been proposed, they are usually based on heavyweight static analyses or need explicit specifications of program behavior. In this work, we take a different route and propose SAM (SemAntic Merge), a semantic merge tool based on the automated generation of unit tests that are used as partial specifications. To evaluate SAM's feasibility for detecting conflicts, we perform an empirical study analyzing more than 80 pairs of changes integrated into common class elements from 51 merge scenarios. Furthermore, we also assess how the four unit-test generation tools used by SAM contribute to conflict identification. We propose and assess the adoption of Testability Transformations and Serialization. Our results show that SAM best performs when combining only the tests generated by Differential EvoSuite and EvoSuite and using the proposed Testability Transformations (nine detected conflicts out of 28). These results reinforce previous findings about the potential of using test-case generation to detect test conflicts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑