Executable visual contracts

Marc Lohmann, Stefan Sauer, G. Engels
{"title":"Executable visual contracts","authors":"Marc Lohmann, Stefan Sauer, G. Engels","doi":"10.1109/VLHCC.2005.35","DOIUrl":null,"url":null,"abstract":"Design by contract (DbC) is widely acknowledged to be a powerful technique for creating reliable software. DbC allows developers to specify the behavior of an operation precisely by pre- and post-conditions. Existing DbC approaches predominantly use textual representations of contracts to annotate the actual program code with assertions. In the unified modeling language (UML), the textual object constraint language (OCL) supports the specification of preand post-conditions by constraining the model elements that occur in UML diagrams. However, textual specifications in OCL can become complex and cumbersome, especially for software developers who are typically not used to OCL. In this paper, we propose to specify the pre-and post-conditions of an operation visually by a pair of UML object diagrams (visual contract). We define a mapping of visual contracts into Java classes that are annotated with behavioral interface specifications in the Java modeling language (JML). The mapping supports testing the correctness of the implementation against the specification using JML tools, which include a runtime assertion checker. Thus we make the visual contracts executable.","PeriodicalId":241986,"journal":{"name":"2005 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'05)","volume":"43 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2005-09-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"36","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2005 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'05)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/VLHCC.2005.35","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 36

Abstract

Design by contract (DbC) is widely acknowledged to be a powerful technique for creating reliable software. DbC allows developers to specify the behavior of an operation precisely by pre- and post-conditions. Existing DbC approaches predominantly use textual representations of contracts to annotate the actual program code with assertions. In the unified modeling language (UML), the textual object constraint language (OCL) supports the specification of preand post-conditions by constraining the model elements that occur in UML diagrams. However, textual specifications in OCL can become complex and cumbersome, especially for software developers who are typically not used to OCL. In this paper, we propose to specify the pre-and post-conditions of an operation visually by a pair of UML object diagrams (visual contract). We define a mapping of visual contracts into Java classes that are annotated with behavioral interface specifications in the Java modeling language (JML). The mapping supports testing the correctness of the implementation against the specification using JML tools, which include a runtime assertion checker. Thus we make the visual contracts executable.
可执行的可视合同
契约式设计(DbC)被广泛认为是创建可靠软件的一种强大技术。DbC允许开发人员通过前置和后置条件精确地指定操作的行为。现有的DbC方法主要使用契约的文本表示来用断言注释实际的程序代码。在统一建模语言(UML)中,文本对象约束语言(OCL)通过约束UML图中出现的模型元素来支持前置和后设条件的规范。但是,OCL中的文本规范可能变得复杂和麻烦,特别是对于通常不习惯OCL的软件开发人员。在本文中,我们建议通过一对UML对象图(可视契约)可视化地指定操作的前置和后置条件。我们定义了可视化契约到Java类的映射,这些类用Java建模语言(JML)中的行为接口规范进行了注释。该映射支持使用JML工具根据规范测试实现的正确性,这些工具包括一个运行时断言检查器。因此,我们使可视化契约可执行。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:604180095
Book学术官方微信