Broadening Horizons of Multilingual Static Analysis: Semantic Summary Extraction from C Code for JNI Program Analysis

Broadening Horizons of Multilingual Static Analysis: Semantic Summary Extraction from C Code for JNI Program Analysis
复制标题

拓宽多语言静态分析的视野:从 C 代码中提取语义摘要以进行 JNI 程序分析

DOI:
10.1145/3324884.3416558
复制
发表时间:
2020
期刊:
2020 35th IEEE/ACM International Conference on Automated Software Engineering (ASE)
影响因子:
--
通讯作者:
Sukyoung Ryu
Sukyoung Ryu
中科院分区:
--
文献类型:
--
作者:
Sungho Lee;Hyogun Lee;Sukyoung Ryu

文献摘要

被引文献

相似文献

大多数编程语言支持外语互操作,允许开发人员将用不同语言实现的多个模块集成到单个多语言程序中。虽然利用多种语言的各种功能扩展了表达能力,但语言语义的差异要求开发人员理解多种语言的语义及其相互操作。因为当前的编译器不支持编译时检查互操作,所以它们不能帮助开发人员避免互操作错误。类似地,静态分析和错误检测的积极研究一直集中在用单一语言编写的程序上。在本文中,我们提出了一种新的方法来分析多语言程序的静态。与现有的方法,扩展一个静态分析器的主机语言,以支持分析的外国函数调用,我们的方法提取语义摘要从程序编写的客户语言使用模块化分析技术,并执行一个完整的程序分析与提取的语义摘要。为了证明该方法的实用性,我们设计并实现了一个多语言程序的静态分析器,用于分析Java和C语言之间的JNI互操作。我们的实证评估表明,分析器是可扩展的,它可以构建调用图的大型程序,使用JNI互操作,并在现实世界中的Android JNI应用程序中发现74个真正的互操作错误有用。
Most programming languages support foreign language interoperation that allows developers to integrate multiple modules implemented in different languages into a single multilingual program. While utilizing various features from multiple languages expands expressivity, differences in language semantics require developers to understand the semantics of multiple languages and their inter-operation. Because current compilers do not support compile-time checking for interoperation, they do not help developers avoid in-teroperation bugs. Similarly, active research on static analysis and bug detection has been focusing on programs written in a single language. In this paper, we propose a novel approach to analyze multilingual programs statically. Unlike existing approaches that extend a static analyzer for a host language to support analysis of foreign function calls, our approach extracts semantic summaries from programs written in guest languages using a modular analysis technique, and performs a whole-program analysis with the extracted semantic summaries. To show practicality of our approach, we design and implement a static analyzer for multilingual programs, which analyzes JNI interoperation between Java and C. Our empirical evaluation shows that the analyzer is scalable in that it can construct call graphs for large programs that use JNI interoperation, and useful in that it found 74 genuine interoperation bugs in real-world Android JNI applications.