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

Java中性程序变体之旅

A Journey Among Java Neutral Program Variants

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

摘要:

中性程序变体在功能上与原始程序相似,但实现的行为略有不同。诸如近似计算或遗传改进之类的技术共享这样的直觉,即增强的潜力在于这些可接受的行为差异(例如,增强的性能或可靠性)。然而,通过推测性转换自动合成中性程序变体仍然是一个关键挑战。这项工作旨在描述Java程序中的塑料代码区域,即,容易合成中性程序变体的区域。我们的实证研究依赖于6个真实世界的Java程序的自动变化。首先,我们用三种最先进的推测转换来转换这些程序:添加、替换和删除语句。我们得到了23445个中性变体,从中我们收集了以下新颖的见解:开发人员自然地编写支持细粒度行为更改的代码;语句删除是一种令人惊讶的有效推测转换;高级设计决策,例如数据结构的选择,是可以在保持功能的同时进化的自然点。其次,我们设计了3个新的投机转换,针对特定的塑料区域。新的实验表明,分别有60%、58%和73%的合成变体(总共175688个)是中性的,并且表现出与原始变体不同的执行轨迹。

英文摘要:

Neutral program variants are functionally similar to an original program, yet implement slightly different behaviors. Techniques such as approximate computing or genetic improvement share the intuition that potential for enhancements lies in these acceptable behavioral differences (e.g., enhanced performance or reliability). Yet, the automatic synthesis of neutral program variants, through speculative transformations remains a key challenge. This work aims at characterizing plastic code regions in Java programs, i.e., the areas that are prone to the synthesis of neutral program variants. Our empirical study relies on automatic variations of 6 real-world Java programs. First, we transform these programs with three state-of-the-art speculative transformations: add, replace and delete statements. We get a pool of 23445 neutral variants, from which we gather the following novel insights: developers naturally write code that supports fine-grain behavioral changes; statement deletion is a surprisingly effective speculative transformation; high-level design decisions, such as the choice of a data structure, are natural points that can evolve while keeping functionality. Second, we design 3 novel speculative transformations, targeted at specific plastic regions. New experiments reveal that respectively 60\%, 58\% and 73\% of the synthesized variants (175688 in total) are neutral and exhibit execution traces that are different from the original.

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

↑