Development of Lightweight Parsers with Different Go Language Granularity
Main Article Content
Abstract
We consider an approach to creating a family of lightweight grammars with the Any symbol denoting skipping code parts [1]. Definition and examples of increasing the granularity of grammar rules are given. Memory and time efficiency of lightweight parsers is analyzed on seven industrial repositories. It is shown that increasing grammar granularity does not significantly increase parser resource consumption and varies slightly depending on repository type and Go writing style. Furthermore, the advantages of using lightweight grammars with Any over full grammars are summarized. An example of using a lightweight grammar to determine code complexity is presented. In addition, the results can be applied to estimate the parser's share of the total resource consumption, for example in the task of code binding and project markup.
Article Details
References
2. Bodner J. Learning Go. An Idiomatic Approach to Real-World Go Programming. Sebastopol: O’Reilly Media Inc., 2024. 353 p.
3. Головешкин А.В., Михалкович С.С. Разметка сквозных функциональностей в коде программы // Труды XXI Всероссийской научной конференции «Научный сервис в сети Интернет», Новороссийск, Россия, 23–28 сентября 2019 г. ИПМ им. М.В. Келдыша: 2019, с. 245–256.
4. Malevannyy M., Mikhalkovich S. Context-based model for concern markup of a source code // Proc. ISP RAS. 2016. Vol. 28. P. 63–78.
5. Moonen L. Generating Robust Parsers Using Island Grammars // Proceedings of the 8th Working Conference on Reverse Engineering, Stuttgart, Germany, Oct. 2 to Oct. 5 2001. IEEE: 2001, P. 13–22.
6. Moonen L. Lightweight Impact Analysis using Island Grammars // Proceedings of the 10th International Workshop on Program Comprehension, Paris, France, June 27 2002 to June 29 2002. IEEE: 2002, P. 219–228.
7. Дроздов Д.С., Михалкович С.С. Создание и постобработка легковесных грамматик Go и GraphQL для разметки функциональностей кода // Труды XXXI всероссийской научной конференции «Современные информационные технологии: тенденции и перспективы развития», Ростов-на-Дону, Россия, 18–20 апреля 2024. ЮФУ: 2024, С. 163–165.
8. Головешкин А.В., Михалкович С.С. LanD: инструментальный комплекс поддержки послойной разработки программ // Труды XXV всероссийской научной конференции «Современные информационные технологии: тенденции и перспективы развития», Ростов-на-Дону, Россия, 17–18 мая 2018. ЮФУ: 2018, С. 53–56.
9. Freeman A. Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang. New York: Apress, 2022. 1105 p.
10. Мельцов В.Ю. Лекции по теории автоматов. Часть 2. Киров: ВятГУ, 2010. 24 с.
11. Goloveshkin A.V., Mikhalkovich S.S. Using improved context-based code description for robust algorithmic binding to changing code // Procedia Computer Science, 2021. Vol. 139. P. 239–249.
12. Robillard M., Murphy G. Concern graphs: finding and describing concerns using structural program dependencies // Proceedings of the 24th international conference on Software engineering, New York, United States, May 19 to May 25 2002. ACM: 2002, P. 406–416.
13. Paltenghi M., Pandita R. et al. Extracting Meaningful Attention on Source Code: An Empirical Study of Developer and Neural Model Code Exploration // IEEE Transactions on Software Engineering. 2022. Vol. 50, No. 10, P. 256–2582.
14. Okuda K., Chiba S. Lake symbols for island parsing // The Art, Science, and Engineering of Programming. 2021. Vol. 5. Issue 2. P. 11:3–11:32.
This work is licensed under a Creative Commons Attribution 4.0 International License.
Presenting an article for publication in the Russian Digital Libraries Journal (RDLJ), the authors automatically give consent to grant a limited license to use the materials of the Kazan (Volga) Federal University (KFU) (of course, only if the article is accepted for publication). This means that KFU has the right to publish an article in the next issue of the journal (on the website or in printed form), as well as to reprint this article in the archives of RDLJ CDs or to include in a particular information system or database, produced by KFU.
All copyrighted materials are placed in RDLJ with the consent of the authors. In the event that any of the authors have objected to its publication of materials on this site, the material can be removed, subject to notification to the Editor in writing.
Documents published in RDLJ are protected by copyright and all rights are reserved by the authors. Authors independently monitor compliance with their rights to reproduce or translate their papers published in the journal. If the material is published in RDLJ, reprinted with permission by another publisher or translated into another language, a reference to the original publication.
By submitting an article for publication in RDLJ, authors should take into account that the publication on the Internet, on the one hand, provide unique opportunities for access to their content, but on the other hand, are a new form of information exchange in the global information society where authors and publishers is not always provided with protection against unauthorized copying or other use of materials protected by copyright.
RDLJ is copyrighted. When using materials from the log must indicate the URL: index.phtml page = elbib / rus / journal?. Any change, addition or editing of the author's text are not allowed. Copying individual fragments of articles from the journal is allowed for distribute, remix, adapt, and build upon article, even commercially, as long as they credit that article for the original creation.
Request for the right to reproduce or use any of the materials published in RDLJ should be addressed to the Editor-in-Chief A.M. Elizarov at the following address: amelizarov@gmail.com.
The publishers of RDLJ is not responsible for the view, set out in the published opinion articles.
We suggest the authors of articles downloaded from this page, sign it and send it to the journal publisher's address by e-mail scan copyright agreements on the transfer of non-exclusive rights to use the work.