On a Relational Code Model Description
https://doi.org/10.15514/ISPRAS-2025-37(6)-56
Abstract
We present an approach for systematically developing code models for programming languages based on the idea of relational specification DSL. The DSL allows to describe the entities of programming language, relations between these entities, and form queries for these relations. Besides simple information retrieval the query language can be used to specify derived relations which makes it possible to saturate an initial code model with usecase-specific intermediate representations defined in a declarative form. The DSL is strongly typed which guarantees the preservation of code model invariants. We introduce the language, its dynamic and static semantics, describe prototype implementation and evaluate certain scenarios of its utilization.
About the Authors
Dmitry Evgenievich DUZHINSKIIRussian Federation
Сomputer programmer, backend developer.
Dmitry Yurievich BOULYTCHEV
Russian Federation
Cand. Sci. (Phys.-Math,), associate professor at the Software Engineering Chair, faculty of Mathematics and Mechanics, Saint-Petersburg State University. Research interests: programming languages, compilers and tools, functional, logic and relational programming, declarative programming, program synthesis.
References
1. Benjamin C. Pierce. 2002. Types and Programming Languages (1st. ed.). The MIT Press. 648 p.
2. Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. 2006. Compilers: Principles, Techniques, and Tools (2nd Edition). Addison-Wesley Longman Publishing Co., Inc., USA.
3. Steven S. Muchnick. 1998. Advanced compiler design and implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
4. Ira D. Baxter, Andrew Yahin, Leonardo Moura, Marcelo Sant'Anna, and Lorraine Bier. 1998. Clone Detection Using Abstract Syntax Trees. In Proceedings of the International Conference on Software Maintenance (ICSM '98). IEEE Computer Society, USA, 368.
5. Fabian Yamaguchi, Markus Lottmann, and Konrad Rieck. 2012. Generalized vulnerability extrapola-tion using abstract syntax trees. In Proceedings of the 28th Annual Computer Security Applications Conference (ACSAC '12). Association for Computing Machinery, New York, NY, USA, 359–368. DOI: 10.1145/2420950.2421003.
6. Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9, 3 (July 1987), 319–349. DOI: 10.1145/24039.24041.
7. Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. 1991. Effi-ciently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst. 13, 4 (Oct. 1991), 451–490. DOI: 10.1145/115372.115320.
8. F. Yamaguchi, N. Golde, D. Arp and K. Rieck, Modeling and Discovering Vulnerabilities with Code Property Graphs, 2014 IEEE Symposium on Security and Privacy, Berkeley, CA, USA, 2014, pp. 590-604. DOI: 10.1109/SP.2014.44.
9. Joern - The Bug Hunter's Workbench. Available at: https://github.com/joernio/joern, accessed 07.12.2025.
10. CodeQL Documentation. Available at: https://codeql.github.com/docs/, accessed 07.12.2025.
11. O. d. Moor et al., "Keynote Address: .QL for Source Code Analysis," Seventh IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2007), Paris, France, 2007, pp. 3-16. DOI: 10.1109/SCAM.2007.31.
Review
For citations:
DUZHINSKII D.E., BOULYTCHEV D.Yu. On a Relational Code Model Description. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2025;37(6):159-174. https://doi.org/10.15514/ISPRAS-2025-37(6)-56






