Abstract
Dyck reachability is the standard formulation of a large domain of static analyses, as it achieves the sweet spot between precision and efficiency, and has thus been studied extensively. Interleaved Dyck reachability (denoted Dk⊙ Dk) uses two Dyck languages for increased precision (e.g., context and field sensitivity) but is well-known to be undecidable. As many static analyses yield a certain type of bidirected graphs, they give rise to interleaved bidirected Dyck reachability problems. Although these problems have seen numerous applications, their decidability and complexity has largely remained open. In a recent work, Li et al. made the first steps in this direction, showing that (i) D1⊙ D1 reachability (i.e., when both Dyck languages are over a single parenthesis and act as counters) is computable in O(n7) time, while (ii) Dk⊙ Dk reachability is NP-hard. However, despite this recent progress, most natural questions about this intricate problem are open.
In this work we address the decidability and complexity of all variants of interleaved bidirected Dyck reachability. First, we show that D1⊙ D1 reachability can be computed in O(n3· α(n)) time, significantly improving over the existing O(n7) bound. Second, we show that Dk⊙ D1 reachability (i.e., when one language acts as a counter) is decidable, in contrast to the non-bidirected case where decidability is open. We further consider Dk⊙ D1 reachability where the counter remains linearly bounded. Our third result shows that this bounded variant can be solved in O(n2· α(n)) time, while our fourth result shows that the problem has a (conditional) quadratic lower bound, and thus our upper bound is essentially optimal. Fifth, we show that full Dk⊙ Dk reachability is undecidable. This improves the recent NP-hardness lower-bound, and shows that the problem is equivalent to the non-bidirected case. Our experiments on standard benchmarks show that the new algorithms are very fast in practice, offering many orders-of-magnitude speedups over previous methods.
Supplemental Material
- 2003. T. J. Watson Libraries for Analysis (WALA). https://github.com.Google Scholar
- Rajeev Alur and P. Madhusudan. 2004. Visibly Pushdown Languages. In Proceedings of the Thirty-Sixth Annual ACM Symposium on Theory of Computing (STOC ’04). Association for Computing Machinery, New York, NY, USA. 202–211. isbn:1581138520 https://doi.org/10.1145/1007352.1007390 Google Scholar
Digital Library
- Robert S. Arnold. 1996. Software Change Impact Analysis. IEEE Computer Society Press, Los Alamitos, CA, USA. isbn:0818673842Google Scholar
- Stephen M. et al. Blackburn. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA.Google Scholar
- Eric Bodden. 2012. Inter-procedural Data-flow Analysis with IFDS/IDE and Soot. In SOAP. ACM, New York, NY, USA.Google Scholar
- Phillip G. Bradford. 2018. Efficient Exact Paths For Dyck and semi-Dyck Labeled Path Reachability. arxiv:cs.DS/1802.05239.Google Scholar
- Jakob Cetti Hansen, Adam Husted Kjelstrøm, and Andreas Pavlogiannis. 2021. Tight bounds for reachability problems on one-counter and pushdown systems. Inform. Process. Lett., 171 (2021), 106135. issn:0020-0190 https://doi.org/10.1016/j.ipl.2021.106135 Google Scholar
- Krishnendu Chatterjee, Bhavya Choudhary, and Andreas Pavlogiannis. 2018. Optimal Dyck Reachability for Data-Dependence and Alias Analysis. Proc. ACM Program. Lang., 2, POPL (2018), Article Article 30, Dec., 30 pages.Google Scholar
Digital Library
- Krishnendu Chatterjee, Amir Kafshdar Goharshady, Rasmus Ibsen-Jensen, and Andreas Pavlogiannis. 2020. Optimal and Perfectly Parallel Algorithms for On-demand Data-Flow Analysis. In Programming Languages and Systems, Peter Müller (Ed.). Springer International Publishing, Cham. 112–140. isbn:978-3-030-44914-8Google Scholar
- Krishnendu Chatterjee, Rasmus Ibsen-Jensen, Andreas Pavlogiannis, and Prateesh Goyal. 2015. Faster Algorithms for Algebraic Path Properties in Recursive State Machines with Constant Treewidth. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’15). Association for Computing Machinery, New York, NY, USA. 97–109. isbn:9781450333009 https://doi.org/10.1145/2676726.2676979 Google Scholar
Digital Library
- Krishnendu Chatterjee, Bernhard Kragl, Samarth Mishra, and Andreas Pavlogiannis. 2017. Faster Algorithms for Weighted Recursive State Machines. Springer Berlin Heidelberg, Berlin, Heidelberg. 287–313. isbn:978-3-662-54434-1 https://doi.org/10.1007/978-3-662-54434-1_11 Google Scholar
Digital Library
- Swarat Chaudhuri. 2008. Subcubic Algorithms for Recursive State Machines. SIGPLAN Not., 43, 1 (2008), Jan., 159–169. issn:0362-1340 https://doi.org/10.1145/1328897.1328460 Google Scholar
Digital Library
- Dmitry Chistikov, Rupak Majumdar, and Philipp Schepper. 2021. Subcubic Certificates for CFL Reachability. arxiv:cs.FL/2102.13095.Google Scholar
- Alain Deutsch. 1994. Interprocedural May-Alias Analysis for Pointers: Beyond k-Limiting. SIGPLAN Not., 29, 6 (1994), June, 230–241. issn:0362-1340 https://doi.org/10.1145/773473.178263 Google Scholar
Digital Library
- Matthias Englert, Ranko Lazić, and Patrick Totzke. 2016. Reachability in Two-Dimensional Unary Vector Addition Systems with States is NL-Complete. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS ’16). Association for Computing Machinery, New York, NY, USA. 477–484. isbn:9781450343916 https://doi.org/10.1145/2933575.2933577 Google Scholar
Digital Library
- Kostas Ferles, Jon Stephens, and Isil Dillig. 2021. Verifying Correct Usage of Context-Free API Protocols. Proc. ACM Program. Lang., 5, POPL (2021), Article 17, Jan., 30 pages. https://doi.org/10.1145/3434298 Google Scholar
Digital Library
- Moses Ganardi, Rupak Majumdar, and Georg Zetzsche. 2021. The complexity of bidirected reachability in valence systems. arxiv:cs.FL/2110.03654.Google Scholar
- Nevin Heintze and David McAllester. 1997. On the Cubic Bottleneck in Subtyping and Flow Analysis. In Proceedings of the 12th Annual IEEE Symposium on Logic in Computer Science (LICS ’97). IEEE Computer Society, Washington, DC, USA. 342–. isbn:0-8186-7925-5 http://dl.acm.org/citation.cfm?id=788019.788876Google Scholar
Digital Library
- Wei Huang, Yao Dong, Ana Milanova, and Julian Dolby. 2015. Scalable and Precise Taint Analysis for Android. In Proceedings of the 2015 International Symposium on Software Testing and Analysis (ISSTA 2015). Association for Computing Machinery, New York, NY, USA. 106–117. isbn:9781450336208 https://doi.org/10.1145/2771783.2771803 Google Scholar
Digital Library
- Vineet Kahlon. 2008. Parameterization as Abstraction: A Tractable Approach to the Dataflow Analysis of Concurrent Programs. In Proceedings of the Twenty-Third Annual IEEE Symposium on Logic in Computer Science (LICS 2008). IEEE Computer Society Press, 181–192.Google Scholar
Digital Library
- Adam Husted Kjelstrøm and Andreas Pavlogiannis. 2021. The Decidability and Complexity of Interleaved Bidirected Dyck Reachability. arxiv:cs.PL/2111.05923. arxiv:2111.05923Google Scholar
- Johannes Lerch, Johannes Späth, Eric Bodden, and Mira Mezini. 2015. Access-Path Abstraction: Scaling Field-Sensitive Data-Flow Analysis with Unbounded Access Paths. In Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering (ASE ’15). IEEE Press, 619–629. isbn:9781509000241 https://doi.org/10.1109/ASE.2015.9 Google Scholar
Digital Library
- Jérôme Leroux, Grégoire Sutre, and Patrick Totzke. 2015. On Boundedness Problems for Pushdown Vector Addition Systems. In Reachability Problems, Mikolai Bojanczyk, Slawomir Lasota, and Igor Potapov (Eds.). Springer International Publishing, Cham. 101–113. isbn:978-3-319-24537-9Google Scholar
- Jérôme Leroux, Grégoire Sutre, and Patrick Totzke. 2015. On the Coverability Problem for Pushdown Vector Addition Systems in One Dimension. In Automata, Languages, and Programming, Magnús M. Halldórsson, Kazuo Iwama, Naoki Kobayashi, and Bettina Speckmann (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 324–336. isbn:978-3-662-47666-6Google Scholar
- Ondřej Lhoták and Laurie Hendren. 2006. Context-Sensitive Points-to Analysis: Is It Worth It? In Proceedings of the 15th International Conference on Compiler Construction (CC). 47–64.Google Scholar
Digital Library
- Yuanbo Li, Qirun Zhang, and Thomas Reps. 2020. Fast Graph Simplification for Interleaved Dyck-Reachability. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 780–793. isbn:9781450376136 https://doi.org/10.1145/3385412.3386021 Google Scholar
Digital Library
- Yuanbo Li, Qirun Zhang, and Thomas Reps. 2021. On the Complexity of Bidirected Interleaved Dyck-Reachability. Proc. ACM Program. Lang., 5, POPL (2021), Article 59, Jan., 28 pages. https://doi.org/10.1145/3434340 Google Scholar
Digital Library
- Jingbo Lu and Jingling Xue. 2019. Precision-Preserving yet Fast Object-Sensitive Pointer Analysis with Partial Context Sensitivity. Proc. ACM Program. Lang., 3, OOPSLA (2019), Article 148, Oct., 29 pages. https://doi.org/10.1145/3360574 Google Scholar
Digital Library
- P. Madhusudan and Gennaro Parlato. 2011. The Tree Width of Auxiliary Storage. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). Association for Computing Machinery, New York, NY, USA. 283–294. isbn:9781450304900 https://doi.org/10.1145/1926385.1926419 Google Scholar
Digital Library
- Anders Alnor Mathiasen and Andreas Pavlogiannis. 2021. The Fine-Grained and Parallel Complexity of Andersen’s Pointer Analysis. Proc. ACM Program. Lang., 5, POPL (2021), Article 34, Jan., 29 pages. https://doi.org/10.1145/3434315 Google Scholar
Digital Library
- Ana Milanova. 2020. FlowCFL: Generalized Type-Based Reachability Analysis: Graph Reduction and Equivalence of CFL-Based and Type-Based Reachability. Proc. ACM Program. Lang., 4, OOPSLA (2020), Article 178, Nov., 29 pages. https://doi.org/10.1145/3428246 Google Scholar
Digital Library
- Laurent Pierre. 1992. Rational indexes of generators of the cone of context-free languages. Theoretical Computer Science, 95, 2 (1992), 279 – 305. issn:0304-3975 https://doi.org/10.1016/0304-3975(92)90269-L Google Scholar
Digital Library
- Shaz Qadeer and Jakob Rehof. 2005. Context-Bounded Model Checking of Concurrent Software. In Proceedings of the 11th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’05). Springer-Verlag, Berlin, Heidelberg. 93–107. isbn:3540253335 https://doi.org/10.1007/978-3-540-31980-1_7 Google Scholar
Digital Library
- Jakob Rehof and Manuel Fähndrich. 2001. Type-base Flow Analysis: From Polymorphic Subtyping to CFL-reachability. In Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 54–66.Google Scholar
Digital Library
- Thomas Reps. 1995. Shape Analysis As a Generalized Path Problem. In Proceedings of the 1995 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM ’95). ACM, 1–11.Google Scholar
Digital Library
- Thomas Reps. 1997. Program Analysis via Graph Reachability. In Proceedings of the 1997 International Symposium on Logic Programming (ILPS). 5–19.Google Scholar
Digital Library
- Thomas Reps. 2000. Undecidability of Context-sensitive Data-dependence Analysis. ACM Trans. Program. Lang. Syst., 22, 1 (2000), 162–186.Google Scholar
Digital Library
- Thomas Reps, Susan Horwitz, and Mooly Sagiv. 1995. Precise Interprocedural Dataflow Analysis via Graph Reachability. In POPL. ACM, New York, NY, USA.Google Scholar
- Thomas Reps, Susan Horwitz, Mooly Sagiv, and Genevieve Rosay. 1994. Speeding Up Slicing. SIGSOFT Softw. Eng. Notes, 19, 5 (1994), 11–20.Google Scholar
Digital Library
- Sylvain Schmitz and Georg Zetzsche. 2019. Coverability Is Undecidable in One-Dimensional Pushdown Vector Addition Systems with Resets. In Reachability Problems, Emmanuel Filiot, Raphaël Jungers, and Igor Potapov (Eds.). Springer International Publishing, Cham. 193–201. isbn:978-3-030-30806-3Google Scholar
- Lei Shang, Xinwei Xie, and Jingling Xue. 2012. On-demand Dynamic Summary-based Points-to Analysis. In Proceedings of the Tenth International Symposium on Code Generation and Optimization (CGO ’12). ACM, 264–274.Google Scholar
Digital Library
- Olin Grigsby Shivers. 1991. Control-Flow Analysis of Higher-Order Languages of Taming Lambda. Ph.D. Dissertation. USA. UMI Order No. GAX91-26964.Google Scholar
- Johannes Späth, Karim Ali, and Eric Bodden. 2019. Context-, Flow-, and Field-Sensitive Data-Flow Analysis Using Synchronized Pushdown Systems. Proc. ACM Program. Lang., 3, POPL (2019), Article 48, Jan., 29 pages. https://doi.org/10.1145/3290361 Google Scholar
Digital Library
- Manu Sridharan and Rastislav Bodík. 2006. Refinement-based Context-sensitive Points-to Analysis for Java. SIGPLAN Not., 41, 6 (2006), 387–400.Google Scholar
Digital Library
- Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bodík. 2005. Demand-driven Points-to Analysis for Java. In OOPSLA.Google Scholar
- Hao Tang, Di Wang, Yingfei Xiong, Lingming Zhang, Xiaoyin Wang, and Lu Zhang. 2017. Conditional Dyck-CFL Reachability Analysis for Complete and Efficient Library Summarization. In Programming Languages and Systems, Hongseok Yang (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 880–908. isbn:978-3-662-54434-1Google Scholar
- Jyothi Vedurada and V. Krishna Nandivada. 2019. Batch Alias Analysis. In Proceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering (ASE ’19). IEEE Press, 936–948. isbn:9781728125084 https://doi.org/10.1109/ASE.2019.00091 Google Scholar
Digital Library
- Ryan Williams. 2005. A New Algorithm for Optimal 2-Constraint Satisfaction and Its Implications. Theor. Comput. Sci., 348, 2 (2005), Dec., 357–365. issn:0304-3975 https://doi.org/10.1016/j.tcs.2005.09.023 Google Scholar
Digital Library
- Virginia Vassilevska Williams. 2019. On some fine-grained questions in algorithms and complexity.Google Scholar
- Guoqing Xu, Atanas Rountev, and Manu Sridharan. 2009. Scaling CFL-Reachability-Based Points-To Analysis Using Context-Sensitive Must-Not-Alias Analysis. In Proceedings of the 23rd European Conference on ECOOP 2009 — Object-Oriented Programming (Genoa). 98–122.Google Scholar
Digital Library
- Dacong Yan, Guoqing Xu, and Atanas Rountev. 2011. Demand-driven Context-sensitive Alias Analysis for Java. In Proceedings of the 2011 International Symposium on Software Testing and Analysis (ISSTA). 155–165.Google Scholar
Digital Library
- Mihalis Yannakakis. 1990. Graph-theoretic Methods in Database Theory. In Proceedings of the Ninth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS). 230–242.Google Scholar
Digital Library
- Hao Yuan and Patrick Eugster. 2009. An Efficient Algorithm for Solving the Dyck-CFL Reachability Problem on Trees. In Proceedings of the 18th European Symposium on Programming Languages and Systems: Held As Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009 (ESOP). 175–189.Google Scholar
Digital Library
- Qirun Zhang, Michael R. Lyu, Hao Yuan, and Zhendong Su. 2013. Fast Algorithms for Dyck-CFL-reachability with Applications to Alias Analysis. PLDI. ACM.Google Scholar
- Qirun Zhang and Zhendong Su. 2017. Context-Sensitive Data-Dependence Analysis via Linear Conjunctive Language Reachability. SIGPLAN Not., 52, 1 (2017), Jan., 344–358. issn:0362-1340 https://doi.org/10.1145/3093333.3009848 Google Scholar
Digital Library
- Xin Zheng and Radu Rugina. 2008. Demand-driven Alias Analysis for C. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’08). ACM, 197–208.Google Scholar
Digital Library
Index Terms
The decidability and complexity of interleaved bidirected Dyck reachability
Recommendations
On the complexity of bidirected interleaved Dyck-reachability
Many program analyses need to reason about pairs of matching actions, such as call/return, lock/unlock, or set-field/get-field. The family of Dyck languages {Dk}, where Dk has k kinds of parenthesis pairs, can be used to model matching actions as ...
Optimal Dyck reachability for data-dependence and alias analysis
A fundamental algorithmic problem at the heart of static analysis is Dyck reachability. The input is a graph where the edges are labeled with different types of opening and closing parentheses, and the reachability information is computed via paths ...
The Complexity of Bidirected Reachability in Valence Systems
LICS '22: Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer ScienceReachability problems in infinite-state systems are often subject to extremely high complexity. This motivates the investigation of efficient overapproximations, where we add transitions to obtain a system in which reachability can be decided more ...






Comments