skip to main content

The decidability and complexity of interleaved bidirected Dyck reachability

Published:12 January 2022Publication History
Skip Abstract Section

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 DkDk) 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) D1D1 reachability (i.e., when both Dyck languages are over a single parenthesis and act as counters) is computable in O(n7) time, while (ii) DkDk 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 D1D1 reachability can be computed in O(n3· α(n)) time, significantly improving over the existing O(n7) bound. Second, we show that DkD1 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 DkD1 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 DkDk 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.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

Short video

References

  1. 2003. T. J. Watson Libraries for Analysis (WALA). https://github.com.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. Robert S. Arnold. 1996. Software Change Impact Analysis. IEEE Computer Society Press, Los Alamitos, CA, USA. isbn:0818673842Google ScholarGoogle Scholar
  4. Stephen M. et al. Blackburn. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA.Google ScholarGoogle Scholar
  5. Eric Bodden. 2012. Inter-procedural Data-flow Analysis with IFDS/IDE and Soot. In SOAP. ACM, New York, NY, USA.Google ScholarGoogle Scholar
  6. Phillip G. Bradford. 2018. Efficient Exact Paths For Dyck and semi-Dyck Labeled Path Reachability. arxiv:cs.DS/1802.05239.Google ScholarGoogle Scholar
  7. 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 ScholarGoogle Scholar
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dmitry Chistikov, Rupak Majumdar, and Philipp Schepper. 2021. Subcubic Certificates for CFL Reachability. arxiv:cs.FL/2102.13095.Google ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. Moses Ganardi, Rupak Majumdar, and Georg Zetzsche. 2021. The complexity of bidirected reachability in valence systems. arxiv:cs.FL/2110.03654.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. Thomas Reps. 1997. Program Analysis via Graph Reachability. In Proceedings of the 1997 International Symposium on Logic Programming (ILPS). 5–19.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Thomas Reps. 2000. Undecidability of Context-sensitive Data-dependence Analysis. ACM Trans. Program. Lang. Syst., 22, 1 (2000), 162–186.Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Thomas Reps, Susan Horwitz, and Mooly Sagiv. 1995. Precise Interprocedural Dataflow Analysis via Graph Reachability. In POPL. ACM, New York, NY, USA.Google ScholarGoogle Scholar
  39. Thomas Reps, Susan Horwitz, Mooly Sagiv, and Genevieve Rosay. 1994. Speeding Up Slicing. SIGSOFT Softw. Eng. Notes, 19, 5 (1994), 11–20.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle Scholar
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. Olin Grigsby Shivers. 1991. Control-Flow Analysis of Higher-Order Languages of Taming Lambda. Ph.D. Dissertation. USA. UMI Order No. GAX91-26964.Google ScholarGoogle Scholar
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. Manu Sridharan and Rastislav Bodík. 2006. Refinement-based Context-sensitive Points-to Analysis for Java. SIGPLAN Not., 41, 6 (2006), 387–400.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bodík. 2005. Demand-driven Points-to Analysis for Java. In OOPSLA.Google ScholarGoogle Scholar
  46. 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 ScholarGoogle Scholar
  47. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. Virginia Vassilevska Williams. 2019. On some fine-grained questions in algorithms and complexity.Google ScholarGoogle Scholar
  50. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  51. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  52. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  53. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  54. 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 ScholarGoogle Scholar
  55. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  56. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The decidability and complexity of interleaved bidirected Dyck reachability

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!