arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1509.00144cs.SE
收藏

基于测试集的软件自动多样性

Automatic Software Diversity in the Light of Test Suites

Benoit Baudry, Simon Allier, Marcelino Rodriguez-Cancio, Martin Monperrus

摘要:

一些作品解决了自动化软件多样化的挑战,他们都有一个核心思想:使用自动化测试套件来驱动多样化。然而,缺乏对测试套件、程序和转换在此过程中如何相互作用的坚实理解。我们探讨这种复杂的相互作用的背景下,一个特定的多元化技术称为“sosiefication”。Sosification生成Sosie程序,即,一种程序的变体,其中某些语句被删除、添加或替换,但仍能通过原程序的测试集。我们的调查的影响,测试套件的sossification利用以下观察:测试套件覆盖不同地区的程序在非常不平等的方式。因此,我们假设SOSIE合成在一个语句上有不同的性能,该语句被100个测试用例覆盖,而在一个语句上被一个单一的测试用例覆盖。我们合成24583 sosies 6流行的开源Java程序。我们的研究结果表明,有两个维度的多元化。第一个问题在于规格说明:越多的测试用例覆盖一个语句,越难合成sosies。然而,令我们惊讶的是,我们也能够在高度测试的语句(多达600个测试用例)上合成sosies,这表明了我们研究的程序的内在属性。第二个维度是在代码中:我们手动探索了几十个sosies,并描述了易于多样化的新类型的宽容代码区域。

英文摘要:

A few works address the challenge of automating software diversification, and they all share one core idea: using automated test suites to drive diversification. However, there is is lack of solid understanding of how test suites, programs and transformations interact one with another in this process. We explore this intricate interplay in the context of a specific diversification technique called "sosiefication". Sosiefication generates sosie programs, i.e., variants of a program in which some statements are deleted, added or replaced but still pass the test suite of the original program. Our investigation of the influence of test suites on sosiefication exploits the following observation: test suites cover the different regions of programs in very unequal ways. Hence, we hypothesize that sosie synthesis has different performances on a statement that is covered by one hundred test case and on a statement that is covered by a single test case. We synthesize 24583 sosies on 6 popular open-source Java programs. Our results show that there are two dimensions for diversification. The first one lies in the specification: the more test cases cover a statement, the more difficult it is to synthesize sosies. Yet, to our surprise, we are also able to synthesize sosies on highly tested statements (up to 600 test cases), which indicates an intrinsic property of the programs we study. The second dimension is in the code: we manually explore dozens of sosies and characterize new types of forgiving code regions that are prone to diversification.

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

↑