Apla与程序设计语言泛型特性比较研究  被引量:8

The Comparative Study on the Generic Features of Apla and Programming Languages

在线阅读下载全文

作  者:左正康[1] 刘志豪 黄箐 游珍[2] 王昌晶[1] 石海鹤[1] 胡启敏[2] 陶小明 ZUO Zhengkang;LIU Zhihao;HUANG Qing;YOU Zhen;WANG Changjing;SHI Haihe;HU Qimin;TAO Xiaoming(College of Computer Information Engineering,Jiangxi Normal University,Nanchang Jiangxi 330022,China;Provincial Key Laborary High Performance Computing,Jiangxi Normal University,Nanchang Jiangxi 330022,China)

机构地区:[1]江西师范大学计算机信息工程学院,江西南昌330022 [2]江西师范大学江西省高性能计算重点实验室,江西南昌330022

出  处:《江西师范大学学报(自然科学版)》2019年第5期454-461,共8页Journal of Jiangxi Normal University(Natural Science Edition)

基  金:国家自然科学基金(61862033,61462039,61762049,61662035,61662036);江西省教育厅科技课题(GJJ160329)资助项目

摘  要:面向对象编程(OOP)是以对象为编程核心,而泛型程序设计(GP)是根据一个类型所需要的操作需求进行分类和抽象,即GP是一种以类型需求为核心的程序设计范式.描述完整的GP类型需求包含静态语法约束和动态语义约束,主流程序设计语言已经支持静态语法约束,但受语言其他方面的限制,抽象层次较低,定义的泛型概念难以描述及验证基于动态语义的复杂约束需求问题,与完整实现GP尚有距离.该文综合比较了Java、C#、C++、Concept 4种支持泛型程序设计的语言,基于抽象程序设计语言Apla提出了离完整实现GP更近一步的泛型机制,通过同典型泛型实例对各种程序设计语言泛型特性进行分析,验证抽象泛型程序设计语言Apla中该泛型机制的优越性.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.

关 键 词:泛型程序设计 动态语义约束 抽象程序设计语言 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象