On an Approach to the Implementation of a Universal Interpreter Based on L-Transducers

A.A. Nikolaev

Abstract


The paper presents the development of a universal interpreter that can be configured for a specific programming language using a dedicated graph-based specification. The lexical and syntactic levels of the language are represented by sets of L-graphs, while the rules for translating a program into an internal representation are defined by an L-transducer with actions. A postfix sequence of instructions is used as the intermediate representation and is executed by a stack-based virtual machine. The paper describes the general scheme of program processing, the language-specification format, and the architecture of the software prototype. The implementation includes a graphical editor, loading and validation of the language specification, lexical and syntactic analysis, generation of a program for the stack machine, and its execution. The proposed approach is illustrated by an example in which a program consists of a single number and produces that number incremented by one. The paper also discusses the supported constructs of input languages and directions for further development of the system.

Full Text:

PDF (Russian)

References


Johnson S. C. Yacc: Yet Another Compiler-Compiler // Unix Programmer’s Manual. – Murray Hill: Bell Laboratories, 1975.

Parr T. The Definitive ANTLR 4 Reference. – Raleigh: Pragmatic

Bookshelf, 2013.

Lopez B., Ortin F., Noval J. Reflection as the Basis for Developing a

Dynamic SoC Persistence System // Journal of Object Technology. – 2004. – Vol. 3, no. 8. – P. 121–145.

Tusil J., Obdrzalek J. Minuska: Towards a Formally Verified Programming Language Framework. – 2024. – arXiv:2409.11530.

Rosu G., Serbanuta T. F. An Overview of the K Semantic Framework // Journal of Logic and Algebraic Programming. – 2010. – Vol. 79, no. 6. – P. 397–434.

Felleisen M., Findler R. B., Flatt M. Semantics Engineering with PLT

Redex. – Cambridge: MIT Press, 2009.

Kats L. C. L., Visser E. The Spoofax Language Workbench: Rules for Declarative Specification of Languages and IDEs // Proceedings of OOPSLA 2010. – New York: ACM, 2010. – P. 444–463.

Reynolds J. C. Definitional Interpreters for Higher-Order Programming Languages // Proceedings of the ACM Annual Conference. – New York: ACM, 1972. – P. 717–740.

Wuerthinger T., Wimmer C., Woess A., Stadler L., Duboscq G., Humer C., Richards G., Simon D., Wolczko M. One VM to Rule Them All //Proceedings of Onward! 2013. – New York: ACM, 2013. – P. 187–204.

Zhogolev Ye. A. The Interpreter POLIZ-63 // U.S.S.R. Computational Mathematics and Mathematical Physics. – 1965. – Vol. 5, no. 1. – P. 89–100.

Vylitok A. A. Describing Formal Languages Using L-Graphs // International Journal of Open Information Technologies. – 2025. – Vol. 13, no. 11. – P. 1–5. (In Russian.)

Li Jiamian. Algorithms for Transforming Context-Free Grammars into L-Graphs // International Journal of Open Information Technologies. – 2025. – Vol. 13, no. 11. – P. 6–13. (In Russian.)

Mu Jingyuan. Algorithm for Transforming Context-Free Expressions into Equivalent L-Graphs // International Journal of Open Information Technologies. – 2025. – Vol. 13, no. 11. – P. 14–22. (In Russian.)

Vylitok A. A., Zubova M. A., Melnikov B. F. On an Extension of the Class of Finite Automata for Defining Context-Free Languages // Vestnik of Moscow University. Series 15: Computational Mathematics

and Cybernetics. – 2013. – No. 1. – P. 39–45. (In Russian.)

Vylitok A. A., Lai Wentao. Constructing Algorithms Using L-Graphs // Abstracts of the Scientific Conference “Tikhonov Readings”. – Moscow: MAKS Press, 2022. – P. 48. (In Russian.)

Vylitok A. A., Lai Wentao. Constructing a Composition of LTransducers // Abstracts of the Scientific Conference “Tikhonov Readings”. – Moscow: MAKS Press, 2023. – P. 106. (In Russian.)

Lai Wentao. Construction of Algorithms and Program Generation

Based on L-Transducers: Master’s Thesis / Supervisor A. A. Vylitok. – Moscow: Lomonosov Moscow State University, 2024. (In Russian.)

Nikolaev A. A. Development and Implementation of a Universal

Interpreter Based on L-Transducers: Master’s Thesis / Supervisor A. A. Vylitok. – Moscow: Lomonosov Moscow State University, 2026. (In Russian.)

Universal L-Interpreter [Electronic resource] // GitHub. – URL: https://github.com/Nikas0604/Universal-L-interpreter.


Refbacks

  • There are currently no refbacks.


Abava  Кибербезопасность Monetec 2026 СНЭ

ISSN: 2307-8162