计算机工程与应用2018,Vol.54Issue(7):1-10,10.DOI:10.3778/j.issn.1002-8331.1710-0159
函数式程序模板元编程的元建模实现方法
Meta-modeling method for implementing template meta-programming of functional programming
摘要
Abstract
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.关键词
函数式程序/应用类型系统/模板/元编程/模型转换Key words
functional programming/Applied Type System(ATS)/template/meta-programming/model transformation分类
信息技术与安全科学引用本文复制引用
祝义,黄志球,周航,刘林源..函数式程序模板元编程的元建模实现方法[J].计算机工程与应用,2018,54(7):1-10,10.基金项目
国家自然科学基金(No.61502212) (No.61502212)
江苏省博士后基金(No.1501055B) (No.1501055B)
江苏省自然科学基金(No.BK20130735) (No.BK20130735)
江苏省高校自然科学研究项目(No.13KJB520011). (No.13KJB520011)