BASIC SEMANTICS OF COMPOUND PYTHON OPERATORS

Autor

  • B. Hoshko Львівський національний університет імені Івана Франка
  • V. Chernyakhivskyy Львівський національний університет імені Івана Франка

DOI:

https://doi.org/10.30970/vam.2019.27.10293

Abstrakt

The semantic denitions of compound Python programming language operators, for which we have expanding applications in application projects, are explained in the article. The denitions are written in the basic initial form, which is primary for the study of programming and for the construction of algorithms for data processing. On the basis of semantic denitions, syntax denitions are formed, which form the correct subset of the general Python syntax, and can be supplemented by extension operations without modication of the base part. The method of operational-functional denition of semantics is presented, which allows to rebuild syntax denitions so as to preserve the basic semantics of individual constructions of the language and to minimize the length of output by grammatical denitions startdef=>+"example". For this purpose we use basically three methods: reduction of complete grammatical rules; substitution of denitions of non-terminals on the right side of the syntax; adding non-strictly dened terminals with reference to previously dened non-terminals. Semantics models are built on the classication of operations and data conversion functions. Models are treated as universal algebras U(A) =< M;Ω >, where M is a nonempty set (quantities, memory cells, structures, operators), and Ω is a set of operations (possibly partial) on the set M, including the signature. We dene semantics models in two groups: 1)models based on valid Python operations; 2)models based on Python operators and control structures. For each group of models of algebra semantics has its own peculiarities. Semantics models are dened for the following objects: numeric types, assignment, data system, print, input; conditional expressions, conditional operator if; loop operators while, for; try exception control operator; operator with context managers.

Biogramy autorów

  • B. Hoshko - Львівський національний університет імені Івана Франка
    доцент кафедри програмування
  • V. Chernyakhivskyy - Львівський національний університет імені Івана Франка
    доцент кафедри програмування

Bibliografia

1. RosuG. Matching logic /G.Rosu //Logical Methods in Computer Science. 2017. Vol.13, No.4. P.161. 2. ChenX. Matching mu-Logic /X.Chen, G.Rosu //Proceedings of theThirty-Fourth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). 2019. 2427 June 2019. Vancouver, Canada.
3. AhrentW. Deductive software verication the key book; from theory to practice /W.Ahrent, B.Beckert, R.Bubel, R.Hahnle, Ph.Schmitt, M.Ulbrich, editors //Lecture notes in computer science. New-York: Springer, 2016. 10001. 4. BinsbergenaL.T. Executable component-based semantics /L.T.Binsbergena, P.D.Mosses, C.N.Sculthorped //J Logical Algebraic Methods Program. 2019. No.103. P.184212. 5. StefanescuA. Semantics-based program veriers for all languages /A.Stefanescu, D.Park, S.Yuwen, Y.Li, G.Rosu //Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'16). ACM. 2016. Amsterdam, Netherlands 30/10-04/11/2016. P.7491. 6. Python Software Foundation [US] //Python 3.7.3 documentation [Electronic resource]. Available from: https://docs.python.org/3/ 7. KardashA.I. Construction of basic algebraic operational-functional models for the study of programming of integer arithmetics /A.I.Kardash, V.V.Chernyakhivsky //Visnyk of Cherkasy State Technological University. Series of technical sciences. Cherkasy: Editorial and publishing center of the ChTTU. 2011. No.3. P.7782.

Opublikowane

2020-03-05

Numer

Dział

Комп'ютерні науки