Efficient algorithms for dynamic bidirected Dyck-reachability

Efficient algorithms for dynamic bidirected Dyck-reachability
复制标题

DOI:
10.1145/3498724
复制
发表时间:
2022-01
影响因子:
--
通讯作者:
Yuanbo Li;K. Satya;Qirun Zhang
Yuanbo Li;K. Satya;Qirun Zhang
中科院分区:
--
文献类型:
--
作者:
Yuanbo Li;K. Satya;Qirun Zhang

文献摘要

被引文献

相似文献

戴克(Dyck)可容纳性是程序分析的基本公式,该公式已被广泛用于捕获适当匹配的 - 分娩程序属性,例如函数呼叫/返回和现场写入/读取。每个边缘u→(iv用开放的括号标记的iv(i”标记为“(i”)的图形,伴随着逆边缘v→)iu标记为相应的近亲括号“)i”,并vice vice在实践中,许多客户分析(例如别名分析)采用了双向型的dyck-Rephable公式。 O(M)时间中的全对意识信息。在一系列边缘插入和删除的序列中,在双向图中维持全对的问题。例如,即使为了保持及物闭合,最快的确定性动态算法也需要O(n2)更新时间才能达到O(1)查询时间。全对戴克(All Pairs)的概述是对及时闭合的概括,尽管对逐步计算进行了广泛的研究,但在动态图算法上没有算法开发,用于程序分析,并保证了我们的工作。在双向图上的Dyck反应。 O(1)时间中的全对接收查询,其中α(n)是逆Ackermann函数基于O(M)的直接方法的动态算法 - 最佳的双向型型Dyck-Reach性算法和最新的增量数据求解器。在这两种方法上都达到了数量级的速度。
Dyck-reachability is a fundamental formulation for program analysis, which has been widely used to capture properly-matched-parenthesis program properties such as function calls/returns and field writes/reads. Bidirected Dyck-reachability is a relaxation of Dyck-reachability on bidirected graphs where each edge u→(iv labeled by an open parenthesis “(i” is accompanied with an inverse edge v→)iu labeled by the corresponding close parenthesis “)i”, and vice versa. In practice, many client analyses such as alias analysis adopt the bidirected Dyck-reachability formulation. Bidirected Dyck-reachability admits an optimal reachability algorithm. Specifically, given a graph with n nodes and m edges, the optimal bidirected Dyck-reachability algorithm computes all-pairs reachability information in O(m) time. This paper focuses on the dynamic version of bidirected Dyck-reachability. In particular, we consider the problem of maintaining all-pairs Dyck-reachability information in bidirected graphs under a sequence of edge insertions and deletions. Dynamic bidirected Dyck-reachability can formulate many program analysis problems in the presence of code changes. Unfortunately, solving dynamic graph reachability problems is challenging. For example, even for maintaining transitive closure, the fastest deterministic dynamic algorithm requires O(n2) update time to achieve O(1) query time. All-pairs Dyck-reachability is a generalization of transitive closure. Despite extensive research on incremental computation, there is no algorithmic development on dynamic graph algorithms for program analysis with worst-case guarantees. Our work fills the gap and proposes the first dynamic algorithm for Dyck reachability on bidirected graphs. Our dynamic algorithms can handle each graph update (i.e., edge insertion and deletion) in O(n·α(n)) time and support any all-pairs reachability query in O(1) time, where α(n) is the inverse Ackermann function. We have implemented and evaluated our dynamic algorithm on an alias analysis and a context-sensitive data-dependence analysis for Java. We compare our dynamic algorithms against a straightforward approach based on the O(m)-time optimal bidirected Dyck-reachability algorithm and a recent incremental Datalog solver. Experimental results show that our algorithm achieves orders of magnitude speedup over both approaches.