【24h】

Behavioral contracts and behavioral subtyping

机译:行为契约和行为分型

获取原文

摘要

Component-based software manufacturing has the potential to bring division-of-labor benefits to the world of software engineering. In order to make a market of software components viable, however, producers and consumers must agree on enforceable software contracts. In this paper, we show how to enforce contracts if components are manufactured from class and interface hierarchies. In particular, we focus on one style of contract: pre- and post-conditions. Programmers annotate class and interface methods with pre- and post-conditions and the run-time system checks these conditions during evaluation. These contracts guarantee that methods are called properly and provide appropriate results. In procedural languages, the use of pre- and post-condition contracts is well-established and studies have demonstrated its value. In object-oriented languages, however, assigning blame for pre- and post-condition failures poses subtle and complex problems. Specifically, assigning blame for malformed class and interface hierarchies is so difficult that none of the existing contract monitoring tools correctly assign blame for these failures. In this paper, we show how to overcome these problems in the context of Java. Our work is based on the notion of behavioral subtyping.
机译:基于组件的软件制造具有将分工优势带入软件工程领域的潜力。但是,为了使软件组件市场可行,生产者和消费者必须就可执行的软件合同达成一致。在本文中,我们展示了如果组件是根据类和接口层次结构制造的,则如何执行合同。特别是,我们专注于一种合同样式:前置条件和后置条件。程序员用前置条件和后置条件注释类和接口方法,并且运行时系统在评估期间检查这些条件。这些合同保证正确调用方法并提供适当的结果。在程序语言中,前提条件合同和后置条件合同的使用已得到公认,并且研究证明了其价值。但是,在面向对象的语言中,将条件失败和失败归咎于责任会带来细微而复杂的问题。特别是,为格式错误的类和接口层次结构分配责任非常困难,以至于现有合同监视工具都没有为这些故障正确分配责任。在本文中,我们展示了如何在Java上下文中克服这些问题。我们的工作基于行为子类型的概念。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号