首页> 中文期刊> 《计算机工程与应用》 >函数式程序模板元编程的元建模实现方法

函数式程序模板元编程的元建模实现方法

     

摘要

In order to solve the problem that the template meta-program of functional programming language lacks generality, this paper proposes a meta-modeling method for implementing the template meta-programming of functional program-ming, which is illustrated by the case of Applied Type System(ATS). Firstly, an instance for generating code from Datatype to Function is given based on ATS template meta-programming.Secondly,an ATS meta-model which includes the definitions of Datatype and Function is constructed by meta-modeling.Thirdly,the transformation from Datatype model to Function model is described.Lastly,an example of ATS template meta-programming based on meta-modeling is given to verify the effectiveness of this method. The experiments show that the method can increase the generality of ATS template meta-programming.%针对函数式程序模板元编程的通用性问题,以应用类型系统ATS(Applied Type System)为例,提出了一种基于元建模的模板元编程实现方法.基于ATS模板元编程给出从枚举类型Datatype到Function的生成实例;通过元建模构造了包含Datatype与Function定义的ATS元模型;详细描述了Datatype模型到Function模型的转换;最后以一个基于元建模的ATS模板元编程为例,讨论了该方法的使用效果.实验结果表明该方法可以提高ATS模板元编程的通用性.

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号