{"title":"Systematic program development and proof: Dromey's method versus top-down refinement","authors":"J. Pleasant","doi":"10.1145/98949.99056","DOIUrl":null,"url":null,"abstract":"This paper compares a program development method proposed in a recent paper by R. G. Dromey with the Wirth-Dijkstra top-down refinement method with regard to proof-of-correctness issues. Several new examples are given to illustrate Dromey's method and to demonstrate its advan tages over the top-down refine ment method with regard to verifiability of the resulting programs. Using Dromey's method, a pro gram is developed by 'making a sequence of refinements, each of which can establish the postcon dition for a corresponding se quence of progressively weaker preconditions until a mechanism has been composed that will es tablish the postcondition for the original given precondition for the problem.' A critical el ement of the method is a collec tion of formal methods for transforming the postcondition of a specification into a form which guides program develop ment. The present paper examines Dromey's method in general and these formal methods in particu lar, with regard to program ver ification via Hoare-type rules. A principle new example of the use of Dromey's method discussed in the paper is the derivation of an algorithm to compute the n-adic representation of a nat ural number (where n is any nat ural number). The paper compares this algorithm with one obtained by use of a more traditional top-down approach, showing that verification for this problem is much more straightforward for the program obtained using Dromey's method. As a first step toward generalizing this result, the paper compares a number of the methods for transforming postconditions (Dromey's method) with commonly used methods for deriving loop invariants for use with Hoare-type rules. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct com mercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires n fee and/or specific per","PeriodicalId":409883,"journal":{"name":"ACM-SE 28","volume":"14 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM-SE 28","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/98949.99056","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
This paper compares a program development method proposed in a recent paper by R. G. Dromey with the Wirth-Dijkstra top-down refinement method with regard to proof-of-correctness issues. Several new examples are given to illustrate Dromey's method and to demonstrate its advan tages over the top-down refine ment method with regard to verifiability of the resulting programs. Using Dromey's method, a pro gram is developed by 'making a sequence of refinements, each of which can establish the postcon dition for a corresponding se quence of progressively weaker preconditions until a mechanism has been composed that will es tablish the postcondition for the original given precondition for the problem.' A critical el ement of the method is a collec tion of formal methods for transforming the postcondition of a specification into a form which guides program develop ment. The present paper examines Dromey's method in general and these formal methods in particu lar, with regard to program ver ification via Hoare-type rules. A principle new example of the use of Dromey's method discussed in the paper is the derivation of an algorithm to compute the n-adic representation of a nat ural number (where n is any nat ural number). The paper compares this algorithm with one obtained by use of a more traditional top-down approach, showing that verification for this problem is much more straightforward for the program obtained using Dromey's method. As a first step toward generalizing this result, the paper compares a number of the methods for transforming postconditions (Dromey's method) with commonly used methods for deriving loop invariants for use with Hoare-type rules. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct com mercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires n fee and/or specific per
本文比较了R. G. Dromey在最近的一篇论文中提出的一种程序开发方法与Wirth-Dijkstra自顶向下细化方法在正确性证明问题上的区别。给出了几个新的例子来说明dromy的方法,并证明了它在结果程序的可验证性方面优于自顶向下的改进方法。使用德罗梅的方法,一个程序是通过“进行一系列的改进,每一个改进都可以为相应的一系列逐渐减弱的前提条件建立后置条件,直到一个机制被组成,该机制将为问题的原始给定前提条件建立后置条件。”该方法的一个关键要素是将规范的后置条件转换为指导程序开发的形式的形式化方法的集合。本文从总体上考察了Dromey的方法,特别是这些形式化方法,通过Hoare-type规则对程序进行验证。本文讨论的使用Dromey方法的一个重要的新例子是推导一个计算自然数(其中n是任意自然数)的n进表示的算法。本文将该算法与使用更传统的自顶向下方法获得的算法进行了比较,表明使用Dromey方法获得的程序对该问题的验证要简单得多。作为推广这一结果的第一步,本文比较了转换后条件的一些方法(Dromey方法)与推导用于hoare类型规则的循环不变量的常用方法。允许免费复制本材料的全部或部分,前提是这些副本不是为了直接的商业利益而制作或分发的,必须出现ACM版权声明、出版物的标题和日期,并注明复制是由计算机协会许可的。以其他方式复制或重新发布,不需要任何费用和/或特定的许可