������ ��������� ��������� �������в� ���� PYTHON

B. Hoshko, V. Chernyakhivskyy
{"title":"������ ��������� ��������� �������в� ���� PYTHON","authors":"B. Hoshko, V. Chernyakhivskyy","doi":"10.30970/vam.2019.27.10293","DOIUrl":null,"url":null,"abstract":"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) = , 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.","PeriodicalId":302104,"journal":{"name":"Application Mathematics and Informatics","volume":"17 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-03-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Application Mathematics and Informatics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.30970/vam.2019.27.10293","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

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) = , 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.
本文解释了复合Python编程语言操作符的语义定义,我们在应用程序项目中扩展了这些操作符的应用程序。定义以基本的初始形式编写,这是研究编程和构建数据处理算法的主要形式。在语义定义的基础上,形成语法定义,它构成了通用Python语法的正确子集,并且可以在不修改基本部分的情况下通过扩展操作进行补充。提出了一种操作-功能语义定义方法,该方法可以重建语法定义,以保留语言各个结构的基本语义,并使语法定义的输出长度最小化。为此,我们主要使用三种方法:还原完整的语法规则;在语法右侧替换非终结符的定义;根据先前定义的非终端添加非严格定义的终端。语义模型建立在操作分类和数据转换函数的基础上。模型被视为泛代数U(A) =,其中M是一个非空集合(数量、存储单元、结构、运算符),Ω是集合M上的一组操作(可能是部分操作),包括签名。我们将语义模型分为两组:1)基于有效Python操作的模型;2)基于Python操作符和控制结构的模型。对于每一组代数模型,语义都有自己的特点。为以下对象定义了语义模型:数字类型、赋值、数据系统、打印、输入;条件表达式,条件运算符if;循环操作符while, for;尝试异常控制操作符;带有上下文管理器的操作符。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信