...
首页> 外文期刊>IEEE Transactions on Software Engineering >Value-Flow-Based Demand-Driven Pointer Analysis for C and C++
【24h】

Value-Flow-Based Demand-Driven Pointer Analysis for C and C++

机译:C和C ++的价值基于流量的需求驱动指针分析

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

摘要

We present Supa, a value-flow-based demand-driven flow- and context-sensitive pointer analysis with strong updates for C and C++ programs. Supa enables computing points-to information via value-flow refinement, in environments with small time and memory budgets. We formulate Supa by solving a graph-reachability problem on an inter-procedural value-flow graph representing a program's def-use chains, which are pre-computed efficiently but over-approximately. To answer a client query (a request for a variable's points-to set), Supa reasons about the flow of values along the pre-computed def-use chains sparsely (rather than across all program points), by performing only the work necessary for the query (rather than analyzing the whole program). In particular, strong updates are performed to filter out spurious def-use chains through value-flow refinement as long as the total budget is not exhausted. We have implemented Supa on top of LLVM (4.0.0) together with a comprehensive micro-benchmark suite after a years-long effort (consisting of around 400 test cases, including hand-written ones and the ones extracted from real programs). We have evaluated Supa by choosing uninitialized pointer detection and C++ virtual table resolution as two major clients, using 24 real-world programs including 18 open-source C programs and 6 large CPU2000/2006 C++ benchmarks. For uninitialized pointer client, Supa achieves improved precision as the analysis budget increases, with its flow-sensitive (context-insensitive) analysis reaching 97.4 percent of that achieved by whole-program Sparse Flow-Sensitive analysis (SFS) by consuming about 0.18 seconds and 65 KB of memory per query, on average (with a budget of at most 10,000 value-flow edges per query). With context-sensitivity also considered, Supa becomes more precise for some programs but also incurs more analysis times. To further demonstrate the effectiveness of Supa, we have also evaluated Supa in resolving C++ virtual tables by querying the function pointers at every virtual callsite. Compared to analysis without strong updates for heap objects, Supa's demand-driven context-sensitive strong update analysis reduces 7.35 percent spurious virtual table targets with only 0.4 secs per query, on average.
机译:我们介绍Supa,一种基于价值的需求驱动的流程和上下文敏感的指针分析,具有C和C ++程序的强更新。 Supa使得通过有值流程细化,在具有较小时间和内存预算的环境中通过价值流程来计算点。我们通过解决代表程序的DEF-MEFERIC链中的程序间值 - 流程图中的图形可加工性问题来制定SUPA,这是有效地预先计算但大致预先计算。要回答客户查询(对变量点的请求 - 设置),Supa的原因是沿着预计的DEF - 使用链条的值稀疏(而不是跨所有程序点),仅执行所需的工作查询(而不是分析整个程序)。特别是,只要总预算没有耗尽,就执行了通过有价值流过滤滤除杂散的Def-use链来进行强大的更新。我们在LLVM(4.0.0)顶部的Supa以及一系列长期努力(由大约400个测试用例组成,包括手写和从真实程序中提取的内容)的综合微基准套件。我们使用24个现实世界的程序选择了一个未初始化的指针检测和C ++虚拟表分辨率,包括18个开源C程序和6个大CPU2000 / 2006 C ++基准。对于未初始化的指针客户端,SUPA实现了改进的精确精度,因为分析预算增加,其流动敏感(上下文)分析达到全程稀疏流动敏感分析(SFS)所实现的97.4%,通过消耗约0.18秒而实现每次查询65 kB内存,平均(每次查询的最多10,000个值流程边缘)。对于上下文敏感性,还考虑了一些程序,Supa更精确,但也会扰乱更多的分析时间。为了进一步展示Supa的有效性,我们还通过在每个虚拟电呼叫步骤中查询函数指针来解析C ++虚拟表中的Supa。与分析相比,在没有堆对象的强更新的情况下,Supa的需求驱动的上下文敏感的强大更新分析减少了7.35%的虚假虚拟表目标,平均只有0.4秒的杂志虚拟表目标。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号