正式可重用框架的角色

D. Garlan
{"title":"正式可重用框架的角色","authors":"D. Garlan","doi":"10.1145/99569.99812","DOIUrl":null,"url":null,"abstract":"We use our experience in applying formal methods to large-scale industrial problems to argue (a) the practical importance of developing formal reusable frameworks, and (b) th e need for further research into techniques for defining and instantiating these frameworks. 1 The Value of Formal Frameworks Success in introducing formal methods into industry depends on making those methods cost-effective in the overall context of industrial software engineering practice. In the past, efforts to do this have largely focused on the problem of refi,nemeni: given a formal specification of a system, how does one construct an implementation that is correct with respect to that specification [4, 3, 71. While the use of formal refinement leads to software with many desirable properties, this application of formal techniques has not found widespread industrial use in the United States except perhaps in the areas of securityand safety-critical systems, which naturally place a high premium on correctness. In this paper we argue the need for attention to the inverse problem of abstrachon: within a given domain how does one construct formal models that can serve as reusable frameworks for a wide variety of products. While abstraction and refinement are clearly two sides of the same coin, we have found that a focus on the former can lead to highly effective use of formal methods in practical industrial software development. First, when a single specification can serve a number of distinct products, the cost of developing the framework can be amortized over those products. Second, the development of different products from the Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial 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 a fee and/or specific permission. @ 1990 ACM 089791-4155/90/0010-0042...$1.50 same framework can lead to a desirable uniformity across those products. Third? in many cases the reusable framework can be implemented by corresponding reusable software components. Fourth, the requirement of producing a specification that acts as a framework for several products forces the developers of that specification to strive for particularly elegant abstractions. This in turn can lead to much cleaner definitions of the fundamental concepts behind an application. Fifth, since reusing an existing framework is considerably easier than specifying it in the first place, in many cases the job of constructing the framework can be allotted to a small team of highly skilled engineers. This addresses the very real problem in industry that currently all too few software engineers are capable of producing good specifictions. Finally, at a much grander level, we can hope that by concentrating on higher-level frameworks, we may some day have libraries of formally-specified software architectures that form the basic design repertoire of every software engineer. 2 A Framework for Electronic Instruments To illustrate one of these frameworks, consider the problem of defining a simple electronic counter/timer (which measures the frequency or period of an electronic signal). In its most abstract form, such an instrument can be viewed as a mathematical function that can be applied to a Signal to produce a Measurement. The problem in defining a framework for instruments of this sort is to make such functions intellectually (and practically) manageable. Our approach has been to develop a framework in which an instrument is defined as a composition of simple functions, each component function describing some portion of the instrument’s overall functionality. To account for a user’s ability to configure the instrument we treat these components as higher order functions. The use of higher-order functions captures both Proceedings of the ACM SIGSOFT International Workshop on Formal Methods in Software DevelopI n ment. Napa, California, May 9-11, 1990. the user’s intuition of configuring an instrument and also the actual operating behavior of current implementations. The user typically sets up input parameters and then repeatedly applies the resultant functions in real-time to produce a series of measurements. Such a decomposition for a counter/timer is illustrated in Figure 1. More formally we can use the Z specification language [l] to model this architecture by defining a higher-order function for each component. For example, the Couple function is defined as follows: Coupling ::= Direct 1 Filter Couple : Coupling + Signal -+ Signal Couple Direct s = s Couple Filter s = X t l s(t) h(s) The user-supplied Coupling parameter determines whether the signal will pass through unaltered or have its DC offset filtered out of the signal. Given a value of this parameter, Couple produces a new function that maps a Signal to a Signal. In a similar way we can define the other functional components of the instrument. (A complete description of this specification appears in [5].) For example, the component DeiectCrossings is defined as follows: Slope ::= POS 1 NEG Level == Volts DetectCrossings : Level x Slope 4 Signal","PeriodicalId":429108,"journal":{"name":"Formal Methods in Software Development","volume":"T163 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"19","resultStr":"{\"title\":\"The role of formal reusable frameworks\",\"authors\":\"D. Garlan\",\"doi\":\"10.1145/99569.99812\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We use our experience in applying formal methods to large-scale industrial problems to argue (a) the practical importance of developing formal reusable frameworks, and (b) th e need for further research into techniques for defining and instantiating these frameworks. 1 The Value of Formal Frameworks Success in introducing formal methods into industry depends on making those methods cost-effective in the overall context of industrial software engineering practice. In the past, efforts to do this have largely focused on the problem of refi,nemeni: given a formal specification of a system, how does one construct an implementation that is correct with respect to that specification [4, 3, 71. While the use of formal refinement leads to software with many desirable properties, this application of formal techniques has not found widespread industrial use in the United States except perhaps in the areas of securityand safety-critical systems, which naturally place a high premium on correctness. In this paper we argue the need for attention to the inverse problem of abstrachon: within a given domain how does one construct formal models that can serve as reusable frameworks for a wide variety of products. While abstraction and refinement are clearly two sides of the same coin, we have found that a focus on the former can lead to highly effective use of formal methods in practical industrial software development. First, when a single specification can serve a number of distinct products, the cost of developing the framework can be amortized over those products. Second, the development of different products from the Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial 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 a fee and/or specific permission. @ 1990 ACM 089791-4155/90/0010-0042...$1.50 same framework can lead to a desirable uniformity across those products. Third? in many cases the reusable framework can be implemented by corresponding reusable software components. Fourth, the requirement of producing a specification that acts as a framework for several products forces the developers of that specification to strive for particularly elegant abstractions. This in turn can lead to much cleaner definitions of the fundamental concepts behind an application. Fifth, since reusing an existing framework is considerably easier than specifying it in the first place, in many cases the job of constructing the framework can be allotted to a small team of highly skilled engineers. This addresses the very real problem in industry that currently all too few software engineers are capable of producing good specifictions. Finally, at a much grander level, we can hope that by concentrating on higher-level frameworks, we may some day have libraries of formally-specified software architectures that form the basic design repertoire of every software engineer. 2 A Framework for Electronic Instruments To illustrate one of these frameworks, consider the problem of defining a simple electronic counter/timer (which measures the frequency or period of an electronic signal). In its most abstract form, such an instrument can be viewed as a mathematical function that can be applied to a Signal to produce a Measurement. The problem in defining a framework for instruments of this sort is to make such functions intellectually (and practically) manageable. Our approach has been to develop a framework in which an instrument is defined as a composition of simple functions, each component function describing some portion of the instrument’s overall functionality. To account for a user’s ability to configure the instrument we treat these components as higher order functions. The use of higher-order functions captures both Proceedings of the ACM SIGSOFT International Workshop on Formal Methods in Software DevelopI n ment. Napa, California, May 9-11, 1990. the user’s intuition of configuring an instrument and also the actual operating behavior of current implementations. The user typically sets up input parameters and then repeatedly applies the resultant functions in real-time to produce a series of measurements. Such a decomposition for a counter/timer is illustrated in Figure 1. More formally we can use the Z specification language [l] to model this architecture by defining a higher-order function for each component. For example, the Couple function is defined as follows: Coupling ::= Direct 1 Filter Couple : Coupling + Signal -+ Signal Couple Direct s = s Couple Filter s = X t l s(t) h(s) The user-supplied Coupling parameter determines whether the signal will pass through unaltered or have its DC offset filtered out of the signal. Given a value of this parameter, Couple produces a new function that maps a Signal to a Signal. In a similar way we can define the other functional components of the instrument. (A complete description of this specification appears in [5].) For example, the component DeiectCrossings is defined as follows: Slope ::= POS 1 NEG Level == Volts DetectCrossings : Level x Slope 4 Signal\",\"PeriodicalId\":429108,\"journal\":{\"name\":\"Formal Methods in Software Development\",\"volume\":\"T163 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1990-04-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"19\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Formal Methods in Software Development\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/99569.99812\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formal Methods in Software Development","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/99569.99812","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 19

摘要

我们利用我们将形式化方法应用于大规模工业问题的经验来论证(a)开发形式化可重用框架的实际重要性,以及(b)需要进一步研究定义和实例化这些框架的技术。将形式化方法引入工业的成功取决于使这些方法在工业软件工程实践的整体环境中具有成本效益。在过去,这样做的努力主要集中在refi,nemeni问题上:给定系统的正式规范,如何构建一个相对于该规范是正确的实现[4,3,71]。虽然使用形式化细化导致软件具有许多理想的属性,但这种形式化技术的应用在美国并没有广泛的工业用途,除了安全和安全关键系统领域,这些领域自然对正确性给予了高度的重视。在本文中,我们认为有必要关注抽象的逆向问题:在给定的领域内,如何构建可以作为各种产品可重用框架的正式模型。虽然抽象和细化显然是同一枚硬币的两面,但我们已经发现,关注前者可以在实际的工业软件开发中高效地使用形式化方法。首先,当单个规范可以服务于许多不同的产品时,开发框架的成本可以分摊到这些产品上。第二,允许免费复制本材料的全部或部分,前提是这些复制不是为了直接的商业利益而制作或分发的,必须有ACM版权声明、出版物的标题和出版日期,并注明复制是由计算机协会许可的。以其他方式复制或重新发布需要付费和/或特定许可。相同的框架可以在这些产品之间实现理想的均匀性。第三个吗?在许多情况下,可重用框架可以通过相应的可重用软件组件来实现。第四,生成作为多个产品框架的规范的需求迫使该规范的开发人员努力实现特别优雅的抽象。这反过来又可以使应用程序背后的基本概念的定义更加清晰。第五,由于重用现有框架比首先指定它要容易得多,因此在许多情况下,构建框架的工作可以分配给一个由高技能工程师组成的小团队。这解决了行业中一个非常现实的问题,即目前很少有软件工程师能够生成好的规格说明。最后,在更大的层面上,我们希望通过关注更高级的框架,我们可能有一天拥有正式指定的软件架构库,这些架构库构成了每个软件工程师的基本设计曲目。为了说明其中一个框架,考虑定义一个简单的电子计数器/计时器(测量电子信号的频率或周期)的问题。在其最抽象的形式中,这样的仪器可以被视为一个数学函数,可以应用于一个信号来产生一个测量。为这类工具定义框架的问题是使这些功能在智力上(和实际上)可管理。我们的方法是开发一个框架,在这个框架中,仪器被定义为简单功能的组合,每个组件功能描述仪器整体功能的某些部分。考虑到用户配置仪器的能力,我们将这些组件视为高阶函数。高阶函数的使用捕获了ACM SIGSOFT软件开发形式化方法国际研讨会的两个会议记录。1990年5月9日至11日,加州纳帕。用户对配置仪器的直觉,以及当前实现的实际操作行为。用户通常设置输入参数,然后实时重复应用结果函数来产生一系列测量结果。图1说明了计数器/计时器的这种分解。更正式地说,我们可以使用Z规范语言[1]通过为每个组件定义一个高阶函数来对这个体系结构建模。例如,Couple函数定义如下:Coupling::= Direct 1 Filter Couple: Coupling + Signal -+ Signal Couple Direct s = s Couple Filter s = X t l s(t) h(s)用户提供的Coupling参数决定了信号是不加改变地通过还是将其直流偏置从信号中滤除。 给定该形参的值,Couple生成一个新函数,将一个Signal映射到另一个Signal。以类似的方式,我们可以定义仪器的其他功能部件。(该规范的完整描述见[5]。)例如,组件DeiectCrossings定义如下:Slope::= POS 1 NEG Level == Volts DetectCrossings: Level x Slope 4 Signal
本文章由计算机程序翻译,如有差异,请以英文原文为准。
The role of formal reusable frameworks
We use our experience in applying formal methods to large-scale industrial problems to argue (a) the practical importance of developing formal reusable frameworks, and (b) th e need for further research into techniques for defining and instantiating these frameworks. 1 The Value of Formal Frameworks Success in introducing formal methods into industry depends on making those methods cost-effective in the overall context of industrial software engineering practice. In the past, efforts to do this have largely focused on the problem of refi,nemeni: given a formal specification of a system, how does one construct an implementation that is correct with respect to that specification [4, 3, 71. While the use of formal refinement leads to software with many desirable properties, this application of formal techniques has not found widespread industrial use in the United States except perhaps in the areas of securityand safety-critical systems, which naturally place a high premium on correctness. In this paper we argue the need for attention to the inverse problem of abstrachon: within a given domain how does one construct formal models that can serve as reusable frameworks for a wide variety of products. While abstraction and refinement are clearly two sides of the same coin, we have found that a focus on the former can lead to highly effective use of formal methods in practical industrial software development. First, when a single specification can serve a number of distinct products, the cost of developing the framework can be amortized over those products. Second, the development of different products from the Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial 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 a fee and/or specific permission. @ 1990 ACM 089791-4155/90/0010-0042...$1.50 same framework can lead to a desirable uniformity across those products. Third? in many cases the reusable framework can be implemented by corresponding reusable software components. Fourth, the requirement of producing a specification that acts as a framework for several products forces the developers of that specification to strive for particularly elegant abstractions. This in turn can lead to much cleaner definitions of the fundamental concepts behind an application. Fifth, since reusing an existing framework is considerably easier than specifying it in the first place, in many cases the job of constructing the framework can be allotted to a small team of highly skilled engineers. This addresses the very real problem in industry that currently all too few software engineers are capable of producing good specifictions. Finally, at a much grander level, we can hope that by concentrating on higher-level frameworks, we may some day have libraries of formally-specified software architectures that form the basic design repertoire of every software engineer. 2 A Framework for Electronic Instruments To illustrate one of these frameworks, consider the problem of defining a simple electronic counter/timer (which measures the frequency or period of an electronic signal). In its most abstract form, such an instrument can be viewed as a mathematical function that can be applied to a Signal to produce a Measurement. The problem in defining a framework for instruments of this sort is to make such functions intellectually (and practically) manageable. Our approach has been to develop a framework in which an instrument is defined as a composition of simple functions, each component function describing some portion of the instrument’s overall functionality. To account for a user’s ability to configure the instrument we treat these components as higher order functions. The use of higher-order functions captures both Proceedings of the ACM SIGSOFT International Workshop on Formal Methods in Software DevelopI n ment. Napa, California, May 9-11, 1990. the user’s intuition of configuring an instrument and also the actual operating behavior of current implementations. The user typically sets up input parameters and then repeatedly applies the resultant functions in real-time to produce a series of measurements. Such a decomposition for a counter/timer is illustrated in Figure 1. More formally we can use the Z specification language [l] to model this architecture by defining a higher-order function for each component. For example, the Couple function is defined as follows: Coupling ::= Direct 1 Filter Couple : Coupling + Signal -+ Signal Couple Direct s = s Couple Filter s = X t l s(t) h(s) The user-supplied Coupling parameter determines whether the signal will pass through unaltered or have its DC offset filtered out of the signal. Given a value of this parameter, Couple produces a new function that maps a Signal to a Signal. In a similar way we can define the other functional components of the instrument. (A complete description of this specification appears in [5].) For example, the component DeiectCrossings is defined as follows: Slope ::= POS 1 NEG Level == Volts DetectCrossings : Level x Slope 4 Signal
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信