<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">mais</journal-id><journal-title-group><journal-title xml:lang="ru">Моделирование и анализ информационных систем</journal-title><trans-title-group xml:lang="en"><trans-title>Modeling and Analysis of Information Systems</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">1818-1015</issn><issn pub-type="epub">2313-5417</issn><publisher><publisher-name>Yaroslavl State University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.18255/1818-1015-2023-1-40-62</article-id><article-id custom-type="elpub" pub-id-type="custom">mais-1766</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Theory of Computing</subject></subj-group></article-categories><title-group><article-title>Расширение языка C для поддержки процедурно-параметрического полиморфизма</article-title><trans-title-group xml:lang="en"><trans-title>C Language Extension to Support Procedural-Parametric Polymorphism</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-5487-0699</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Легалов</surname><given-names>Александр Иванович</given-names></name><name name-style="western" xml:lang="en"><surname>Legalov</surname><given-names>Alexander I.</given-names></name></name-alternatives><email xlink:type="simple">alegalov@hse.ru</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-9035-312X</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Косов</surname><given-names>Павел Владимирович</given-names></name><name name-style="western" xml:lang="en"><surname>Kosov</surname><given-names>Pavel V.</given-names></name></name-alternatives><email xlink:type="simple">pvkosov@hse.ru</email><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Национальный исследовательский университет «Высшая школа экономики»</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Higher school of Economics, National research University</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2023</year></pub-date><pub-date pub-type="epub"><day>28</day><month>04</month><year>2023</year></pub-date><volume>30</volume><issue>1</issue><fpage>40</fpage><lpage>62</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Легалов А.И., Косов П.В., 2023</copyright-statement><copyright-year>2023</copyright-year><copyright-holder xml:lang="ru">Легалов А.И., Косов П.В.</copyright-holder><copyright-holder xml:lang="en">Legalov A.I., Kosov P.V.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://www.mais-journal.ru/jour/article/view/1766">https://www.mais-journal.ru/jour/article/view/1766</self-uri><abstract><p>Разработка программного обеспечения зачастую связана с расширением функциональности. Для повышения надежности в этом случае необходимо минимизировать изменение ранее написанного кода. Для инструментальной поддержки эволюционной разработки программ была предложена процедурно-параметрическая парадигма программирования, что позволило повысить возможности процедурного подхода. Это обеспечивает безболезненное расширение как данных, так функций, используя при этом статическую типизацию. В работе рассматривается включение процедурно-параметрического программирования в язык C. Предлагаются дополнительные синтаксические конструкции, ориентированные на поддержку предлагаемого подхода. К ним относятся: параметрические обобщения, специализации обобщений, обобщающие функции, обработчики специализаций. Описываются их семантика, возможности и особенности технической реализации. Для проверки возможностей использования данного подхода построены модели процедурно-параметрических конструкций на языке программирования C. Приведенный пример демонстрирует гибкое расширение программы и поддержку множественного полиморфизма.</p></abstract><trans-abstract xml:lang="en"><p>Software development is often about expanding functionality. To improve reliability in this case, it is necessary to minimize the change in previously written code. For instrumental support of the evolutionary development of programs, a procedural-parametric programming paradigm was proposed, which made it possible to increase the capabilities of the procedural approach. This allows to extend both data and functions painlessly. The paper considers the inclusion of procedural-parametric programming in the C language. Additional syntactic constructions are proposed to support the proposed approach. These constructions include: parametric generalizations, specializations of generalizations, generalizing functions, specialization handlers. Their semantics, possibilities and features of technical implementation are described. To check the possibilities of using this approach, models of procedural-parametric constructions in the C programming language were built. The example in the article demonstrates the flexible extension of the program and support of multiple polymorphism.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>языки программирования</kwd><kwd>компиляция</kwd><kwd>процедурно-параметрическое программирование</kwd><kwd>полиморфизм</kwd><kwd>множественный полиморфизм</kwd><kwd>эволюционная разработка программного обеспечения</kwd></kwd-group><kwd-group xml:lang="en"><kwd>programming languages</kwd><kwd>compilation</kwd><kwd>procedural-parametric programming</kwd><kwd>polymorphism</kwd><kwd>multiple polymorphism</kwd><kwd>evolutionary software development</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">D. Shafer and D. A. Ritz, Practical Smalltalk. Using Smalltalk/V, Springer-Verlag. 1991, p. 233.</mixed-citation><mixed-citation xml:lang="en">D. Shafer and D. A. Ritz, Practical Smalltalk. Using Smalltalk/V, Springer-Verlag. 1991, p. 233.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">H. John, Advanced Guide to Python 3 Programming, Springer. 2019, p. 497.</mixed-citation><mixed-citation xml:lang="en">H. John, Advanced Guide to Python 3 Programming, Springer. 2019, p. 497.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">M. Gregoire, Professional C++, John Wiley &amp; Sons. 2018, p. 1122.</mixed-citation><mixed-citation xml:lang="en">M. Gregoire, Professional C++, John Wiley &amp; Sons. 2018, p. 1122.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">E. Sciore, Java Program Design, Apress Media. 2019, p. 1122.</mixed-citation><mixed-citation xml:lang="en">E. Sciore, Java Program Design, Apress Media. 2019, p. 1122.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">J. Albahari and B. Albahari, C# 6.0 Pocket Reference: Instant Help for C# 6.0 Programmers, O’Reilly Media. 2016, p. 224.</mixed-citation><mixed-citation xml:lang="en">J. Albahari and B. Albahari, C# 6.0 Pocket Reference: Instant Help for C# 6.0 Programmers, O’Reilly Media. 2016, p. 224.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">A. Freeman, Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang, Apress. 2022, p. 1105.</mixed-citation><mixed-citation xml:lang="en">A. Freeman, Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang, Apress. 2022, p. 1105.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">J. Blandy, J. Orendorff, and L. F. S. Tindall, Programming Rust, O’Reilly Media. 2021, p. 735.</mixed-citation><mixed-citation xml:lang="en">J. Blandy, J. Orendorff, and L. F. S. Tindall, Programming Rust, O’Reilly Media. 2021, p. 735.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns. Elements of Reusable Object-Oriented Software, Addison-Wesley Professional. 1994, p. 416.</mixed-citation><mixed-citation xml:lang="en">E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns. Elements of Reusable Object-Oriented Software, Addison-Wesley Professional. 1994, p. 416.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">A. Alexandrescu, Modern C++ Design. Generic Programming and Design Patterns Applied., Addison-Wesley Professional. 2001, p. 360.</mixed-citation><mixed-citation xml:lang="en">A. Alexandrescu, Modern C++ Design. Generic Programming and Design Patterns Applied., Addison-Wesley Professional. 2001, p. 360.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">S. Meyers, More effective C++. 35 New Ways to Improve Your Programs and Designs, Addison-Wesley Professional. 1996, p. 318.</mixed-citation><mixed-citation xml:lang="en">S. Meyers, More effective C++. 35 New Ways to Improve Your Programs and Designs, Addison-Wesley Professional. 1996, p. 318.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">A. I. Legalov, “OOP, Multimethods and Pyramidal Evolution,” Open Systems, no. 3, pp. 41–45, 2002.</mixed-citation><mixed-citation xml:lang="en">A. I. Legalov, “OOP, Multimethods and Pyramidal Evolution,” Open Systems, no. 3, pp. 41–45, 2002.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">L. G. Demichiel, “Overview: The common lisp object system,” Lisp and Symbolic Computation, no. 1, pp. 227–244, 1989.</mixed-citation><mixed-citation xml:lang="en">L. G. Demichiel, “Overview: The common lisp object system,” Lisp and Symbolic Computation, no. 1, pp. 227–244, 1989.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">B. Stroustrup, Design and Evolution of C++, Addison-Wesley Professional. 1994, p. 480.</mixed-citation><mixed-citation xml:lang="en">B. Stroustrup, Design and Evolution of C++, Addison-Wesley Professional. 1994, p. 480.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">A. I. Legalov, Procedurally-parametric programming paradigm. Is it possible as alternative to the object-oriented style?, Dep. hands. Number 622-V00 Dep. VINITI 13.03.2000. 2000, p. 43.</mixed-citation><mixed-citation xml:lang="en">A. I. Legalov, Procedurally-parametric programming paradigm. Is it possible as alternative to the object-oriented style?, Dep. hands. Number 622-V00 Dep. VINITI 13.03.2000. 2000, p. 43.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">I. A. Legalov, “Using of generalized records in procedural-parametric programming language,” Scientific Bulletin of the NSTU, vol. 28, no. 3, pp. 25–37, 2007.</mixed-citation><mixed-citation xml:lang="en">I. A. Legalov, “Using of generalized records in procedural-parametric programming language,” Scientific Bulletin of the NSTU, vol. 28, no. 3, pp. 25–37, 2007.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">A. I. Legalov and D. A. Schvetc, “Procedural language with support for evolutionary design,” Scientific Bulletin of the NSTU, vol. 15, no. 2, pp. 25–38, 2003.</mixed-citation><mixed-citation xml:lang="en">A. I. Legalov and D. A. Schvetc, “Procedural language with support for evolutionary design,” Scientific Bulletin of the NSTU, vol. 15, no. 2, pp. 25–38, 2003.</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">A. I. Legalov and P. V. Kosov, “Evolutionary extension of programs using the procedural-parametric approach,” Computational Technologies, vol. 21, no. 3, pp. 56–69, 2016.</mixed-citation><mixed-citation xml:lang="en">A. I. Legalov and P. V. Kosov, “Evolutionary extension of programs using the procedural-parametric approach,” Computational Technologies, vol. 21, no. 3, pp. 56–69, 2016.</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">“Linux x86 Program Start Up or - How the heck do we get to main()? .” [Online]. Available: http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html.</mixed-citation><mixed-citation xml:lang="en">“Linux x86 Program Start Up or - How the heck do we get to main()? .” [Online]. Available: http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html.</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">“An example of an evolutionary extension of a program using a procedural-parametric approach.” [Online]. Available: https://github.com/kreofil/c-evolution-example.</mixed-citation><mixed-citation xml:lang="en">“An example of an evolutionary extension of a program using a procedural-parametric approach.” [Online]. Available: https://github.com/kreofil/c-evolution-example.</mixed-citation></citation-alternatives></ref><ref id="cit20"><label>20</label><citation-alternatives><mixed-citation xml:lang="ru">A. I. Legalov, “Multimethods and paradigms,” Open Systems, no. 5, pp. 33–37, 2002.</mixed-citation><mixed-citation xml:lang="en">A. I. Legalov, “Multimethods and paradigms,” Open Systems, no. 5, pp. 33–37, 2002.</mixed-citation></citation-alternatives></ref><ref id="cit21"><label>21</label><citation-alternatives><mixed-citation xml:lang="ru">“Clang: a C language family frontend for LLVM.” [Online]. Available: https://clang.llvm.org/.</mixed-citation><mixed-citation xml:lang="en">“Clang: a C language family frontend for LLVM.” [Online]. Available: https://clang.llvm.org/.</mixed-citation></citation-alternatives></ref><ref id="cit22"><label>22</label><citation-alternatives><mixed-citation xml:lang="ru">“The LLVM Compiler Infrastructure.” [Online]. Available: https://llvm.org/.</mixed-citation><mixed-citation xml:lang="en">“The LLVM Compiler Infrastructure.” [Online]. Available: https://llvm.org/.</mixed-citation></citation-alternatives></ref><ref id="cit23"><label>23</label><citation-alternatives><mixed-citation xml:lang="ru">“LibTooling.” [Online]. Available: https://clang.llvm.org/docs/LibTooling.html.</mixed-citation><mixed-citation xml:lang="en">“LibTooling.” [Online]. Available: https://clang.llvm.org/docs/LibTooling.html.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
