首页> 外文期刊>Science of Computer Programming >On flexible dynamic trait replacement for Java-like languages
【24h】

On flexible dynamic trait replacement for Java-like languages

机译:关于类Java语言的灵活动态特征替换

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

摘要

Dynamic trait replacement is a programming language feature for changing the objects' behavior at runtime by replacing some of the objects' methods. In previous work on dynamic trait replacement for JAVA-like languages, the objects' methods that may be replaced must correspond exactly to a named trait used in the object's class definition. In this paper we propose the notion of replaceable: a programming language feature that decouples the trait replacement operation code and the class declaration code, thus making it possible to refactor classes and to perform unanticipated trait replacement operations without invalidating existing code. We give a formal account of our proposal through a core calculus, FDTJ (Featherweight Dynamic Trait Java), equipped with a static type system guaranteeing that in a well-typed program no runtime type error will take place.
机译:动态特征替换是一种编程语言功能,用于通过替换某些对象的方法来在运行时更改对象的行为。在以前的类似Java语言的动态特征替换的工作中,可以替换的对象的方法必须与对象的类定义中使用的命名特征完全对应。在本文中,我们提出了可替换的概念:一种将特征替换操作代码和类声明代码分离的编程语言功能,从而可以重构类并执行意外的特征替换操作而不会使现有代码无效。我们通过核心演算FDTJ(轻量级动态特性Java)正式说明了我们的建议,该演算配备了静态类型系统,可确保在类型良好的程序中不会发生运行时类型错误。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号