arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2301.12403cs.SE
收藏

演化系统的规范推理

Specification Inference for Evolving Systems

Renzo Degiovanni, Facundo Molina, Agustin Nolasco, Nazareno Aguirre, Mike Papadakis

摘要:

在本文中,我们提出了一个基于断言的方法来捕捉软件演化,通过提交相关规范的概念。提交相关规范通过两组断言总结了由于提交(被理解为特定的软件修改)而改变的程序属性,增量添加断言(delta-added assertions),在提交前版本中不保持但在提交后保持的属性,以及增量删除断言(delta-removed assertions),在提交前有效,但在代码更改后不再保持的属性。我们还提出了DeltaSpec,一种结合测试生成和动态规范推理的方法,可以自动计算给定提交的提交相关规范。我们在两个数据集上评估了DeltaSpec,这两个数据集总共包含57个提交(63个类和797个方法)。我们表明,提交相关的断言可以精确地描述代码更改的语义增量,提供了一个有用的机制,用于验证软件的行为演变。我们还表明,DeltaSpec可以推断88%的手动编写的提交相关的断言表达的语言支持的工具。此外,我们的实验表明,DeltaSpec的推断断言是有效的回归故障检测。更准确地说,我们表明,提交相关的断言可以检测到,平均而言,78.3%的人工种子错误,与代码的变化。我们还表明,在三角洲的断言是58.3%更有效地检测提交相关的突变体比断言以外的三角洲,它需要平均少169%的断言时,这些是提交相关的,相比使用一般有效的断言,以实现相同的提交相关的突变得分。

英文摘要:

In this paper, we propose an assertion-based approach to capture software evolution, through the notion of commit-relevant specification. A commit-relevant specification summarises the program properties that have changed as a consequence of a commit (understood as a specific software modification), via two sets of assertions, the delta-added assertions, properties that did not hold in the pre-commit version but hold on the post-commit, and the delta-removed assertions, those that were valid in the pre-commit, but no longer hold after the code change. We also present DeltaSpec, an approach that combines test generation and dynamic specification inference to automatically compute commit-relevant specifications from given commits. We evaluate DeltaSpec on two datasets that include a total of 57 commits (63 classes and 797 methods). We show that commit-relevant assertions can precisely describe the semantic deltas of code changes, providing a useful mechanism for validating the behavioural evolution of software. We also show that DeltaSpec can infer 88% of the manually written commit-relevant assertions expressible in the language supported by the tool. Moreover, our experiments demonstrate that DeltaSpec's inferred assertions are effective to detect regression faults. More precisely, we show that commit-relevant assertions can detect, on average, 78.3% of the artificially seeded faults that interact with the code changes. We also show that assertions in the delta are 58.3% more effective in detecting commit-relevant mutants than assertions outside the delta, and that it takes on average 169% fewer assertions when these are commit-relevant, compared to using general valid assertions, to achieve a same commit-relevant mutation score.

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

↑