###
Journal of Software:2013.24(7):1495-1511

一种利用适合性测试支持方法重定向的演算
赵银亮,朱常鹏,韩博,曾庆花
(西安交通大学 电子与信息工程学院, 陕西 西安 710049)
Calculus Using Fitness Testing for Method Redirection
ZHAO Yin-Liang,ZHU Chang-Peng,HAN Bo,ZENG Qing-Hua
(School of Electronic and Information Engineering, Xi’an Jiaotong University, Xi’an 710049, China)
Abstract
Chart / table
Reference
Similar Articles
Article :Browse 2222   Download 2266
Received:December 18, 2011    Revised:February 28, 2012
> 中文摘要: 一些面向上下文的编程语言使用结构化的块结构(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.
文章编号:     中图分类号:    文献标志码:
基金项目:国家自然科学基金(61173040); 国家高技术研究发展计划(863)(2008AA01Z136) 国家自然科学基金(61173040); 国家高技术研究发展计划(863)(2008AA01Z136)
Foundation items:
Reference text:

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

ZHAO Yin-Liang,ZHU Chang-Peng,HAN Bo,ZENG Qing-Hua.Calculus Using Fitness Testing for Method Redirection.Journal of Software,2013,24(7):1495-1511