首页> 外文会议>FM 2008: Formal Methods >Lazy Behavioral Subtyping
【24h】

Lazy Behavioral Subtyping

机译:懒惰行为分型

获取原文
获取原文并翻译 | 示例

摘要

Late binding allows flexible code reuse but complicates formal reasoning significantly, as a method call's receiver class is not statically known. This is especially true when programs are incrementally developed by extending class hierarchies. This paper develops a novel method to reason about late bound method calls. In contrast to traditional behavioral subtyping, reverification is avoided without restricting method overriding to fully behavior-preserving redefinition. The approach ensures that when analyzing the methods of a class, it suffices to consider that class and its superclasses. Thus, the full class hierarchy is not needed, and incremental reasoning is supported. We formalize this approach as a calculus which lazily imposes context-dependent subtyping constraints on method definitions. The calculus ensures that all method specifications required by late bound calls remain satisfied when new classes extend a class hierarchy. The calculus does not depend on a specific program logic, but the examples in the paper use a Hoare-style proof system. We show soundness of the analysis method.
机译:后期绑定允许灵活的代码重用,但由于无法静态知道方法调用的接收器类,因此使形式推理大大复杂化。当通过扩展类层次结构以增量方式开发程序时,尤其如此。本文提出了一种新方法来推理后期绑定方法调用。与传统的行为子类型相反,避免了重新验证,而又不将方法重写限制为完全保留行为的重新定义。该方法可确保在分析类的方法时,足以考虑该类及其超类。因此,不需要完整的类层次结构,并且支持增量推理。我们将此方法形式化为一种算术,它对方法定义进行了依赖于上下文的子类型约束。该演算可确保在新类扩展类层次结构时,后期绑定调用所需的所有方法规范均得到满足。演算不依赖于特定的程序逻辑,但是本文中的示例使用了Hoare风格的证明系统。我们展示了分析方法的稳健性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号