[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 Zhengkang1LIU Zhihao1HUANG Qing1YOU Zhen2WANG Changjing1*SHI Haihe1HU Qimin2TAO 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ÊÇÒ»ÖÖÒÔÀàÐÍÐèÇóΪºËÐĵijÌÐòÉè¼Æ·¶Ê½.ÃèÊöÍêÕûµÄ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