Strengthening Method Contracts for Objects

Atul Gupta, Amit Raj
{"title":"Strengthening Method Contracts for Objects","authors":"Atul Gupta, Amit Raj","doi":"10.1109/APSEC.2006.54","DOIUrl":null,"url":null,"abstract":"The main objective of a 'design by contracts' approach as applied to object-oriented systems, is to develop complete and consistent method contracts for the objects of the system. In this work, we propose a practical approach to develop these contracts for an object from its annotated structural representation, namely, UML constrained class diagram. We generate, simulate, and refine an object state-chart from an initial set of method contracts which in turn help further validating and enhancing these contracts. The impact of this analysis can be multifold: first, it identifies various discrepancies like incomplete and inconsistent class specifications, second, a correct and consistent object statechart model is obtained from which reliable automated code and unit tests can easily be generated, third, facilitate essential and effective verification for software re-use, forth, the resulting statechart and class specifications are in a lock-steps which facilitates effective incremental development and change management and fifth, it allows a modeler to specify object's dynamic requirements declaratively on an abstract level, without the need to use full operational dynamic diagrams. We have also designed a tool ObjectSim that performs automated statechart generation and their interactive simulations. We demonstrate our approach using an example and discuss other related issues.","PeriodicalId":341929,"journal":{"name":"2006 13th Asia Pacific Software Engineering Conference (APSEC'06)","volume":"36 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2006-12-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2006 13th Asia Pacific Software Engineering Conference (APSEC'06)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/APSEC.2006.54","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

The main objective of a 'design by contracts' approach as applied to object-oriented systems, is to develop complete and consistent method contracts for the objects of the system. In this work, we propose a practical approach to develop these contracts for an object from its annotated structural representation, namely, UML constrained class diagram. We generate, simulate, and refine an object state-chart from an initial set of method contracts which in turn help further validating and enhancing these contracts. The impact of this analysis can be multifold: first, it identifies various discrepancies like incomplete and inconsistent class specifications, second, a correct and consistent object statechart model is obtained from which reliable automated code and unit tests can easily be generated, third, facilitate essential and effective verification for software re-use, forth, the resulting statechart and class specifications are in a lock-steps which facilitates effective incremental development and change management and fifth, it allows a modeler to specify object's dynamic requirements declaratively on an abstract level, without the need to use full operational dynamic diagrams. We have also designed a tool ObjectSim that performs automated statechart generation and their interactive simulations. We demonstrate our approach using an example and discuss other related issues.
加强对象的方法契约
应用于面向对象系统的“契约式设计”方法的主要目标是为系统的对象开发完整和一致的方法契约。在这项工作中,我们提出了一种实用的方法,从对象的注释结构表示(即UML约束类图)中为对象开发这些契约。我们从一组初始的方法契约中生成、模拟和细化对象状态图,这些方法契约反过来又有助于进一步验证和增强这些契约。这种分析的影响可能是多方面的:首先,它识别了各种差异,如不完整和不一致的类规范;其次,获得了一个正确和一致的对象状态图模型,从中可以很容易地生成可靠的自动化代码和单元测试;第三,为软件重用提供了必要和有效的验证;第四,生成的状态图和类规范处于一个锁定步骤中,有利于有效的增量开发和变更管理;它允许建模者在抽象层次上声明性地指定对象的动态需求,而不需要使用完整的操作动态图。我们还设计了一个工具ObjectSim来执行自动状态图生成和它们的交互模拟。我们使用一个示例来演示我们的方法,并讨论其他相关问题。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信
小红书