Показати скорочену інформацію

dc.contributor.authorСтавицький, П. В.uk
dc.contributor.authorВойтко, В. В.uk
dc.contributor.authorРоманюк, О. Н.uk
dc.contributor.authorStavytskyi, P. V.en
dc.contributor.authorVoitko, V. V.en
dc.contributor.authorRomanyuk, O. N.en
dc.date.accessioned2023-03-24T10:05:55Z
dc.date.available2023-03-24T10:05:55Z
dc.date.issued2022
dc.identifier.citationСтавицький П. В. Аналіз інструментів метапрограмування в мовах програмування загального призначення [Текст] / П. В. Ставицький, В. В. Войтко, О. Н. Романюк // Інформаційні технології та комп'ютерна інженерія. – 2022. – № 3. – С. 44-50.uk
dc.identifier.issn1999-9941
dc.identifier.urihttp://ir.lib.vntu.edu.ua//handle/123456789/36540
dc.description.abstractРозглянуто та проаналізовано сучасні методи метапрограмування, що використовуються у мовах загального призначення. Підхід метапрограмування використовується для багатьох сценаріїв роботи з кодом програм, важливим серед них є генерування вихідного коду. Кожна мова програмування включає окремий набір інструментарію для вирішення завдань метапрограмування. Одним з методів метапрограмування є побудова процесорів анотацій, проте тут не визначаються особливості генерування коду. Іншим методом є побудова плагінів компіляторів, що є можливим у мовах програмування типу Kotlin. Інтерфейс плагінів може надавати доступ до багатьох стадій компіляції програм, проте їх недоліком є підвищена складність програм, що значно впливає на швидкість розробки й на швидкодію роботи результуючого програмного забезпечення. Технології типу KotlinPoet та JavaPoet до-зволяють генерувати текст вихідних програм з частковим дотриманням безпечної типізації на рівні інструкцій. Недоліком таких технологій є значна відмінність коду програми, що виконує генерування, від вихідного згенерованого коду, що підвищує складність роботи з цим інструментом та загальне когнітивне навантаження. На противагу їм можна використовувати рядки з механізмом інтерполяції, що забезпечують декларативність, проте тут відсутня валідація типів. Мови програмування типу MetaOCaml, Scala реалізують механізми метапрограмування й багатоетапного програмування, зокрема, на рівні синтаксису з використанням конструкцій цитування і зрощування та механізмів вбудовування і макросів. Макроси присутні також у мовах С та С++, вони за допомогою директив препроцесора дозволяють виконувати попереднє перетворення коду перед основною стадією компіляції. Коректне поєднання елементів метапрограмування дозволить створити універсальний підхід до використання функціоналу декларативного метапрограмування, що надасть потужний інструментарій для масштабування обсягів генерованого коду і підвищить якість кінцевого програмного продукту.uk
dc.description.abstractModern methods of metaprogramming used in general-purpose languages are considered and analyzed. The metaprogramming approach is used for many scenarios of working with program code, but one of them is source code generation. Each programming language includes a unique set of tools for solving metaprogramming tasks. One of the methods of metaprogramming is the construction of annotation processors, however, they do not define the specifics of code generation. Another method is writing compiler plugins, which is possible in programming languages like Kotlin. The plugin interface can provide access to many stages of program compilation, but their disadvantage is the increased complexity of programs, which significantly affects the speed of development and the performance of the resulting software. Technologies such as KotlinPoet and JavaPoet allow generating the text of source programs with partial type safety at the level of statements. The disadvantage of such technologies is the significant difference between the code of the program that performs the generation and the original generated code, which increases the complexity of working with this tool and the overall cognitive load. In contrast to them, it is possible to use strings with an interpolation mechanism that provides declarativeness, but at the cost of type validation. Programming languages such as MetaOCaml and Scala implement mechanisms of metaprogramming and multi-stage programming, in particular, at the syntax level using quoting and splicing constructions and mechanisms of inlining and macros. Macros are also present in the C and C++ languages, they allow preprocessor directives to perform pre-transformation of the code before the main stage of compilation. The correct combination of metaprogramming elements will allow creating a universal approach to the use of a declarative metaprogramming functionality, which will provide a powerful toolkit for scaling the amount of generated code and increase the quality of the final software product.en
dc.language.isouk_UAuk_UA
dc.publisherВНТУuk
dc.relation.ispartofІнформаційні технології та комп'ютерна інженерія. № 3 : 44-50.uk
dc.relation.urihttps://itce.vntu.edu.ua/index.php/itce/article/view/904
dc.subjectметапрограмуванняuk
dc.subjectгенерування кодуuk
dc.subjectдирективи препроцесораuk
dc.subjectмакросиuk
dc.subjectJavaen
dc.subjectKotlinen
dc.subjectCen
dc.subjectC++en
dc.subjectMetaOCamlen
dc.subjectScalaen
dc.subjectцитуванняuk
dc.subjectзрощуванняuk
dc.subjectmetaprogrammingen
dc.subjectcode generationen
dc.subjectpreprocessor directivesen
dc.subjectmacrosen
dc.titleАналіз інструментів метапрограмування в мовах програмування загального призначенняuk
dc.title.alternativeAnalysis of metaprogramming capabilities in general-purpose programming languagesen
dc.typeArticle
dc.identifier.udc004.624
dc.relation.referencesJuárez-Martínez, Ulises and José Oscar Olmedo-Aguirre, Annotation Processing as Local Variable Crosscutting. 2008.en
dc.relation.referencesGrégory Lureau, Ktlint: a great 1st experience. 2020. [Online]. Available: https://www.glureau.com/2020/05/26/Ktlint-Moshi-Introduction/. Accessed on: Sept. 4, 2022.en
dc.relation.referencesTheodoros Theodoridis, Tobias Grosser, and Zhendong Su. “Understanding and exploiting optimal function inlining,” 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '22) (2022). Association for Computing Machinery, New York, NY, USA, 977–989.en
dc.relation.referencesMedeiros, Flávio M., Márcio Ribeiro, Rohit Gheyi, Sven Apel, Christian Kästner, Bruno Ferreira, Luiz Carvalho and Baldoino Fonseca, “Discipline Matters: Refactoring of Preprocessor Directives in the #ifdef Hell,” IEEE Transactions on Software Engineering, 44 (2018), рр. 453-469.en
dc.relation.referencesOleg Kiselyov, “The Design and Implementation of BER MetaOCaml − System Description,” FLOPS (2014).en
dc.relation.referencesPouya Larjani, “On Meta Programming and Code Generation in F#,” 2010/4/2.en
dc.identifier.doihttps://doi.org/10.31649/1999-9941-2022-55-3-44-50


Файли в цьому документі

Thumbnail

Даний документ включений в наступну(і) колекцію(ї)

Показати скорочену інформацію