arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1701.05650cs.PLcs.SE
收藏

需求驱动的强更新指针分析方法

Demand-Driven Pointer Analysis with Strong Updates via Value-Flow Refinement

Yulei Sui, Jingling Xue

摘要:

我们提出了一种新的需求驱动的流和上下文敏感的指针分析与强大的更新C程序,称为SUPA,使计算点的信息,通过价值流细化,在环境中的时间和内存预算小,如IDE。我们制定SUPA通过解决一个图的可达性问题的过程间的值流图表示程序的定义使用链,这是预先计算有效,但过度近似。为了回答客户端查询(请求变量的point-to-set),SUPA通过只执行查询所需的工作(而不是分析整个程序),稀疏地(而不是跨所有程序点)沿着预先计算的def-use链推理值的流动。特别地,只要总预算没有耗尽,就执行强更新以通过价值流细化过滤掉虚假的def-use链。SUPA通过在混合多阶段分析框架中应用不同的指针分析来促进效率和精度的权衡。我们已经在LLVM(3.5.0)中实现了SUPA,并通过选择未初始化指针检测作为18个开源C程序的主要客户端来对其进行评估。随着分析预算的增加,SUPA实现了更高的精度,其单级流敏感分析达到了整个程序流敏感分析的97.4%,平均每个查询消耗约0.18秒和65 KB内存(每个查询最多10000个值流边的预算)。考虑到上下文敏感性,SUPA的两阶段分析对于某些程序变得更精确,但也会导致更多的分析时间。SUPA也适合并行化。其单级流敏感分析的并行实现实现了高达6.9倍的加速比,平均为3.05倍的8核机器相对于其顺序版本。

英文摘要:

We present a new demand-driven flow- and context-sensitive pointer analysis with strong updates for C programs, called SUPA, that enables computing points-to information via value-flow refinement, in environments with small time and memory budgets such as IDEs. 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. SUPA facilitates efficiency and precision tradeoffs by applying different pointer analyses in a hybrid multi-stage analysis framework. We have implemented SUPA in LLVM (3.5.0) and evaluate it by choosing uninitialized pointer detection as a major client on 18 open-source C programs. As the analysis budget increases, SUPA achieves improved precision, with its single-stage flow-sensitive analysis reaching 97.4% of that achieved by whole-program flow-sensitive analysis by consuming about 0.18 seconds and 65KB of memory per query, on average (with a budget of at most 10000 value-flow edges per query). With context-sensitivity also considered, SUPA's two- stage analysis becomes more precise for some programs but also incurs more analysis times. SUPA is also amenable to parallelization. A parallel implementation of its single-stage flow-sensitive analysis achieves a speedup of up to 6.9x with an average of 3.05x a 8-core machine with respect its sequential version.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑