<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN"
  "https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:mml="http://www.w3.org/1998/Math/MathML"
         article-type="research-article"
         xml:lang="ru"
         dtd-version="1.2">

  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">tis</journal-id>
      <journal-title-group>
        <journal-title xml:lang="ru">Телекоммуникации и связь</journal-title>
        <trans-title-group xml:lang="en">
          <trans-title>Telecommunications and Communications</trans-title>
        </trans-title-group>
      </journal-title-group>
      <issn pub-type="epub">3034-4050</issn>
      <publisher>
        <publisher-name>ФГБУ «16 ЦНИИИ»</publisher-name>
      </publisher>
    </journal-meta>

    <article-meta>
      <article-id pub-id-type="doi">10.21681/3034-4050-2026-2-43-49</article-id>

      <article-categories>
        <subj-group subj-group-type="udc">
          <compound-subject>
            <compound-subject-part content-type="udc">004.82</compound-subject-part>
          </compound-subject>
        </subj-group>
      </article-categories>

      <title-group>
        <article-title xml:lang="ru">ЗАДАЧА ГЕНЕРАЦИИ КОДА ПРЕДМЕТНО-ОРИЕНТИРОВАННЫХ ЯЗЫКОВ С ИСПОЛЬЗОВАНИЕМ БОЛЬШИХ ЯЗЫКОВЫХ МОДЕЛЕЙ (НА ПРИМЕРЕ POLKIT)</article-title>
        <trans-title-group xml:lang="en">
          <trans-title>THE PROBLEM OF CODE GENERATING DOMAIN-SPECIFIC LANGUAGES USING LARGE LANGUAGE MODELS (USING POLKIT AS AN EXAMPLE)</trans-title>
        </trans-title-group>
      </title-group>

      <contrib-group>
        <contrib contrib-type="author">
          <name>
            <surname>Назимов</surname>
            <given-names>Александр Михайлович</given-names>
          </name>
          <name-alternatives>
            <name xml:lang="en">
              <surname>Nazimov</surname>
              <given-names>A. M.</given-names>
            </name>
          </name-alternatives>
          <aff id="aff1">
            <institution>сотрудник Академии Федеральной службы охраны Российской Федерации</institution>
            <city>Орел</city>
            <country>Россия</country>
          </aff>
          <email>s-nazim@list.ru</email>
        </contrib>
      </contrib-group>

      <pub-date pub-type="epub">
        <year>2026</year>
      </pub-date>
      <pub-date pub-type="collection">
        <year>2026</year>
      </pub-date>

      <volume>11</volume>
      <issue>2</issue>
      <fpage>43</fpage>
      <lpage>49</lpage>

      <permissions>
        <copyright-year>2026</copyright-year>
      </permissions>

      <self-uri xlink:href="https://telemil.ru/pages/archive/magazine11/%D0%A2%D0%B8%D0%A1_2_2026-43-49.pdf">https://telemil.ru/pages/archive/magazine11/ТиС_2_2026-43-49.pdf</self-uri>
      <self-uri xlink:href="ТиС_2_2026-43-49.xml" content-type="jats">JATS XML</self-uri>

      <abstract xml:lang="ru">
        <title>Аннотация</title>
        <p>&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Цель исследования:&lt;/b&gt; формализация задачи автоматической генерации кода предметно-ориентированных языков (DSL) по описанию на естественном языке (Text2DSL) как самостоятельного класса задач и эмпирическая оценка роли структурированного контекста при генерации DSL-кода большой языковой моделью.&lt;/p&gt;&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Методы исследования:&lt;/b&gt; эксперимент с двумя условиями (базовый режим и режим с контекстом) на датасете PolkitBench (4 204 верифицированные пары «запрос на естественном языке – правило Polkit»), трёхуровневая AST-валидация через парсер esprima, метрики синтаксической и семантической корректности.&lt;/p&gt;&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Результаты исследования:&lt;/b&gt; включение структурированного контекста (BNF-грамматика, API-спецификация, словарь допустимых идентификаторов) повышает синтаксическую корректность с 80,5 % до 99,4 % (+23,4 %), семантическую корректность – с 60,4 % до 95,9 % (+58,7 %). Для класса задач Text2DSL включение формальной спецификации целевого языка в контекст запроса является необходимым и достаточным условием качественной генерации без дообучения модели.&lt;/p&gt;&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Научная новизна:&lt;/b&gt; формализация задачи Text2DSL как отдельного класса задач генерации кода; датасет PolkitBench (4 204 верифицированные пары, трёхуровневая AST-валидация); эмпирическое обоснование критической роли структурированного контекста для качественной генерации DSL-кода.&lt;/p&gt;</p>
      </abstract>

      <trans-abstract xml:lang="en">
        <title>Abstract</title>
        <p>&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Purpose of the study:&lt;/b&gt; to formalize the task of automatic generation of domain-specific language (DSL) code from natural language descriptions – referred to as Text2DSL – as an independent class of code generation problems, and to empirically evaluate the role of structured context in DSL code generation by a large language model.&lt;/p&gt;&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Methods of research:&lt;/b&gt; the study is based on an experimental evaluation conducted under two conditions (baseline mode and context-enhanced mode) using the PolkitBench dataset, which contains 4,204 verified pairs of natural language requests and corresponding Polkit rules. A three-level AST validation procedure based on the esprima parser was employed, along with quantitative metrics of syntactic and semantic correctness.&lt;/p&gt;&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Results:&lt;/b&gt; the inclusion of structured context (BNF grammar, API specification, and a dictionary of valid identifiers) increases syntactic correctness from 80.5 % to 99.4 % (+23.4 %) and semantic correctness from 60.4 % to 95.9 % (+58.7 %). The results demonstrate that for the class of Text2DSL tasks, incorporating the formal specification of the target language into the prompt context constitutes a necessary and sufficient condition for achieving high-quality DSL code generation without additional model fine-tuning.&lt;/p&gt;&lt;p class=&quot;section-text&quot;&gt;&lt;b&gt;Scientific novelty:&lt;/b&gt; the study formalizes the Text2DSL problem as a distinct class of code generation tasks; introduces the PolkitBench dataset consisting of 4,204 verified pairs validated through a three-level AST analysis; and provides empirical evidence of the critical role of structured context in enabling accurate DSL code generation by large language models.&lt;/p&gt;</p>
      </trans-abstract>

      <kwd-group xml:lang="ru">
        <title>Ключевые слова</title>
        <kwd>большие языковые модели</kwd>
        <kwd>Polkit</kwd>
        <kwd>Text2DSL</kwd>
        <kwd>структурированный контекст</kwd>
        <kwd>валидация программ</kwd>
      </kwd-group>

      <kwd-group xml:lang="en">
        <title>Keywords</title>
        <kwd>large language models</kwd>
        <kwd>Polkit</kwd>
        <kwd>Text2DSL</kwd>
        <kwd>structured context</kwd>
        <kwd>program validation</kwd>
      </kwd-group>

      <funding-group>
        <funding-statement>Источники финансирования не указаны.</funding-statement>
      </funding-group>

    </article-meta>
  </front>

  <back>
    <ref-list>
      <title>Список литературы / References</title>
      <ref id="ref1">
        <label>1</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Rozière B., Gehring J., Gloeckle F., et al.</string-name>
          </person-group>
          <article-title xml:lang="ru">Code Llama: Open Foundation Models for Code</article-title>
          <trans-title-group xml:lang="en"><trans-title>Code Llama: Open Foundation Models for Code</trans-title></trans-title-group>
          <source xml:lang="ru">arXiv</source>
          <trans-source xml:lang="en">arXiv</trans-source>
          <year>2023</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2308.12950</pub-id>
        </element-citation>
      </ref>
      <ref id="ref2">
        <label>2</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Li R., Allal L. B., Zi Y., et al.</string-name>
          </person-group>
          <article-title xml:lang="ru">StarCoder: May the Source Be with You!</article-title>
          <trans-title-group xml:lang="en"><trans-title>StarCoder: May the Source Be with You!</trans-title></trans-title-group>
          <source xml:lang="ru">Transactions on Machine Learning Research</source>
          <trans-source xml:lang="en">Transactions on Machine Learning Research</trans-source>
          <year>2023</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2305.06161</pub-id>
        </element-citation>
      </ref>
      <ref id="ref3">
        <label>3</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Zan D., Chen B., Zhang F., Lu D., Wu B., Guan B., Wang Y., Lou J.-G.</string-name>
          </person-group>
          <article-title xml:lang="ru">Large Language Models Meet NL2Code: A Survey</article-title>
          <trans-title-group xml:lang="en"><trans-title>Large Language Models Meet NL2Code: A Survey</trans-title></trans-title-group>
          <source xml:lang="ru">Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (ACL)</source>
          <trans-source xml:lang="en">Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (ACL)</trans-source>
          <year>2023</year>
          
          
          <fpage>7443</fpage>
          <lpage>7464</lpage>
          <pub-id pub-id-type="doi">10.18653/v1/2023.acl-long.411</pub-id>
        </element-citation>
      </ref>
      <ref id="ref4">
        <label>4</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Austin J., Odena A., Nye M., et al.</string-name>
          </person-group>
          <article-title xml:lang="ru">Program Synthesis with Large Language Models</article-title>
          <trans-title-group xml:lang="en"><trans-title>Program Synthesis with Large Language Models</trans-title></trans-title-group>
          <source xml:lang="ru">arXiv</source>
          <trans-source xml:lang="en">arXiv</trans-source>
          <year>2021</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2108.07732</pub-id>
        </element-citation>
      </ref>
      <ref id="ref5">
        <label>5</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Wang Y., Wang W., Joty S.</string-name>
          </person-group>
          <article-title xml:lang="ru">CodeT5: Identifier-Aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation</article-title>
          <trans-title-group xml:lang="en"><trans-title>CodeT5: Identifier-Aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation</trans-title></trans-title-group>
          <source xml:lang="ru">Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)</source>
          <trans-source xml:lang="en">Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)</trans-source>
          <year>2021</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.18653/v1/2021.emnlp-main.685</pub-id>
        </element-citation>
      </ref>
      <ref id="ref6">
        <label>6</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Guo D., Ren S., Lu S., et al.</string-name>
          </person-group>
          <article-title xml:lang="ru">GraphCodeBERT: Pre-training Code Representations with Data Flow</article-title>
          <trans-title-group xml:lang="en"><trans-title>GraphCodeBERT: Pre-training Code Representations with Data Flow</trans-title></trans-title-group>
          <source xml:lang="ru">International Conference on Learning Representations (ICLR)</source>
          <trans-source xml:lang="en">International Conference on Learning Representations (ICLR)</trans-source>
          <year>2021</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2009.08366</pub-id>
        </element-citation>
      </ref>
      <ref id="ref7">
        <label>7</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Scholak T., Schucher N., Bahdanau D.</string-name>
          </person-group>
          <article-title xml:lang="ru">PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models</article-title>
          <trans-title-group xml:lang="en"><trans-title>PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models</trans-title></trans-title-group>
          <source xml:lang="ru">Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)</source>
          <trans-source xml:lang="en">Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)</trans-source>
          <year>2021</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.18653/v1/2021.emnlp-main.779</pub-id>
        </element-citation>
      </ref>
      <ref id="ref8">
        <label>8</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Hu E. J., Shen Y., Wallis P., et al.</string-name>
          </person-group>
          <article-title xml:lang="ru">LoRA: Low-Rank Adaptation of Large Language Models</article-title>
          <trans-title-group xml:lang="en"><trans-title>LoRA: Low-Rank Adaptation of Large Language Models</trans-title></trans-title-group>
          <source xml:lang="ru">International Conference on Learning Representations (ICLR)</source>
          <trans-source xml:lang="en">International Conference on Learning Representations (ICLR)</trans-source>
          <year>2022</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2106.09685</pub-id>
        </element-citation>
      </ref>
      <ref id="ref9">
        <label>9</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Dettmers T., Pagnoni A., Holtzman A., Zettlemoyer L.</string-name>
          </person-group>
          <article-title xml:lang="ru">QLoRA: Efficient Finetuning of Quantized Large Language Models</article-title>
          <trans-title-group xml:lang="en"><trans-title>QLoRA: Efficient Finetuning of Quantized Large Language Models</trans-title></trans-title-group>
          <source xml:lang="ru">Advances in Neural Information Processing Systems (NeurIPS)</source>
          <trans-source xml:lang="en">Advances in Neural Information Processing Systems (NeurIPS)</trans-source>
          <year>2023</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2305.14314</pub-id>
        </element-citation>
      </ref>
      <ref id="ref10">
        <label>10</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Chen X., Lin Y., Schürmann C.</string-name>
          </person-group>
          <article-title xml:lang="ru">Neural Code Generation with Grammar Constraints</article-title>
          <trans-title-group xml:lang="en"><trans-title>Neural Code Generation with Grammar Constraints</trans-title></trans-title-group>
          <source xml:lang="ru">International Conference on Learning Representations (ICLR)</source>
          <trans-source xml:lang="en">International Conference on Learning Representations (ICLR)</trans-source>
          <year>2021</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2010.00904</pub-id>
        </element-citation>
      </ref>
      <ref id="ref11">
        <label>11</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Zhong R., Yin P., Yu T., et al.</string-name>
          </person-group>
          <article-title xml:lang="ru">Semantic Parsing for Code Generation: A Survey</article-title>
          <trans-title-group xml:lang="en"><trans-title>Semantic Parsing for Code Generation: A Survey</trans-title></trans-title-group>
          <source xml:lang="ru">Findings of the Association for Computational Linguistics (ACL Findings)</source>
          <trans-source xml:lang="en">Findings of the Association for Computational Linguistics (ACL Findings)</trans-source>
          <year>2022</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.18653/v1/2022.findings-acl.2</pub-id>
        </element-citation>
      </ref>
      <ref id="ref12">
        <label>12</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Yin P., Neubig G.</string-name>
          </person-group>
          <article-title xml:lang="ru">StructCoder: Structure-Aware Code Generation with Language Models</article-title>
          <trans-title-group xml:lang="en"><trans-title>StructCoder: Structure-Aware Code Generation with Language Models</trans-title></trans-title-group>
          <source xml:lang="ru">Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL)</source>
          <trans-source xml:lang="en">Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL)</trans-source>
          <year>2022</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.18653/v1/2022.acl-long.39</pub-id>
        </element-citation>
      </ref>
      <ref id="ref13">
        <label>13</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Barke S., James M., Polikarpova N.</string-name>
          </person-group>
          <article-title xml:lang="ru">Grounded Copilot: How Programmers Interact with Code-Generating Models</article-title>
          <trans-title-group xml:lang="en"><trans-title>Grounded Copilot: How Programmers Interact with Code-Generating Models</trans-title></trans-title-group>
          <source xml:lang="ru">Proceedings of the International Conference on Software Engineering (ICSE)</source>
          <trans-source xml:lang="en">Proceedings of the International Conference on Software Engineering (ICSE)</trans-source>
          <year>2023</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.1109/ICSE48619.2023.00015</pub-id>
        </element-citation>
      </ref>
      <ref id="ref14">
        <label>14</label>
        <element-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>Pourreza M., Rafiei D.</string-name>
          </person-group>
          <article-title xml:lang="ru">DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction</article-title>
          <trans-title-group xml:lang="en"><trans-title>DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction</trans-title></trans-title-group>
          <source xml:lang="ru">Advances in Neural Information Processing Systems (NeurIPS)</source>
          <trans-source xml:lang="en">Advances in Neural Information Processing Systems (NeurIPS)</trans-source>
          <year>2023</year>
          
          
          
          
          <pub-id pub-id-type="doi">10.48550/arXiv.2304.11015</pub-id>
        </element-citation>
      </ref>
    </ref-list>
  </back>

</article>