[Paper Review] Automatic Software Diversity in the Light of Test Suites
This paper investigates automatic software diversification via 'sosiefication,' a technique that generates program variants by modifying statements while preserving test suite pass rates. It reveals two key dimensions: (1) test suite coverage intensity inversely affects variant synthesis difficulty, yet variants remain feasible even on highly tested code; and (2) certain code regions exhibit 'plastic specifications'—especially in hashing functions—where multiple valid implementations coexist, enabling robust diversification.
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.
Motivation & Objective
- To understand how test suites influence the efficiency and feasibility of automatic software diversification.
- To investigate the interplay between program structure, test suite coverage, and code transformation in generating valid program variants.
- To identify and characterize forgiving code regions and plastic specifications that enable high-impact diversification.
- To provide empirical and qualitative insights into the intrinsic plasticity of real-world software systems.
Proposed method
- Sosiefication is applied to six open-source Java programs with comprehensive JUnit test suites to generate 24,583 program variants (sosies).
- Statement-level execution signatures are computed as a proxy for specification coverage—defined as the number of test cases executing each statement.
- A quantitative analysis correlates execution signature values with sosiefication success rates across different statements.
- Manual code inspection is performed on dozens of sosies to categorize forgiving code regions and identify patterns of plasticity.
- The study compares sosiefication outcomes across varying levels of test coverage and identifies structural and specification-level factors enabling variant synthesis.
- The findings are contextualized within broader software engineering themes, including fault tolerance, robustness, and evolvable systems.
Experimental results
Research questions
- RQ1How does the number of test cases covering a statement influence the difficulty of generating valid sosie variants?
- RQ2What types of code regions are most amenable to diversification while remaining correct under the test suite?
- RQ3To what extent can program variants be generated for statements with very high test coverage (e.g., 600 test cases)?
- RQ4What structural or specification-level properties enable high-impact diversification despite strong test coverage?
- RQ5Are there intrinsic program characteristics—such as 'plastic specifications'—that make certain code regions inherently more forgiving to modification?
Key findings
- Sosiefication success rate decreases with increasing test suite coverage per statement, indicating higher difficulty in generating variants for well-tested code regions.
- Despite high test coverage (up to 600 test cases), valid sosie variants were successfully synthesized, revealing intrinsic plasticity in real-world programs.
- A new category of 'plastic specifications' was identified—particularly in hashing functions—where multiple correct implementations exist due to open yet strong correctness contracts.
- Manual analysis revealed forgiving code regions that are not necessarily tied to traditionally forgiving constructs, such as optimization code or video codecs.
- The study confirms that code addition and deletion can be effective for generating diverse, correct variants, supporting applications in OS protection and failure-oblivious computing.
- The existence of forgiving regions with plastic specifications suggests that diversification is not limited to specific code patterns but emerges from deeper specification-level properties.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.