Optimization methods for nop-shadows typestate analysis

Optimization methods for nop-shadows typestate analysis
复制标题

nop-shadows 类型状态分析的优化方法

DOI:
10.1587/transinf.2014edp7329
复制
发表时间:
2015
影响因子:
0.7
通讯作者:
Zhang Peng
Zhang Peng
中科院分区:
计算机科学4区
文献类型:
--
作者:
Wang Chengsong;Mao Xiaoguang;Lei Yan;Zhang Peng

文献摘要

相似文献

近年来,已经提出了混合型分析,以消除在编译时进行运行时监视器的不必要的监视仪器。 NOP-Shadows分析(NSA)是这些混合典型分析之一。在生成剩余监视器之前,NSA执行数据流分析,该分析是心理内流动敏感的,并且部分上下文敏感,以提高运行时性能。尽管NSA是精确的,但在某些情况下,其影响很小。在本文中,我们提出了三个优化,以进一步提高NSA的精度。前两个优化试图在确定是否需要监视仪器时过滤对象的干涉状态。第三个优化完善了通过方法调用引起的手术间数据流分析。我们已经将优化纳入了Clara,并在DACAPO基准上进行了广泛的实验。实验结果表明,在超过一半的情况下,我们的前两个优化可以在原始NSA之后进一步删除不必要的仪器,而没有明显的开销。此外,可以在两种情况下删除所有仪器,这意味着该程序满足了打字属性,并且没有运行时监视。令我们惊讶的是,第三次优化只能在8.7%的情况下有效。最后,我们分析了实验结果,并讨论了我们的优化在某些特殊情况下无法进一步消除不必要的仪器的原因。
In recent years, hybrid typestate analysis has been proposed to eliminate unnecessary monitoring instrumentations for runtime monitors at compile-time. Nop-shadows Analysis (NSA) is one of these hybrid typestate analyses. Before generating residual monitors, NSA performs the data-flow analysis which is intra-procedural flow-sensitive and partially context-sensitive to improve runtime performance. Although NSA is precise, there are some cases on which it has little effects. In this paper, we propose three optimizations to further improve the precision of NSA. The first two optimizations try to filter interferential states of objects when determining whether a monitoring instrumentation is necessary. The third optimization refines the inter-procedural data-flow analysis induced by method invocations. We have integrated our optimizations into Clara and conducted extensive experiments on the DaCapo benchmark. The experimental results demonstrate that our first two optimizations can further remove unnecessary instrumentations after the original NSA in more than half of the cases, without a significant overhead. In addition, all the instrumentations can be removed for two cases, which implies the program satisfy the typestate property and is free of runtime monitoring. It comes as a surprise to us that the third optimization can only be effective on 8.7% cases. Finally, we analyze the experimental results and discuss the reasons why our optimizations fail to further eliminate unnecessary instrumentations in some special situations.