Определение понятия программы

Автор: Малышкин В.Э., Перепелкин В.А.

Журнал: Проблемы информатики @problem-info

Рубрика: Теоретическая и системная информатика

Статья в выпуске: 2 (63), 2024 года.

Бесплатный доступ

При решении сложных задач в программировании важную роль играет определение понятия программы. От того, как понимается программа, зависят подход к ее конструированию и ее свойства. В работе рассматривается понятие программы и дается ему определение на базе теории синтеза параллельных программ на вычислительных моделях. Предлагаемое определение отражает подход к процессу конструирования программы, определяемый этой теорией, начиная с описания задачи в терминах предметной области и заканчивая исполнением императивной программы с динамическими свойствами. Подход обладает рядом преимуществ, рассматриваемых в статье, таких как возможность выполнения алгоритмических оптимизаций, возможность автоматического конструирования программы, возможность обеспечения нефункциональных требований и проч. Рассматриваются параллели с другими определениями программ и особенности практического применения предлагаемого подхода.

Еще

Понятие программы, автоматическое конструирование программ, активные знания

Короткий адрес: https://sciup.org/143183455

IDR: 143183455   |   УДК: 004.4   |   DOI: 10.24412/2073-0667-2024-2-16-31

Definition of the program notion

When solving complex problems in programming an important role plays definition of the program notion. Depending on the way program is concerned an approach to its construction, as well as its properties, vary. In the paper the program notion is studied and defined based on the theory of parallel programs synthesis on the basis of computational models. The proposed definition conforms to the theory, starting from the description of the problem in the subject domain terms and up to imperative program execution with dynamic properties provided. In programmers’ work it is not usual to employ a precise definition of the program notion. Usually some partial definition is used, which is applicable in particular circumstances. In practice there is no problem with that. Nevertheless, in solving problems of automatic construction of any kind of programs (sequential, parallel, distributed, real-time, numerical, etc.) in various computational model (in various models of informatics) and for different bases it becomes necessary to precisely define the program notion. This allows to precisely define objects and concepts of the theory and practice of informatics and use them in precise proofs/argumentation of various statements in different theories. That’s why we have chosen mathematical logic as the base theory within which all considerations in the papers are made. The theory of synthesis of parallel programs and systems on the basis of computational models was originally formulated in [1] and further studied in [2, 3]. Computational model (CM) is a bipartite directed finite graph, the parts of which form two sets of vertices, called sets of operations and variables. The arcs entering and exiting the operation determine the input and output variables of this operation, respectively. A computational model describes a certain subject domain, where the properties of objects in the subject domain are described by the set of variables (property values are represented by variable values), and the ability to calculate the values of some properties from others is represented by the set of operations (see Fig. 1). CM defines an axiomatic theory. The interpretation function I is defined on the vertices of the graph. Each variable x has the value I(x), and each operation a computes a function I(a). To make computations available each operation has a computational module assigned. An example of such module is a conventional serial subroutine capable of computing values of output variables of the operation, provided values of operation’s input variables are submitted as inputs to the subroutine. Let’s define two subsets on the set of variables of the computational model - V and W, and call them input and output variables of the problem. Values of all variables from V are considered given. In this case, we will say that the VW-problem is posed on a computational model. If in a computational model there is a subset of operations, the ordered application of which to known values of variables will allow obtaining values of new variables until all variables from W obtain values, then this set defines a set of functional terms, each of which calculates one of the variables in W and is calculated from the variables of set V. We will call this set of functional terms a VW-plan (or simply a plan). To solve any VW-problem, generally, zero or more VW-plans can be constructed. Obviously, for a given VW-problem, one can set the task of finding a VW-plan, and if successful, compute the values of all variables from W, given the values of the variables from V. The above allows us to give the following definition of the notion of a program. A program is a description of a process of computation of the values of the interpretation function for the variables included in the VW-plan, and only them. Execution of a plan demands definition of control, i.e. the order in which operations are to be executed. That order must not contradict information dependencies between operations. Also the resources have to be assigned: each variable must have a memory extent to store its value and each operation must have a processor time to execute its corresponding module. Generally both control definition and resources assignment should be done partially statically and the rest - dynamically. This allows to provide static and dynamic properties of the program. Derivation of a VW-plan to solve the formulated problem can also be derived dynamically. The proposed definition of the program notion has a number of advantages, considered in the paper. The advantages include the ability of algorithmic optimizations, the ability to optimize non-functional properties, etc. Also the process of programming in terms of computational models is described. Other program definitions are concerned in comparison.

Еще

Список литературы Определение понятия программы

  • Вальковский В. А., Малышкин В. Э. Синтез параллельных программ и систем на вычислительных моделях / . Отв. ред. В. Е. Котов; АН СССР, Сиб. отд-ние, ВЦ. Новосибирск: Наука. Сиб. отд-ние, 1988.
  • Малышкин В. Э. Технология фрагментированного программирования // Вестник ЮУрГУ. Серия: Вычислительная математика и информатика. 2012. № 46 (305).
  • Malyshkin V. Active Knowledge, LuNA and Literacy for Oncoming Centuries // In Essays Dedicated to Pierpaolo Degano on Programming Languages with Applications to Biology and Security. V. 9465. Springer-Verlag, Berlin, Heidelberg, 2015. P. 292–303.
  • Ершов А. П. Вычислимость в произвольных областях и базисах: Сб. научн. ст. М: ВИНИТИ, 1982. С. 3–58. (Семиотика и информатика; Вып. № 19).
  • Янов Ю.И. Метод сверток для разрешения свойств формальных систем. М.: ИПМ им. М. В. Келдыша, 1977. Вып. 11. 41 с. (Институт прикладной математики АН СССР. Препринт; № 11 за 1977 г.). [Электрон. Рес.]: https://library.keldysh.ru/preprint.asp?id=1977-11.
  • Вальковский В. А. О синтезе оптимальных программ на базе вычислительных моделей // Программирование. 1980. № 6. С. 27–36.
  • Malyshkin V., Perepelkin. V., Schukin G. Scalable Distributed Data Allocation in LuNA Fragmented Programming System // Journal of Supercomputing, S. I.: Parallel Computing Technologies–2017. Springer, 2017. P. 1–7. DOI: 10.1007/s11227-016-1781-0.
  • Кудрявцев А. А., Малышкин В. Э., Нуштаев Ю.Ю., Перепелкин В. А., Спирин В. А. Эффективная фрагментированная реализация краевой задачи фильтрации двухфазной жидкости // Проблемы информатики. 2023. № 2. С. 45–73. DOI: 10.24412/2073-0667-2023-2-45-73.
  • Akhmed-Zaki D., Lebedev D., Perepelkin V. Implementation of a three dimensional three-phase fluid flow (“oil-water-gas”) numerical model in LuNA fragmented programming system // Journal of Supercomputing (2017). N 73(2). Springer, 2017. P. 624–630. DOI: 10.1007/s11227-016-1780-1.
  • Перепелкин В. А., Софронов И. В., Ткачева А. А. Автоматизация конструирования численных параллельных программ с заданными нефункциональными свойствами на базе вычислительных моделей // Проблемы информатики. 2017. № 4. С. 47–60.
  • Malyshkin, V.E., Perepelkin, V. A. LuNA Fragmented Programming System, Main Functions and Peculiarities of Run-Time Subsystem // In: Malyshkin, V. (eds) Parallel Computing Technologies. PaCT 2011. Lecture Notes in Computer Science, vol 6873. Springer, Berlin, Heidelberg. [Electron. Res.]: https://doi.org/10.1007/978-3-642-23178-0_5.
  • Malyshkin V., Perepelkin V., Lyamin A. 2023. Trace Balancing Technique for Trace Playback in LuNA System // In Parallel Computing Technologies: 17th International Conference, PaCT 2023, Astana, Kazakhstan, August 21–25, 2023, Proceedings. Springer-Verlag, Berlin, Heidelberg, 42–50. [Electron. Res.]: https://doi.org/10.1007/978-3-031-41673-6_4.
  • Perepelkin V., Malkhanov V., Zakirov V. Preliminary results on fault tolerance support in LuNA system // Bull. Nov. ComP. Center, ComP. Science, 46 (2022), P. 43–55.
  • Malyshkin, V., Akhmed-Zaki, D., Perepelkin, V. Parallel programs execution optimization using behavior control in LuNA system // J. Supercomput. Springer, 2021. P. 9771–9779. DOI: 10.1007/s11227-021-03654-2.
  • Малышкин В. Э., Перепелкин В. А. Мультиагентный подход к повышению эффективности исполнения фрагментированных программ в системе LuNA // Проблемы информатики. 2023, № 3, С. 55–67. DOI: 10.24412/2073-0667-2023-3-55-67.
  • Belyaev, N., Kireev, S. LuNA-ICLU Compiler for Automated Generation of Iterative Fragmented Programs // In: Malyshkin V. (eds) Parallel Computing Technologies. PaCT 2019. Lecture Notes in Computer Science (2019). V. 11657. Springer, Cham. [Electron. Res.]: https://doi.org/10.1007/978-3-030-25636-4_2.
Еще