一句话:提出首个支持代码增删的上下文敏感增量指针分析算法 SHARP,兼容 k-CFA 与 k-obj,并可高效并行化。
本文针对增量指针分析中上下文敏感性缺失的问题,提出 SHARP——一种面向真实大型复杂 Java 程序的增量上下文敏感指针分析算法。据作者所知,SHARP 是首个在先进增量指针分析框架中处理上下文敏感性的算法,且同时适用于 k-CFA 与 k-obj,并能应对包括语句添加与删除在内的代码修改。为在保持精度的同时提升可扩展性,SHARP 解决了可靠性、冗余计算消除与并行化等关键技术挑战。作者在大型流行 Java 项目及其代码提交上进行了广泛实证评估:增量算法处理一次真实代码提交平均仅需 31 秒(k-CFA 与 k-obj),性能与最先进的增量上下文不敏感指针分析相当;并行化进一步将八核机器上的平均处理时间降至每次提交 18 秒。
We present SHARP, an incremental context-sensitive pointer analysis algorithm that scales to real-world large complex Java programs and can also be efficiently parallelized. To our knowledge, SHARP is the first algorithm to tackle context-sensitivity in the state-of-the-art incremental pointer analysis (with regards to code modifications including both statement additions and deletions), which applies to both k-CFA and k-obj. To achieve it, SHARP tackles several technical challenges: soundness, redundant computations, and parallelism to improve scalability without losing precision. We conduct an extensive empirical evaluation of SHARP on large and popular Java projects and their code commits, showing impressive performance improvement: our incremental algorithm only requires on average 31 seconds to handle a real-world code commit for k-CFA and k-obj, which has comparable performance to the state-of-the-art incremental context-insensitive pointer analysis. Our parallelization further improves the performance and enables SHARP to finish within 18 seconds per code commit on average on an eight-core machine.
@article{paperbot1525,
title = {SHARP: fast incremental context-sensitive pointer analysis for Java},
author = {Bozhen Liu and Jeff Huang},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {OOPSLA1},
year = {2022},
doi = {10.1145/3527332}
}