【24h】

Automatic Modeling of Opaque Code for JavaScript Static Analysis

机译:用于JavaScript静态分析的不透明代码的自动建模

获取原文

摘要

Static program analysis often encounters problems in analyzing library code. Most real-world programs use library functions intensively, and library functions are usually written in different languages. For example, static analysis of JavaScript programs requires analysis of the standard built-in library implemented in host environments. A common approach to analyze such opaque code is for analysis developers to build models that provide the semantics of the code. Models can be built either manually, which is time consuming and error prone, or automatically, which may limit application to different languages or analyzers. In this paper, we present a novel mechanism to support automatic modeling of opaque code, which is applicable to various languages and analyzers. For a given static analysis, our approach automatically computes analysis results of opaque code via dynamic testing during static analysis. By using testing techniques, the mechanism does not guarantee sound over-approximation of program behaviors in general. However, it is fully automatic, is scalable in terms of the size of opaque code, and provides more precise results than conventional over-approximation approaches. Our evaluation shows that although not all functionalities in opaque code can (or should) be modeled automatically using our technique, a large number of JavaScript built-in functions are approximated soundly yet more precisely than existing manual models.
机译:静态程序分析在分析库代码时经常遇到问题。大多数实际程序会大量使用库函数,并且库函数通常以不同的语言编写。例如,对JavaScript程序的静态分析需要分析在主机环境中实现的标准内置库。分析这种不透明代码的一种常见方法是让分析开发人员构建提供代码语义的模型。可以手动建立模型,这既费时又容易出错,也可以自动建立模型,这可能会将应用程序限制在不同的语言或分析器中。在本文中,我们提出了一种支持不透明代码自动建模的新颖机制,该机制适用于各种语言和分析器。对于给定的静态分析,我们的方法在静态分析期间通过动态测试自动计算不透明代码的分析结果。通过使用测试技术,该机制通常不能保证程序行为的声音过度逼近。但是,它是全自动的,可以根据不透明代码的大小进行缩放,并且比传统的过逼近方法提供更精确的结果。我们的评估表明,尽管并非(或应该)使用我们的技术可以自动对不透明代码中的所有功能进行建模,但与现有的手动模型相比,大量JavaScript内置函数的近似值更为准确。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号