English

Grammar-Constrained (CFL) Reachability: Subcubic Preprocessing, Indexing Trade-offs, and Structured Decoding Semantics

Data Structures and Algorithms 2026-03-02 v1 Formal Languages and Automata Theory

Abstract

We study the problem of grammar-constrained context-free language reachability in graphs, focusing on complexity and empirical performance. We present an algorithmic framework for evaluating reachability queries constrained by context-free grammars, and analyze its theoretical runtime bounds. To complement our theoretical results, we conduct an extensive empirical evaluation on a comprehensive benchmark of real-world schemas, comparing different algorithmic variants and reporting performance trade-offs. Our results highlight the impact of grammar structure and graph characteristics on reachability computation, and provide guidance for selecting efficient approaches in practice.

Keywords

Cite

@article{arxiv.2602.23401,
  title  = {Grammar-Constrained (CFL) Reachability: Subcubic Preprocessing, Indexing Trade-offs, and Structured Decoding Semantics},
  author = {Faruk Alpay and Levent Sarioglu},
  journal= {arXiv preprint arXiv:2602.23401},
  year   = {2026}
}

Comments

19 pages, 4 figures, 4 tables. Code and empirical data available at: https://github.com/farukalpay/grammar-constrained-cfl-reachability-empirical

R2 v1 2026-07-01T10:54:29.478Z