期刊文献+

基于Haskell语言的泛型扩展研究 被引量:2

Generic Extension Research Based on Haskell Language
在线阅读 下载PDF
导出
摘要 泛型即通过参数化类型来实现在同一份代码上操作多种数据类型。泛型编程是一种编程范式,它利用"参数化类型"将类型抽象化,实现灵活的软件复用。泛型编程思想已经在多种语言中得到运用,并已取得了不小的成果。文中旨在Haskell语言上进行泛型的研究与应用,Haskell语言是一门广为流行的函数式语言,它的计算模型简单,程序语法清晰,易于编写,易于维护。文中利用一些规则对Haskell语言的语法进行扩展,同时引入泛型编程的思想来研究新的函数定义方法,最后在Haskell语言上实现泛型功能。 Generic can treat the types as arguments. Then many kinds of data-types can be processed by the same source code. Generic programming is a normal form of programming. It can make types abstract by a method called type parameterization. So realize the goal of software reuse agilely. For the moment, the idea of generic programming has been realized in many languages, which have got great achievement. It is intended to make some research in the field of Haskell language, and give an application as an example. Haskell is a popular 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. It 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 functions. Finally, the function of generic would be completed in Haskell.
出处 《计算机技术与发展》 2012年第6期89-92,96,共5页 Computer Technology and Development
关键词 泛型编程 类型抽象 函数式程序语言 语法扩展 generic programming type abstract functional programming language grammar extension
作者简介 李阳(1988-),男,江苏淮安人,硕士研究生,研究方向为形式化分析;导师:张兴元,教授,博士生导师,研究方向为软件验证。
  • 相关文献

参考文献18

  • 1Jones S P, Shields M. Practical type inference for arbitrary- rank types[ R]. Microsoft Research ,2003.
  • 2陈叶旺,余金山.泛型编程与设计模式[J].计算机科学,2006,33(4):253-257. 被引量:9
  • 3吴拥民.泛型设计的理论研究[J].闽江学院学报,2006,27(2):72-76. 被引量:4
  • 4Ltih A. Exploring Generic Haskell [ D ]. Netherlands : Utrecht University ,2004.
  • 5Pierce B C. Types and Programming Languages [ R ]. [ s. 1. ] : The MIT Press,2002.
  • 6Loh A, Clarke D, Jeuring J. Dependency- style Generic HaskeU[ C ]//Proceedings of the eighth ACM SIGPLAN inter- national conference on functional programming. [ s. 1. ] : ACM Press,2003 : 141 - 152.
  • 7Jay B. The pattern calculus [ J ]. ACM Transactions on Pro- gramming Languages and Systems,2004,26 (6) :911-937.
  • 8孙斌.面向对象、泛型程序设计与类型约束检查[J].计算机学报,2004,27(11):1492-1504. 被引量:16
  • 9Wadler 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. [ s. 1. ] : ACM Press, 1989:60-76.
  • 10Pitts A. Parametric polymorphism and operational equivalence [ J ]. Mathematical Structu~s in Computer Science, 2000 (10) :231-259.

二级参考文献72

  • 1薛锦云,李云清,杨庆红.若干新的可重用程序部件模式[J].计算机研究与发展,1993,30(1):39-44. 被引量:12
  • 2孙斌.面向对象、泛型程序设计与类型约束检查[J].计算机学报,2004,27(11):1492-1504. 被引量:16
  • 3韩玉坤.面向对象程序设计与泛型程序设计[J].大庆师范学院学报,2006,26(2):81-83. 被引量:3
  • 4Arthur J. Riel Object-Oriented Design Heuristics [M]. Addision Welly, 1996
  • 5Gamma E, Helm R, Johnson R,et al. Design Patterns: Elements of Reusable Object-Oriented Software [M]. Addison-Wesley,1995
  • 6McNatt W B, Bieman J M. Coupling of Design Patterns: Common Practices and Their Benefits [J]. Computer Software & Applications Conf, 2001
  • 7Mak J K H,Choy C S T, Lun D P K. Hierarchical relationships among bad design patterns and good design patterns [J]. In: Proceedings of the IASTED International Conference on Computer Science and Technology, 2003. 7~13
  • 8Alexandrescu A. Modern C + + Design -Generic Programming and Design Patterns Applied [M]. Addison-Wesley,2001
  • 9Dahl O-J, Myrhaug B., Nygaard K..(Simula 67)Common Base Language. Norwegian Computing Center: Publication N.S-22, Oslo, 1970
  • 10Goldberg A., Robson D.. Smalltalk-80: The Language and Its Implementation. Reading, MA: Addison-Wesley, 1983

共引文献24

同被引文献9

  • 1庞建民,赵荣彩,王倩.Haskell语言的惰性计算特性及其应用[J].计算机工程与应用,2006,42(10):97-99. 被引量:4
  • 2Lh A.Exploring generic haskell[]..2004
  • 3L.C. Paulson.ML for the Working Programmer[]..1996
  • 4Hinze R.A New Approach to Generic Functional Programming[].Proceeding of the th ACM SIGPLAN-SIGACTSymposium on Principles of Programming Languages.2000
  • 5Rauglaudre D.Camlp5-Reference Manual[]..2008
  • 6Leroy A,Doligez D,Vouillon J.The O′Caml system release 4.00[]..2012
  • 7Johan J,Andres L,Dave C.Dependency-style generic haskell[].Sigplan Notices.2003
  • 8Jansson P,Jeuring J.Testing properties of generic functions[]..2006
  • 9张迎周.函数编程技术在计算机数学教学中的应用探讨[J].教育与教学研究,2011,25(9):76-78. 被引量:3

引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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