[1]左正康,刘志豪,黄 箐,等.Apla与程序设计语言泛型特性比较研究[J].江西师范大学学报(自然科学版),2019,(05):454-461.[doi:10.16357/j.cnki.issn1000-5862.2019.05.03]
 ZUO Zhengkang,LIU Zhihao,HUANG Qing,et al.The Comparative Study on the Generic Features of Apla and Programming Languages[J].Journal of Jiangxi Normal University:Natural Science Edition,2019,(05):454-461.[doi:10.16357/j.cnki.issn1000-5862.2019.05.03]
点击复制

Apla与程序设计语言泛型特性比较研究()

《江西师范大学学报》(自然科学版)[ISSN:1006-6977/CN:61-1281/TN]

卷:
期数:
2019年05期
页码:
454-461
栏目:
出版日期:
2019-10-10

文章信息/Info

Title:
The Comparative Study on the Generic Features of Apla and Programming Languages
文章编号:
1000-5862(2019)05-0454-08
作者:
左正康1; 刘志豪1; 黄 箐1; 游 珍2; 王昌晶1*; 石海鹤1; 胡启敏2; 陶小明1
1.江西师范大学计算机信息工程学院,江西 南昌 330022; 2.江西师范大学江西省高性能计算重点实验室,江西 南昌 330022
Author(s):
ZUO Zhengkang1; LIU Zhihao1; HUANG Qing1; YOU Zhen2; WANG Changjing1*; SHI Haihe1; HU Qimin2; TAO Xiaoming1
1.College of Computer Information Engineering,Jiangxi Normal University,Nanchang Jiangxi 330022,China; 2.Provincial Key Laborary High Performance Computing,Jiangxi Normal University,Nanchang Jiangxi 330022,China
关键词:
泛型程序设计;  动态语义约束;  抽象程序设计语言
Keywords:
generic programming;  dynamic semantic constraints;  Apla
分类号:
TP 311
DOI:
10.16357/j.cnki.issn1000-5862.2019.05.03
文献标志码:
A
摘要:
面向对象编程(OOP)是以对象为编程核心,而泛型程序设计(GP)是根据一个类型所需要的操作需求进行分类和抽象,即GP是一种以类型需求为核心的程序设计范式.描述完整的GP类型需求包含静态语法约束和动态语义约束,主流程序设计语言已经支持静态语法约束,但受语言其他方面的限制,抽象层次较低,定义的泛型概念难以描述及验证基于动态语义的复杂约束需求问题,与完整实现GP尚有距离.该文综合比较了Java、C#、C++、Concept 4种支持泛型程序设计的语言,基于抽象程序设计语言Apla提出了离完整实现GP更近一步的泛型机制,通过同典型泛型实例对各种程序设计语言泛型特性进行分析,验证抽象泛型程序设计语言Apla中该泛型机制的优越性.
Abstract:
Object-oriented Programming(OOP)takes objects as the core of programming,while Generic Programming(GP)classifies and abstracts according to the operational requirements required by a type,that is,GP is a programming paradigm with type requirements as the core.Describing the complete type of GP demand needs to include static syntax constraints and dynamic semantic constraints.Most mainstream programming languages have supported the static syntax constraints,however,limited by language’s other facilities,the level of abstraction is too low,and the defines of the generic’s concepts are hard to describe and verify the problems with complicated constrained demand that based on the dynamic semantics,and complete implementation GP still have a distance.In the paper,the four generic programming languages,such as Java,C#,C++ and Concept are compared.Based on the abstract programming language Apla,a generics mechanism is proposed to further realize GP.By analyzing the generics characteristics of various programming languages with the same typical generic example,and the superiority of the generic mechanism in abstract generic programming language Apla is verified.

参考文献/References:

[1] Garcia R,Jarvi J,Lumsdaine.An extended comparative study of language support for generic programming[J].Journal of Functional Programming,2007,17(2):145-205.
[2] Jeremy Siek,Jeremiah Willcock.A comparative study of language support for generic programming[J].Acm Sigplan Conference on Object-oriented Programing,2003,38(11):115-134.
[3] McIlroy M D.Mass-produced software components[C]∥Naur P,Randell B.International Conference on Software Engineering,Brussels:NATO,1968:1-9.
[4] Zalewski M,Schupp S.A semantic definition of separate type checking in C++ with concepts[J].Journal of Object Technology,2009,8(5):105-132.
[5] Reynolds J C.Towards a theory of type structure[EB/OL].[2019-01-12].http://logcom.oxfordjournals.org/external-ref?access_num=10.1007/3-540-06859-7_148&link_type=DOI.
[6] Austern M H.Generic programming and the STL[M].Beijing:China Electric Power Press,2003.
[7] 周卫星,左正康,王昌晶,等.泛型编程在面向对象语言中的对比研究[J].江西师范大学学报:自然科学版,2018,42(3):304-310.
[8] 吴国凤,方珏.基于Java语言中的泛型研究[M]∥徐枞巍,韩江.全国计算机技术与应用.北京:电子工业出版社,2008.
[9] 田芳,石海鹤,左正康.一种抽象泛型机制的新型Java实现[J].江西师范大学学报:自然科学版,2016,40(1):77-82.
[10] 薛锦云,朱小征,等.Apla→Java程序生成系统中泛型机制实现方法研究[J].江西师范大学学报:自然科学版,2017,41(1):52-55.
[11] Hall C,Hammond K,Jones S P.Type classes in Haskell[M].Berlin:Springer-Verlag,1994:241-256.
[12] Piotr Macio �瘙 堾 .Application of metaprogramming and generic programming in multiscale modelling[EB/OL].[2019-01-12].https://www.computer.org/csdl/magazine/cs/5555/01/08500322/null.
[13] Georg Ofenbeck.Staging for generic programming in space and time[EB/OL].[2019-01-12].http://spiral.ece.cmu.edu:8080/pub-spiral/pubfile/paper_284.pdf.
[14] Xue Jinyun.Genericity in PAR platform[EB/OL].[2019-01-12].https://link.springer.com/chapter/10.1007%2F978-3-319-31220-0_1.
[15] 孙斌.面向对象、泛型程序设计与类型约束检查[J].计算机学报,2004,27(11):1492-1504.
[16] 王千文.泛型程序的形式验证问题的研究[D].宁夏:宁夏大学,2015.
[17] 徐文胜.泛型编程与Java实现[J].江西师范大学学报:自然科学版,2007,31(5):471-474.
[18] Stepanov A,Lee M.The standard template library[J].C/C++ Users Journal,1999,13(12):10-20.
[19] Musser D R.The tecton concept description language[J].Technical Communication,1998,34(2):119-120.
[20] 陈林,徐宝文.基于源代码静态分析的C++0x泛型概念抽取[J].计算机学报,2009,32(9):1792-1803.
[21] Reis G D,Stroustrup B.Specifying C++ concepts[M].New York:ACM Press,2006:295-308.
[22] David Pfander,Malte Brunn.AutotuneTMP:auto-tuning in C++ with runtime template metaprogramming[EB/OL].[2019-01-12].https://www.researchgate.net/publication/324867388_AutoTuneTMP_Auto-Tuning_in_C_With_Runtime_Template_Metaprogramming.
[23] Bernardy J P,Jansson P,Zalewski,et al.A conparison of C++ concepts and Haskell type classes[M].Canada:ACM,2008.
[24] 石海鹤,石海鹏,薛锦云,等.一种形式化开发非递归算法的方法[J].计算机应用研究,2007,24(11):203-205.
[25] 薛锦云.程序设计方法学[M].北京:国家高等教育出版社,2001.
[26] 游珍,薛锦云,应时.Apla语言中并发分布式机制的研究[J].计算机科学,2012,39(1):104-108.
[27] 徐华珍,薛锦云,朱小征.Apla→Java 程序生成系统中泛型的机制实现方法研究[J].江西师范大学学报:自然科学版,2017,41(1):52-55,92.
[28] 左正康.Apla中泛型约束机制研究[J].软件学报,2015,26(6):1340-1355.

相似文献/References:

[1]周卫星,左正康*,王昌晶,等.泛型编程在面向对象语言中的对比研究[J].江西师范大学学报(自然科学版),2018,(03):304.[doi:10.16357/j.cnki.issn1000-5862.2018.03.14]
 ZHOU Weixing,ZUO Zhengkang*,WANG Changjing,et al.The Contrastive Study of Generic Programming in Object-Oriented Languages[J].Journal of Jiangxi Normal University:Natural Science Edition,2018,(05):304.[doi:10.16357/j.cnki.issn1000-5862.2018.03.14]

备注/Memo

备注/Memo:
收稿日期:2019-01-08基金项目:国家自然科学基金(61862033,61462039,61762049,61662035,61662036)和江西省教育厅科技课题(GJJ160329)资助项目.通信作者:王昌晶(1977-),男,江西南昌人,教授,博士,主要从事软件形式化方法、形式规格说明方法和Web服务方面的研究.E-mail:wcj771006@163.com
更新日期/Last Update: 2019-10-10