Lune

PLDI2023顶会

Recursive State Machine Guided Graph Folding for Context-Free Language Reachability

Yuxiang Lei, Yulei Sui, Shin Hwei Tan, Qirun Zhang

摘要

Context-free language reachability (CFL-reachability) is a fundamental framework for program analysis. A large variety of static analyses can be formulated as CFL-reachability problems, which determines whether specific source-sink pairs in an edge-labeled graph are connected by a reachable path, i.e., a path whose edge labels form a string accepted by the given CFL. Computing CFL-reachability is expensive. The fastest algorithm exhibits a slightly subcubic time complexity with respect to the input graph size. Improving the scalability of CFL-reachability is of practical interest, but reducing the time complexity is inherently difficult.

In this paper, we focus on improving the scalability of CFL-reachability from a more practical perspectivereducing the input graph size. Our idea arises from the existence of trivial edges, i.e., edges that do not affect any reachable path in CFL-reachability. We observe that two nodes joined by trivial edges can be folded-by merging the two nodes with all the edges joining them removed-without affecting the CFL-reachability result. By studying the characteristic of the recursive state machines (RSMs), an alternative form of CFLs, we propose an approach to identify foldable node pairs without the need to verify the underlying reachable paths (which is equivalent to solving the CFL-reachability problem). In particular, given a CFL-reachability problem instance with an input graph and an RSM, based on the correspondence between paths in and state transitions in RSM, we propose a graph folding principle, which can determine whether two adjacent nodes are foldable by examining only their incoming and outgoing edges.

On top of the graph folding principle, we propose an efficient graph folding algorithm Gf. The time complexity of Gf is linear with respect to the number of nodes in the input graph. Our evaluations on two clients (alias analysis and value-flow analysis) show that Gf significantly accelerates RSM/CFL-reachability by reducing the input graph size. On average, for value-flow analysis, Gf reduces 60.96% of nodes and 42.67% of edges of the input graphs, obtaining a speedup of 4.65× and a memory usage reduction of 57.35%. For alias analysis, Gf reduces 38.93% of nodes and 35.61% of edges of the input graphs, obtaining a speedup of 3.21× and a memory usage reduction of 65.19%.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Two Birds with One Stone: Multi-Derivation for Fast Context-Free Language Reachability Analysis 引用了 Fast graph simplification for interleaved Dyck-reachability
  • Two Birds with One Stone: Multi-Derivation for Fast Context-Free Language Reachability Analysis 引用了 Taming transitive redundancy for context-free language reachability
  • Boosting the Performance of Alias-Aware IFDS Analysis with CFL-Based Environment Transformers 引用了 Two Birds with One Stone: Multi-Derivation for Fast Context-Free Language Reachability Analysis
  • Boosting the Performance of Alias-Aware IFDS Analysis with CFL-Based Environment Transformers 引用了 Fast graph simplification for interleaved Dyck-reachability
  • Boosting the Performance of Alias-Aware IFDS Analysis with CFL-Based Environment Transformers 引用了 Taming transitive redundancy for context-free language reachability
  • Fast Graph Simplification for Path-Sensitive Typestate Analysis through Tempo-Spatial Multi-Point Slicing 引用了 Flow2Vec: value-flow-based precise code embedding
  • Fast Graph Simplification for Path-Sensitive Typestate Analysis through Tempo-Spatial Multi-Point Slicing 引用了 Fast graph simplification for interleaved Dyck-reachability
  • Taming transitive redundancy for context-free language reachability 引用了 Fast graph simplification for interleaved Dyck-reachability
  • Efficient Abstract Interpretation via Selective Widening 引用了 Flow2Vec: value-flow-based precise code embedding
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Two Birds with One Stone: Multi-Derivation for Fast Context-Free Language Reachability AnalysisChenghang Shi, Haofeng Li, Yulei Sui, Jie Lu 等ASE 2023 · 6 次引用
  2. Boosting the Performance of Alias-Aware IFDS Analysis with CFL-Based Environment TransformersHaofeng Li, Chenghang Shi, Jie Lu, Lian Li 等OOPSLA 2024 · 6 次引用
  3. Fast Graph Simplification for Path-Sensitive Typestate Analysis through Tempo-Spatial Multi-Point SlicingXiao Cheng, Jiawei Ren, Yulei SuiFSE 2024 · 4 次引用
  4. Efficient Abstract Interpretation via Selective WideningJiawei Wang, Xiao Cheng, Yulei SuiOOPSLA 2025

它引用的 Paper3

  1. Flow2Vec: value-flow-based precise code embeddingYulei Sui, Xiao Cheng, Guanqin Zhang, Haoyu WangOOPSLA 2020 · 94 次引用
  2. Fast graph simplification for interleaved Dyck-reachabilityYuanbo Li, Qirun Zhang, Thomas W. RepsPLDI 2020 · 30 次引用
  3. Taming transitive redundancy for context-free language reachabilityYuxiang Lei, Yulei Sui, Shuo Ding, Qirun ZhangOOPSLA 2022 · 16 次引用

相关 Paper

  1. Iterative-Epoch Online Cycle Elimination for Context-Free Language ReachabilityPei Xu, Yuxiang Lei, Yulei Sui, Jingling XueOOPSLA 2024 · 3 次引用
  2. Context-Free Language Reachability via Skewed TabulationYuxiang Lei, Camille Bossut, Yulei Sui, Qirun ZhangPLDI 2024 · 5 次引用
  3. Better Not Together: Staged Solving for Context-Free Language ReachabilityChenghang Shi, Haofeng Li, Jie Lu, Lian LiISSTA 2024 · 2 次引用
  4. Fast Client-Driven CFL-Reachability via Regularization-Based Graph SimplificationChenghang Shi, Dongjie He, Haofeng Li, Jie Lu 等OOPSLA 2025 · 2 次引用
  5. Context-Free Language Reachability via Efficient Relation ChainingChenghang Shi, Haofeng Li, Jie Lu, Lian LiOOPSLA 2026
黄昏的海面,两侧是细线勾勒的悬崖