期刊文献+

函数式语言泛型特性的研究与实现

WANG Peng.Research and realization of generic identity based on functional language
在线阅读 下载PDF
导出
摘要 对于泛型程序设计来说,类型的参数化多态是其理论框架,参数化多态引入了类型变量,使得类型参数化,支持类型上的抽象,从而可以大大提高软件的复用程度。泛型编程思想已经在多种语言中得到运用,并已取得了不小的成果。在函数式语言上进行泛型的研究与应用,Haskell语言是函数式语言中较为经典的一种语言,它的计算模型简单,语法清晰,易于编写,易于维护,拥有很大的发展空间。利用一些规则对Haskell语言的语法进行相关扩展,同时引入泛型的思想,研究与运用定义泛型函数的方法,在Haskell语言上实现了泛型功能。 Parametric polymorphism is crucial to generic programming in that it adopts parameterized types and therefore fully supports the abstraction on types and increases the level of software reuse. For the moment, the idea of generic programming has been realized in many languages, which have got great achievement. Haskell is a popu- lar language, and it is functional too. It has a lot of advantages, such as, simple module, clarity syntax, etc. So the programmer can write and modify Haskell sentence easily. This thesis shows the extension of the grammar of Haskell according to some rules, which also introduces the idea of generic programming, and gives some methods to define generic functions. Finally, the function of generic would be completed in Haskell.
出处 《计算机工程与应用》 CSCD 2012年第28期71-76,共6页 Computer Engineering and Applications
关键词 泛型编程 类型抽象 函数式程序设计 语法扩展 generic programming type abstract functional programming grammar extension
  • 相关文献

参考文献15

  • 1Jones S P, Shields M.Practical type inference for arbitrary-rank types: Microsoft Research[R].2003.
  • 2Reis G,Jarvi J.What is generic programming?[C]// LCSD' 05: Library-Centric Software Design OOPLA Workshop, 2005.
  • 3Pierce B C.Types and programming languages[M].[S.l.]: The MIT Press,2002.
  • 4Loh A.Exploring generic haskell[D].Utrecht University, Netherlands, 2004-09.
  • 5Loh A, Clarke D, Jeuring J.Dependency-style generic haskell[C]//Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming[S.l.]: ACM Press,2003 : 141-152.
  • 6Jay B.The pattern calculus[J].ACM Transactions on Programming Languages and Systems,2003.
  • 7Wadler P, Blott S.How to make ad-hoc polymorphism less ad-hoc[C]//Proceedings of the 16th ACM SIGPLAN- SIGACT Symposium on Principles of Programming Languages.IS.1.] :ACM Press, 1989: 60-76.
  • 8Pitts A.Parametric polymorphism and operational equivalence[J].Mathematical Structures in Computer Science, 2000(10) :231-259.
  • 9Jansson P.Functional polytypic programming[D].Chalmers University of Technology and G-teborg University, 2000.
  • 10Altenkirch T, McBride C.Generic programming within dependently typed programming[C]//Gibbons J,Jeuring J. IFIP TC2/WG2.1 Working Conference on Generic Programming, Germany, July 11-12,2002: 1-20.

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部