首页 | 本学科首页   官方微博 | 高级检索  
     

DDoop: 基于差分式Datalog求解的增量指针分析框架
引用本文:沈天琪,王熙灶,宾向荣,卜磊.DDoop: 基于差分式Datalog求解的增量指针分析框架[J].软件学报,2024,35(6).
作者姓名:沈天琪  王熙灶  宾向荣  卜磊
作者单位:计算机软件新技术全国重点实验室(南京大学), 江苏 南京 210023;南京大学 计算机科学与技术系, 江苏 南京 210023;计算机软件新技术全国重点实验室(南京大学), 江苏 南京 210023;南京大学 软件学院, 江苏 南京 210023
基金项目:国家自然科学基金(62232008,62172200);江苏省前沿引领技术基础研究专项(BK20202001);中央高校基本科研业务费专项资金(020214380101)
摘    要:指针分析是对软件进行编译优化、错误检测的核心基础技术之一.现有经典指针分析框架,如Doop,会将待分析程序和分析算法转化成Datalog评估问题并进行求解,如程序规模较大,单次求解分析时间开销较大.在程序频繁变更发布的情况下,相关程序分析的开销更是难以负担.近年来,增量分析作为一种在代码频繁变更场景下有效复用已有分析结果提升分析效率的技术受到了越来越多的关注.然而,目前的增量指针分析技术通常针对特定算法设计,支持的指针分析选项有限,其可用性也受到较大限制.针对上述问题,本文设计并实现了一种基于差分式Datalog求解的增量指针分析框架DDoop(Differential Doop). DDoop实现了增量输入事实生成技术与增量分析规则自动化重写技术,将多版本程序增量分析问题表达为差分Datalog评估问题,从而可以充分利用成熟的差分式Datalog求解引擎,如DDlog,来实现端到端的增量指针分析,并最大化兼容复用Doop中已有的指针分析实现,提供透明的增量化支持.我们在广泛应用的真实世界程序上对DDoop进行了实验评估,实验结果显示DDoop相较于非增量的Doop框架具有显著的性能优势,同时高度兼容Doop中已有的各种指针分析规则.

关 键 词:指针分析  增量分析  Datalog引擎  增量计算  差分式Datalog
收稿时间:2023/9/11 0:00:00
修稿时间:2023/10/30 0:00:00

DDoop: An Incremental Pointer Analysis Framework Based on Differential Datalog Evaluation
SHEN Tian-Qi,WANG Xi-Zao,BIN Xiang-Rong,BU Lei.DDoop: An Incremental Pointer Analysis Framework Based on Differential Datalog Evaluation[J].Journal of Software,2024,35(6).
Authors:SHEN Tian-Qi  WANG Xi-Zao  BIN Xiang-Rong  BU Lei
Affiliation:State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China;Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China; State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China;Software Institute, Nanjing University, Nanjing 210023, China
Abstract:Pointer analysis is one of the core and fundamental technologies for software compiler optimization and bug detection. Existing classic pointer analysis frameworks, such as Doop, build on the idea of specify analysis algorithms declaratively using Datalog. If the size of the program-to-be-analyzed is too large, the analysis time overhead of a single evaluation can be high. The overhead of program analysis can hardly be afforded, especially in situations where programs are frequently changed and released. In recent years, incremental analysis, as a technology that effectively reuses existing analysis results and improves analysis efficiency in the face of frequent code changes, has received increasing attention. However, current incremental pointer analysis techniques are often designed for specific algorithms, so the pointer analysis options supported are limited, and their usability is significantly restricted. To address the above issues, we designed and implemented DDoop (Differential Doop), an incremental pointer analysis framework based on differential Datalog evaluation. DDoop implements incremental input fact generation and automatic rewriting for incremental analysis rules, expressing multi-version program incremental analysis problems as differential Datalog evaluation problems. Therefore, a mature differential Datalog engine like DDlog can be fully utilized to achieve end-to-end incremental pointer analysis, maximizing compatibility and reuse of existing pointer analysis implementations in Doop and providing transparent support for incrementalization. We experimentally evaluated DDoop on widely-used real-world programs. The results showed that compared to the non-incremental Doop framework, DDoop has a significant performance advantage while highly compatible with a variety of pointer analysis rules existing in Doop.
Keywords:pointer analysis  incremental analysis  datalog engine  incremental computation  differential datalog
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号