Name Resolution Based on Stack Graphs Conversion to Context-Free Reachability for Programming Languages
Keywords:
stack graphs, context-free reachability, abstract name resolution, graph algorithmsAbstract
This article addresses abstract name resolution, that is, binding symbol references to their definitions, using graph-based models. The article considers a method for reducing the Stack Graphs model to a context-free reachability problem (CFL-reachability). Potential applications include code-analysis and code-navigation tools, integrated development environments, and compilers. The article presents a reduction from the Stack Graphs model to CFL-reachability. The proposed solution is evaluated in practice and compared experimentally with Stack Graphs. Directions for further research and for improving the presented method and implemented tool are outlined.
References
1. P. Néron, A. P. Tolmach, E. Visser, and G. Wachsmuth, “A theory of name resolution,” in Program- ming Languages and Systems: 24th European Symposium on Programming, ESOP 2015, Held as Part of ETAPS 2015, London, UK, April 11–18, 2015, Proceedings, in Lecture Notes in Computer Science, J. Vitek, Ed., vol. 9032. Berlin, Heidelberg: Springer, 2015, pp. 205–231, doi:10.1007/978-3-662-46669-8_9.
2. H. van Antwerpen, C. Bach Poulsen, A. Rouvoet, and E. Visser, “Scopes as types,” Proceedings of the ACM on Programming Languages, vol. 2, no. OOPSLA, Nov. 2018, Art. no. 114, doi:10.1145/3276484.
3. A. Zwaan and H. van Antwerpen, “Scope graphs: The story so far,” in Eelco Visser Commemorative Symposium (EVCS 2023), in Open Access Series in Informatics (OASIcs), vol. 109. Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023, pp. 32:1–32:13, doi:10.4230/OASIcs.EVCS. 2023.32.
4. D. A. Creager and H. van Antwerpen, “Stack graphs: Name resolution at scale,” in Eelco Visser Com- memorative Symposium (EVCS 2023), in Open Access Series in Informatics (OASIcs), vol. 109. Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023, pp. 8:1–8:12, doi:10.4230/OASIcs. EVCS.2023.8.
5. T. Reps, S. Horwitz, and M. Sagiv, “Precise interprocedural dataflow analysis via graph reachability,” in Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’95). New York, NY, USA: ACM Press, 1995, pp. 49–61, doi:10.1145/199448.199462.
6. J. Hellings, (2015), “Querying for paths in graphs using context-free path queries,” (version 2, revised 31 January 2016). doi:10.48550/arXiv.1502.02242. Accessed: Aug. 29, 2026. [Online]. Available: https: //arxiv.org/abs/1502.02242
7. D. He, J. Lu, and J. Xue, “A CFL-reachability formulation of callsite-sensitive pointer analysis with built-in on-the-fly call graph construction,” in 38th European Conference on Object-Oriented Program- ming (ECOOP 2024), in Leibniz International Proceedings in Informatics (LIPIcs), J. Aldrich and G. Sal- vaneschi, Eds., vol. 313. Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024, pp. 18:1–18:29, doi:10.4230/LIPIcs.ECOOP.2024.18.
8. I. Muravev and S. Grigorev, “Universal high-performance CFL-reachability via matrix multiplication,” in Proceedings of the 14th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis (SOAP ’25). New York, NY, USA: Association for Computing Machinery, 2025, pp. 28–35, doi:10. 1145/3735544.3735585.
9. CoreJust. Stack Graph Exporter. GitHub repository. Accessed: Aug. 29, 2026. [Online]. Available: https: //github.com/CoreJust/StackGraphExporter
10. libGDX. libGDX. GitHub repository. Accessed: Aug. 29, 2026. [Online]. Available: https://github.com/ libgdx/libgdx
11. E.Debenham. ShatteredPixelDungeon.GitHubrepository.Accessed: Aug.29, 2026.[Online].Available:
https://github.com/00-Evan/shattered-pixel-dungeon
12. json-path. Jayway JsonPath. GitHub repository. Accessed: Aug. 29, 2026. [Online]. Available: https: //github.com/json-path/JsonPath
13. lipangit. JiaoZiVideoPlayer. Archived GitHub repository. (The repository was archived by its owner; the project moved to JZVideo). Accessed: Aug. 29, 2026. [Online]. Available: https://github.com/ lipangit/JiaoZiVideoPlayer
14. “CFG_bench,” GitHub repository. Accessed: May 6, 2026. [Online]. Available: https://github.com/ homka122/CFG_bench
15. I. Muravev and S. Grigorev, “FastMatrixCFPQ: an efficient linear-algebra-based approach to CFL- reachability,” International Journal on Software Tools for Technology Transfer, 2026, doi:10.1007/ s10009-026-00864-y.
Published
Issue
Section
License
Copyright (c) 2026 Егор Сергеевич Ильин, Семён Вячеславович Григорьев

This work is licensed under a Creative Commons Attribution 4.0 International License.
