...
首页> 外文期刊>Science of Computer Programming >Abstraction over implementation structure with symmetrically encapsulated multimethods
【24h】

Abstraction over implementation structure with symmetrically encapsulated multimethods

机译:具有对称封装的多方法的实现结构的抽象

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

摘要

In object-oriented languages, methods are encapsulated, hence module interfaces are made up of sets of methods partitioned along the objects or classes that make up the module. This prevents abstraction over the implementation structure of applications. Any change in method placement may cause a global effect that ripples through all clients depending on that method. Sometimes this unduly restricts the scope of software evolution, particularly for methods with multiple parameters where there is no clear owner. We investigate a simple scheme where methods may be defined in the classes of any of their parameters. This allows client code to be oblivious to choice of method placement, and therefore immune against it changing. When combined with multiple dispatch, this scheme allows for modular extensibility, where methods defined in one class may be overloaded by methods defined in classes that are not its subclasses. We detail our proposal by extending a core calculus of class-based object-oriented languages with these symmetrically encapsulated multimethods, and prove the result sound. It is well-known that multiple dispatch is at odds with modular type-checking. We also discuss different strategies that can be followed to mitigate the type-checking problem and propose variants of the original calculus that are amenable to modular checking.
机译:在面向对象的语言中,方法是封装的,因此模块接口由沿着组成模块的对象或类划分的方法集组成。这样可以防止抽象化应用程序的实现结构。方法位置的任何更改都可能导致全局效果,该效果会在所有客户端上波动,具体取决于该方法。有时,这不适当地限制了软件开发的范围,特别是对于没有明确所有者的具有多个参数的方法。我们研究了一种简单的方案,其中可以在任何参数的类中定义方法。这使客户端代码可以忽略方法位置的选择,因此可以避免更改。当与多个调度结合使用时,此方案可实现模块化的可扩展性,其中在一个类中定义的方法可能会被不是其子类的类中定义的方法重载。我们通过用这些对称封装的多方法扩展基于类的面向对象语言的核心演算来详细说明我们的建议,并证明结果是正确的。众所周知,多重调度与模块化类型检查是矛盾的。我们还将讨论可用来缓解类型检查问题的不同策略,并提出适用于模块化检查的原始演算的变体。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号