Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages

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 prog...

Full description

Saved in:
Bibliographic Details
Main Author: Y. P. Korablin
Format: Article
Language:Russian
Published: MIREA - Russian Technological University 2022-03-01
Series:Российский технологический журнал
Subjects:
Online Access:https://www.rtj-mirea.ru/jour/article/view/451
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849249545387507712
author Y. P. Korablin
author_facet Y. P. Korablin
author_sort Y. P. Korablin
collection DOAJ
description 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).
format Article
id doaj-art-b1fb99ea0ca6488194fa4596762ff711
institution Kabale University
issn 2782-3210
2500-316X
language Russian
publishDate 2022-03-01
publisher MIREA - Russian Technological University
record_format Article
series Российский технологический журнал
spelling doaj-art-b1fb99ea0ca6488194fa4596762ff7112025-08-20T03:57:31ZrusMIREA - Russian Technological UniversityРоссийский технологический журнал2782-32102500-316X2022-03-01101182710.32362/2500-316X-2022-10-1-18-27297Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languagesY. P. Korablin0NRU MPEIObjectives. 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).https://www.rtj-mirea.ru/jour/article/view/451program schemesemantic domainsprocess semanticsequational characterization of the semantic meanings of programsequivalence of program schemes
spellingShingle Y. P. Korablin
Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
Российский технологический журнал
program scheme
semantic domains
process semantics
equational characterization of the semantic meanings of programs
equivalence of program schemes
title Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
title_full Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
title_fullStr Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
title_full_unstemmed Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
title_short Equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
title_sort equivalence of the schemes of programs based on the algebraic approach to setting the semantics of programming languages
topic program scheme
semantic domains
process semantics
equational characterization of the semantic meanings of programs
equivalence of program schemes
url https://www.rtj-mirea.ru/jour/article/view/451
work_keys_str_mv AT ypkorablin equivalenceoftheschemesofprogramsbasedonthealgebraicapproachtosettingthesemanticsofprogramminglanguages