期刊文献+

基于O’Caml语言的通用编程技术

Generic Programming Based on O'Caml Language
下载PDF
导出
摘要 O’Caml语言是一门优秀的函数式程序语言,具有计算模型简单、语法语义描述清晰等特点,而通用编程技术方法通过高度抽象算法、数据结构及其他软件组件可以避免功能相似代码的重复编写.针对如何将通用编程技术方法和O’Caml语言相结合来提高O’Caml程序复用程度的问题,通过对O’Caml语言语法进行扩展引入类型标记1函数,然后运用类型结构化转换和类型映射机制,实现通用函数,从而达到在O’Caml语言中引入通用编程技术的目的.实例结果表明,在O’Caml语言中实现通用编程技术,有效提高了编程效率和程序的通用性. O'Caml is a popular functional programming language with a lot of advanced features, such as: simple module, clear grammar and semantci, etc. Generic programming which programs through the abstracting of algorithm, data structure and all other of the software components can avoid the repeated work of coding with similar functions. In order to combine the generic programming and O'Caml language which can improve the reuse of soft, we extend the grammar of O'Caml language to implement type-indexed function, the structure transition and isomorphism of type and generic function. The experimental result shows that the implementation of generic programming in O'Caml language has improved the efficiency and universality of programming.
出处 《计算机系统应用》 2015年第5期106-110,共5页 Computer Systems & Applications
关键词 通用编程技术 软件复用 O’Caml语言 语法扩展 generic programming soft reuse O'Caml programming language grammar extension
  • 相关文献

参考文献8

  • 1吴拥民.泛型设计的理论研究[J].闽江学院学报,2006,27(2):72-76. 被引量:4
  • 2Wadler P.The essence of functional programming.An invited talk at 19th Annual Symposium on Principles of Program-ming Languages,Albuquerque,New Mexico.2009:107-113.
  • 3L?h A,Clarke D,Jeuring J.Dependency-style generic Haskell.Proc.of the 8th ACM SIGPLAN International Conference on Functional Programming.ACM Press.2005.141-152.
  • 4Wadler PS.Blott.How to make ad-hoc polymorphism less ad-hoc.Proc.of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages,2008:60-76.
  • 5Ehrig H.Applied and computational category theory.European Association for Theoretical Computer Science,2006,(6):134-135.
  • 6Oliveira BC,Gibbons J.Typecase:A design pattern for type-indexed functions.Proc.of the 2005 ACM SIGPLAN workshop on Haskell,Tallinn,Estonia,2007,(9):98-109.
  • 7Rauglaudre D.Camlp5-Reference Manual version 5.09.http://cristal.inria.fr/ddr/camlp5/doc/pdf/camlp5-5.09.pdf.
  • 8Knight K.Unification:A multidisciplinary survey.Computing Surveys,2007,21(1):93-124.

共引文献3

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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