Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-642-00590-9_13guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

An Efficient Algorithm for Solving the Dyck-CFL Reachability Problem on Trees

Published: 28 March 2009 Publication History

Abstract

The context-free language (CFL) reachability problem is well known and studied in computer science, as a fundamental problem underlying many important static analyses such as points-to-analysis. Solving the CFL reachability problem in the general case is very hard. Popular solutions resorting to a graph traversal exhibit a time complexity of <em>O</em> (<em>k</em> 3 <em>n</em> 3) for a grammar of size <em>k</em> . For Dyck CFLs, a particular class of CFLs, this complexity can be reduced to <em>O</em> (<em>kn</em> 3). Only recently the first subcubic algorithm was proposed by Chaudhuri, dividing the complexity of predating solutions by a factor of log<em>n</em> .
In this paper we propose an effective algorithm for solving the CFL reachability problem for Dyck languages when the considered graph is a bidirected tree with specific constraints. Our solution pre-processes the graph in <em>O</em> (<em>n</em> log<em>n</em> log<em>k</em> ) time in a space of <em>O</em> (<em>n</em> log<em>n</em> ), after which any Dyck-CFL reachability query can be answered in <em>O</em> (1) time, while a naïve online algorithm will require <em>O</em> (<em>n</em> ) time to answer a query or require <em>O</em> (<em>n</em> 2) to store the pre-computed results for all pairs of nodes.

References

[1]
Reps, T.W.: Program analysis via graph reachability. Information & Software Technology 40(11-12), 701-726 (1998).
[2]
Rehof, J., Fähndrich, M.: Type-based flow analysis: From polymorphic subtyping to CFL-reachability. In: Proceedings of the 28th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL 2001), pp. 54-66 (2001).
[3]
Sridharan, M., Gopan, D., Shan, L., Bodík, R.: Demand-driven points-to analysis for Java. In: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2005), pp. 59-76 (2005).
[4]
Sridharan, M., Bodík, R.: Refinement-based context-sensitive points-to analysis for Java. In: Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation (PLDI 2006), pp. 387-400 (2006).
[5]
Knuth, D.E.: The art of computer programming, volume III: sorting and searching. Addison-Wesley, Reading (1973).
[6]
Hakimi, S.: Optimum locations of switching center and the absolute center and medians of a graph. Operations Research 12, 450-459 (1964).
[7]
Knuth, D.E.: The art of computer programming, volume I: fundamental algorithms. Addison-Wesley, Reading (1973).
[8]
Yannakakis, M.: Graph-theoretic methods in database theory. In: Proceedings of the 9th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS 1990), pp. 230-242 (1990).
[9]
Reps, T.W., Horwitz, S., Sagiv, S.: Precise interprocedural dataflow analysis via graph reachability. In: Conference Record of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1995), pp. 49-61 (1995).
[10]
Reps, T.W.: Shape analysis as a generalized path problem. In: Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 1995), pp. 1-11 (1995).
[11]
Zheng, X., Rugina, R.: Demand-driven alias analysis for C. In: Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2008), pp. 197-208 (2008).
[12]
Chaudhuri, S.: Subcubic algorithms for recursive state machines. In: Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2008), pp. 159-169 (2008).
[13]
Arlazarov, V.L., Dinic, E.A., Faradzev, M.A.K., I.A.: On economical construction of the transitive closure of an oriented graph. Soviet Mathematics Doklady 11, 1209-1210 (1970).
[14]
Rytter, W.: Time complexity of loop-free two-way pushdown automata. Inf. Process. Lett. 16(3), 127-129 (1983).
[15]
Rytter, W.: Fast recognition of pushdown automaton and context-free languages. Inf. Control 67(1-3), 12-22 (1986).
[16]
Alur, R., Benedikt, M., Etessami, K., Godefroid, P., Reps, T.W., Yannakakis, M.: Analysis of recursive state machines. ACM Transactions on Programming Languags and Systems 27(4), 786-818 (2005).
[17]
Kodumal, J., Aiken, A.: The set constraint/cfl reachability connection in practice. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2004), pp. 207-218 (2004).
[18]
Alur, R., Madhusudan, P.: Visibly pushdown languages. In: STOC 2004: Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, pp. 202-211. ACM, New York (2004).
[19]
Alur, R.: Marrying words and trees. In: PODS 2007: Proceedings of the twentysixth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pp. 233-242. ACM, New York (2007).
[20]
Valiant, L.G.: General context-free recognition in less than cubic time. Journal of Computer and System Sciences 10(2), 308-315 (1975).
[21]
Goldman, A.: Optimal center location in a simple network. Transportation Science 5, 212-221 (1971).
[22]
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM Journal of Computing 13(2), 338-355 (1984).
[23]
Bender, M.A., Farach-Colton, M.: The lca problem revisited. In: Proceedings of the 4th Latin American Symposium on Theoretical Informatics, pp. 88-94 (2000).

Cited By

View all

Index Terms

  1. An Efficient Algorithm for Solving the Dyck-CFL Reachability Problem on Trees
    Index terms have been assigned to the content through auto-classification.

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    ESOP '09: 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
    March 2009
    409 pages
    ISBN:9783642005893

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 28 March 2009

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 26 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Iterative-Epoch Online Cycle Elimination for Context-Free Language ReachabilityProceedings of the ACM on Programming Languages10.1145/36498628:OOPSLA1(1437-1462)Online publication date: 29-Apr-2024
    • (2023)CFL/Dyck ReachabilityACM SIGLOG News10.1145/3583660.35836649:4(5-25)Online publication date: 6-Feb-2023
    • (2022)Taming transitive redundancy for context-free language reachabilityProceedings of the ACM on Programming Languages10.1145/35633436:OOPSLA2(1556-1582)Online publication date: 31-Oct-2022
    • (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
    • (2022)Input splitting for cloud-based static application security testing platformsProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3558944(1367-1378)Online publication date: 7-Nov-2022
    • (2022)The decidability and complexity of interleaved bidirected Dyck reachabilityProceedings of the ACM on Programming Languages10.1145/34986736:POPL(1-26)Online publication date: 12-Jan-2022
    • (2018)Calling-to-reference context translation via constraint-guided CFL-reachabilityACM SIGPLAN Notices10.1145/3296979.319237853:4(196-210)Online publication date: 11-Jun-2018
    • (2018)Calling-to-reference context translation via constraint-guided CFL-reachabilityProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3192366.3192378(196-210)Online publication date: 11-Jun-2018
    • (2017)Optimal Dyck reachability for data-dependence and alias analysisProceedings of the ACM on Programming Languages10.1145/31581182:POPL(1-30)Online publication date: 27-Dec-2017
    • (2013)Fast algorithms for Dyck-CFL-reachability with applications to alias analysisACM SIGPLAN Notices10.1145/2499370.246215948:6(435-446)Online publication date: 16-Jun-2013
    • Show More Cited By

    View Options

    View options

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media