一种利用适合性测试支持方法重定向的演算
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金(61173040); 国家高技术研究发展计划(863)(2008AA01Z136)


Calculus Using Fitness Testing for Method Redirection
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    一些面向上下文的编程语言使用结构化的块结构(block-structured construct)将方法调用重定向到层中方法.但该结构无法支持层的动态添加与激活,这增加了程序可执行文件的大小.为了解决该问题,提出一种新方法:使用适合性测试支持方法的重定向,并定义一个运行时的适合性测试演算(runtime fitness testing calculus on top offeatherweight Java calculus)形式化描述该方法.该演算以FJ 演算(featherweight Java calculus)为核心,通过融入新的语言结构——层,基于上下文的方法查找与对象转化描述基于适合性测试的方法重定向,分析它对程序类型安全的影响,制定相应约束,并证明在满足该约束的条件下能够保持程序的类型安全,从而证明所提方法的有效性.以该演算为指导,描述如何通过扩展Java 的编译器与虚拟机,实现将层、基于上下文的方法查找与对象转化融入到Java 语言,并通过实验测试实现,证明所提方法的可行性.该演算及其实现可用于指导如何扩展类似Java(Java-like)的语言以支持程序基于上下文动态调整其行为,并同时保证程序的类型安全.

    Abstract:

    Some context-oriented programming languages use block-structured constructs to redirect method invocation. However, these constructs do not support dynamic layer addition and activation, which increases the binary size of the program. To address the problem, this paper proposes a new approach that uses fitness testing to support method redirection, and presents a runtime fitness testing calculus, an extension of featherweight Java calculus with context-based method resolution and object transformation, to describe the approach. Based on the calculus, the paper analyzes the influence approach as on the type safety of the program, imposes constraints on it, and formally proves that it preserves the type safety of the program when these constraints are satisfied, which validates the approach. The paper also shows the implementation of the approach and assesses the implementation, which indicates that the approach is feasible. The calculus and the implementation illustrate how to extend Java-like languages to support runtime behavior adjustment that is context-based and type-safe.

    参考文献
    相似文献
    引证文献
引用本文

赵银亮,朱常鹏,韩博,曾庆花.一种利用适合性测试支持方法重定向的演算.软件学报,2013,24(7):1495-1511

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2011-12-18
  • 最后修改日期:2012-02-28
  • 录用日期:
  • 在线发布日期: 2013-07-02
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号