Back to Search
Start Over
Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
- Source :
- Российский технологический журнал, Vol 10, Iss 1, Pp 18-27 (2022)
- Publication Year :
- 2022
- Publisher :
- MIREA - Russian Technological University, 2022.
-
Abstract
- Objectives. The paper deals with the equivalence of program schemes. According to A.A. Lyapunov and Yu.I. Yanov, the founders of this theory, a program scheme is understood as a program model wherein abstraction from contensive values of operators and expressions is performed. In this case, the program structure containing symbolic notation of operators and expressions remains unchanged while maintaining their execution sequence. The programming language model presented in the paper contains basic constructs of sequential languages and is the core of the existing sequential programming languages. The paper aimed at developing an effective algorithm for studying equivalence (nonequivalence) of program schemes of sequential programming languages.Methods. An algebraic approach to specifying semantics of programming languages was used for studying the equivalence of program schemes.Results. A process semantics being the new algebraic approach to specifying the formal semantics of sequential programming languages was proposed. The process semantics was specified by matching programs (program schemes) with a set of computation sequences. The computation sequence was understood as the execution sequence of actions (commands and tests) of the program. Two types of concatenation operations (test–command and command–command) and the merge operation, which properties are given by axiomatic systems, were defined in the introduced semantic domain. The finiteness of the semantic value representation in the form of systems of recursive equations was proved. The algorithm for proving the equivalence (nonequivalence) of systems of recursive equations characterizing semantic values for a pair of program schemes was proposed, which implies the equivalence (nonequivalence) of programs in the strong sense.Conclusions. The paper demonstrates the efficient use of the proposed algorithm for proving the equivalence of sequential program schemes excluding side effects when calculating expressions, i.e., sequential computation of the expression more than once does not change anything. The example of proving the equivalence of program schemes by two methods—the well-known de Bakker–Scott fixed-point induction method and the method proposed by the author—is given. Comparison of the above methods testifies not only to the new method′s effectiveness but also to its significant simplicity, proved in practice by students who performed corresponding tasks when studying the Semantics of Programming Languages at the Institute of Information and Computing Technologies at the National Research University Moscow Power Engineering Institute (Moscow, Russia).
Details
- Language :
- Russian
- ISSN :
- 2500316X
- Volume :
- 10
- Issue :
- 1
- Database :
- Directory of Open Access Journals
- Journal :
- Российский технологический журнал
- Publication Type :
- Academic Journal
- Accession number :
- edsdoj.b1fb99ea0ca6488194fa4596762ff711
- Document Type :
- article
- Full Text :
- https://doi.org/10.32362/2500-316X-2022-10-1-18-27