[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article
Open access

The decidability and complexity of interleaved bidirected Dyck reachability

Published: 12 January 2022 Publication History

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.

Supplementary Material

Auxiliary Presentation Video (popl22main-p55-p-video.mp4)
Short video

References

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

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 6, Issue POPL
January 2022
1886 pages
EISSN:2475-1421
DOI:10.1145/3511309
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 January 2022
Published in PACMPL Volume 6, Issue POPL

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. CFL/Dyck reachability
  2. bidirected graphs
  3. complexity
  4. static analysis

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)114
  • Downloads (Last 6 weeks)23
Reflects downloads up to 12 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Reachability in Continuous Pushdown VASSProceedings of the ACM on Programming Languages10.1145/36332798:POPL(90-114)Online publication date: 5-Jan-2024
  • (2024)On-the-Fly Static Analysis via Dynamic Bidirected Dyck ReachabilityProceedings of the ACM on Programming Languages10.1145/36328848:POPL(1239-1268)Online publication date: 5-Jan-2024
  • (2023)CFL/Dyck ReachabilityACM SIGLOG News10.1145/3583660.35836649:4(5-25)Online publication date: 6-Feb-2023
  • (2023)The Fine-Grained Complexity of CFL ReachabilityProceedings of the ACM on Programming Languages10.1145/35712527:POPL(1713-1739)Online publication date: 11-Jan-2023
  • (2023)Single-Source-Single-Target Interleaved-Dyck Reachability via Integer Linear ProgrammingProceedings of the ACM on Programming Languages10.1145/35712287:POPL(1003-1026)Online publication date: 11-Jan-2023
  • (2022)Indexing the extended Dyck-CFL reachability for context-sensitive program analysisProceedings of the ACM on Programming Languages10.1145/35633396:OOPSLA2(1438-1468)Online publication date: 31-Oct-2022

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media