首页    期刊浏览 2024年12月03日 星期二
登录注册

文章基本信息

  • 标题:Modularising inductive families
  • 作者:Hsiang-Shang KO ; Jeremy GIBBONS
  • 期刊名称:Progress in Informatics
  • 印刷版ISSN:1349-8614
  • 电子版ISSN:1349-8606
  • 出版年度:2013
  • 期号:10
  • 页码:65-88
  • DOI:10.2201/NiiPi.2013.10.5
  • 出版社:National Institute of Informatics
  • 摘要:Dependently typed programmers are encouraged to use inductive families to integrate constraints with data construction. Different constraints are used in different contexts, leading to different versions of datatypes for the same data structure. For example, sequences might be constrained by length or by an ordering on elements, giving rise to different datatypes “vectors” and “sorted lists” for the same underlying data structure of sequences. Modular implementation of common operations for these structurally similar datatypes has been a longstanding problem. We propose a datatype-generic solution, in which we axiomatise a family of isomorphisms between datatypes and their more refined versions as datatype refinements, and show that McBride's ornaments can be translated into such refinements. With the ornament-induced refinements, relevant properties of the operations can be separately proven for each constraint, and after the programmer selects several constraints to impose on a basic datatype and synthesises a new datatype incorporating those constraints, the operations can be routinely upgraded to work with the synthesised datatype.
  • 关键词:Dependently typed programming; inductive families; datatype-generic programming; modularity
Loading...
联系我们|关于我们|网站声明
国家哲学社会科学文献中心版权所有