...
首页> 外文期刊>Software and systems modeling >Precise null-pointer analysis
【24h】

Precise null-pointer analysis

机译:精确的空指针分析

获取原文
获取原文并翻译 | 示例

摘要

In Java, C or C++, attempts to dereference the null value result in an exception or a segmentation fault. Hence, it is important to identify those program points where this undesired behaviour might occur or prove the other pro gram points (and possibly the entire program) safe. To that purpose, null-pointer analysis of computer programs checks or infers non-null annotations for variables and object fields. With few notable exceptions, null-pointer analyses currently use run-time checks or are incorrect or only verify manually provided annotations. In this paper, we use abstract interpretation to build and prove correct a first, flow and con text-sensitive static null-pointer analysis for Java bytecode (and hence Java) which infers non-null annotations. It is based on Boolean formulas, implemented with binary deci sion diagrams. For better precision, it identifies instance or static fields that remain always non-null after being initial ised. Our experiments show this analysis faster and more pre cise than the correct null-pointer analysis by Hubert, Jensen and Pichardie. Moreover, our analysis deals with exceptions, which is not the case of most others; its formulation is the oretically clean and its implementation strong and scalable. We subsequently improve that analysis by using local reason ing about fields that are not always non-nul l, but happen to hold a non-null value when they are accessed. This is a fre quent situation, since programmers typically check a field for non-nullness before its access. We conclude with an exam ple of use of our analyses to infer null-pointer annotations which are more precise than those that other inference tools can achieve.
机译:在Java,C或C ++中,尝试取消引用空值会导致异常或分段错误。因此,重要的是要识别出可能发生这种不良行为的程序点,或者证明其他程序点(可能还有整个程序)的安全性。为此,计算机程序的空指针分析会检查或推断变量和对象字段的非空注释。除少数值得注意的例外外,空指针分析当前使用运行时检查或不正确,或仅验证手动提供的注释。在本文中,我们使用抽象解释来构建和证明对推理非空注释的Java字节码(进而是Java)的流,上下文敏感的静态空指针的第一个分析是正确的。它基于布尔公式,并通过二进制决策图实现。为了获得更好的精度,它标识实例或静态字段,这些实例或静态字段在初始分配后始终保持非空。我们的实验表明,与Hubert,Jensen和Pichardie进行的正确的空指针分析相比,该分析更快,更精确。而且,我们的分析处理的是例外,大多数其他情况并非如此。它的表述从理论上讲是干净的,其实现功能强大且可扩展。随后,我们通过使用关于字段的局部推理来改进该分析,这些字段并不总是非null的,但是在访问它们时碰巧持有非null的值。这是一种常见的情况,因为程序员通常会在访问字段之前检查字段是否为空。我们以使用我们的分析来推断空指针注释为例,该注释比其他推断工具可以实现的更为精确。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号