{"title":"斐波那契算法的部分正确性","authors":"Artur Korniłowicz","doi":"10.2478/forma-2020-0016","DOIUrl":null,"url":null,"abstract":"Summary In this paper we introduce some notions to facilitate formulating and proving properties of iterative algorithms encoded in nominative data language [19] in the Mizar system [3], [1]. It is tested on verification of the partial correctness of an algorithm computing n-th Fibonacci number: i := 0 s := 0 b := 1 c := 0 while (i <> n) c := s s := b b := c + s i := i + 1 return s This paper continues verification of algorithms [10], [13], [12] written in terms of simple-named complex-valued nominative data [6], [8], [17], [11], [14], [15]. The validity of the algorithm is presented in terms of semantic Floyd-Hoare triples over such data [9]. Proofs of the correctness are based on an inference system for an extended Floyd-Hoare logic [2], [4] with partial pre- and post-conditions [16], [18], [7], [5].","PeriodicalId":42667,"journal":{"name":"Formalized Mathematics","volume":null,"pages":null},"PeriodicalIF":1.0000,"publicationDate":"2020-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"Partial Correctness of a Fibonacci Algorithm\",\"authors\":\"Artur Korniłowicz\",\"doi\":\"10.2478/forma-2020-0016\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Summary In this paper we introduce some notions to facilitate formulating and proving properties of iterative algorithms encoded in nominative data language [19] in the Mizar system [3], [1]. It is tested on verification of the partial correctness of an algorithm computing n-th Fibonacci number: i := 0 s := 0 b := 1 c := 0 while (i <> n) c := s s := b b := c + s i := i + 1 return s This paper continues verification of algorithms [10], [13], [12] written in terms of simple-named complex-valued nominative data [6], [8], [17], [11], [14], [15]. The validity of the algorithm is presented in terms of semantic Floyd-Hoare triples over such data [9]. Proofs of the correctness are based on an inference system for an extended Floyd-Hoare logic [2], [4] with partial pre- and post-conditions [16], [18], [7], [5].\",\"PeriodicalId\":42667,\"journal\":{\"name\":\"Formalized Mathematics\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":1.0000,\"publicationDate\":\"2020-07-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Formalized Mathematics\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.2478/forma-2020-0016\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"MATHEMATICS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formalized Mathematics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2478/forma-2020-0016","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"MATHEMATICS","Score":null,"Total":0}
引用次数: 3
摘要
本文引入了一些概念,以便于在Mizar系统[3],[1]中表述和证明用指示性数据语言[19]编码的迭代算法的性质。验证了计算第n个斐波那契数的算法的部分正确性:i:= 0 s:= 0 b:= 1 c:= 0 while (i <> n) c:= ss:= b b:= c + si:= i + 1 return s。本文继续验证用简单命名复值指示数据[6]、[8]、[17]、[11]、[14]、[15]编写的算法[10]、[13]、[12]。该算法的有效性以此类数据上的语义Floyd-Hoare三元组的形式呈现[9]。正确性的证明是基于一个扩展的Floyd-Hoare逻辑[2],[4]的推理系统,该推理系统具有部分前置和后置条件[16],[18],[7],[5]。
Summary In this paper we introduce some notions to facilitate formulating and proving properties of iterative algorithms encoded in nominative data language [19] in the Mizar system [3], [1]. It is tested on verification of the partial correctness of an algorithm computing n-th Fibonacci number: i := 0 s := 0 b := 1 c := 0 while (i <> n) c := s s := b b := c + s i := i + 1 return s This paper continues verification of algorithms [10], [13], [12] written in terms of simple-named complex-valued nominative data [6], [8], [17], [11], [14], [15]. The validity of the algorithm is presented in terms of semantic Floyd-Hoare triples over such data [9]. Proofs of the correctness are based on an inference system for an extended Floyd-Hoare logic [2], [4] with partial pre- and post-conditions [16], [18], [7], [5].
期刊介绍:
Formalized Mathematics is to be issued quarterly and publishes papers which are abstracts of Mizar articles contributed to the Mizar Mathematical Library (MML) - the basis of a knowledge management system for mathematics.