首页> 外文会议>ACM SIGPLAN international conference on functional programming >from fast exponentiation to square matrices: an adventure in types
【24h】

from fast exponentiation to square matrices: an adventure in types

机译:从快速指数到方形矩阵:类型的冒险

获取原文
获取外文期刊封面目录资料

摘要

Square matrices serve as an interesting case study in functional programmign.common representations,such as lists of liss,are both inefficietn-at least for access to individual elements-and error-prone,because the compiler cannot enforce "squareness".Switching to a typical balanced-tree representation solves the first problem,but not the seocnd.We devleop a represetnaiton that solves both problems: it offers logarithmic access to each individual eelment and t captures the shape invariants in the tyep,where they cna be checked by the ocmpiler.One interesting feature of our solution is that it translates the well-known fast exponentiation aloirthm to the level of types.Our implementation also provides a stress test for today's advanced type systems it uses nested types,polymorphic recursion,higher-order kinds,and rank-2 polymorphism.
机译:方形矩阵作为一个有趣的案例研究,函数编程Quign.Common表示,例如Liss列表,既不效率,至少用于访问各个元素 - 而且易于出错,因为编译器无法强制执行“平方”.switching到a典型的平衡树表示解决了第一个问题,但不是seocnd.we devleop一个stapedetnaiton,它解决了两个问题:它提供对每个单独的eelment的对数访问,并且t捕获到tyep中的形状不变,在其中由ocmpiler检查它们的形状不变。我们解决方案的一个有趣的特点是它将着名的快速指数AloIthrivem转换为类型的级别。我们的实施也为当今的高级类型系统提供了压力测试,它使用嵌套类型,多态递归,高阶种类和等级2多态性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号