首页 | 本学科首页   官方微博 | 高级检索  
     

一种利用适合性测试支持方法重定向的演算
引用本文:赵银亮,朱常鹏,韩博,曾庆花.一种利用适合性测试支持方法重定向的演算[J].软件学报,2013,24(7):1495-1511.
作者姓名:赵银亮  朱常鹏  韩博  曾庆花
作者单位:西安交通大学 电子与信息工程学院, 陕西 西安 710049;西安交通大学 电子与信息工程学院, 陕西 西安 710049;西安交通大学 电子与信息工程学院, 陕西 西安 710049;西安交通大学 电子与信息工程学院, 陕西 西安 710049
基金项目:国家自然科学基金(61173040); 国家高技术研究发展计划(863)(2008AA01Z136)
摘    要:一些面向上下文的编程语言使用结构化的块结构(block-structured construct)将方法调用重定向到层中方法.但该结构无法支持层的动态添加与激活,这增加了程序可执行文件的大小.为了解决该问题,提出一种新方法:使用适合性测试支持方法的重定向,并定义一个运行时的适合性测试演算(runtime fitness testing calculus on top offeatherweight Java calculus)形式化描述该方法.该演算以FJ 演算(featherweight Java calculus)为核心,通过融入新的语言结构——层,基于上下文的方法查找与对象转化描述基于适合性测试的方法重定向,分析它对程序类型安全的影响,制定相应约束,并证明在满足该约束的条件下能够保持程序的类型安全,从而证明所提方法的有效性.以该演算为指导,描述如何通过扩展Java 的编译器与虚拟机,实现将层、基于上下文的方法查找与对象转化融入到Java 语言,并通过实验测试实现,证明所提方法的可行性.该演算及其实现可用于指导如何扩展类似Java(Java-like)的语言以支持程序基于上下文动态调整其行为,并同时保证程序的类型安全.

关 键 词:面向上下文的编程    适合性测试  featherweight  Java  演算  类型系统
收稿时间:2011/12/18 0:00:00
修稿时间:2012/2/28 0:00:00

Calculus Using Fitness Testing for Method Redirection
ZHAO Yin-Liang,ZHU Chang-Peng,HAN Bo and ZENG Qing-Hua.Calculus Using Fitness Testing for Method Redirection[J].Journal of Software,2013,24(7):1495-1511.
Authors:ZHAO Yin-Liang  ZHU Chang-Peng  HAN Bo and ZENG Qing-Hua
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.
Keywords:context-oriented programming  layer  fitness testing  featherweight Java calculus  type system
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号