为您的矩阵提供良好的类型:类型矩阵和应用程序的Haskell库(功能珍珠)

Armando Santos, J. Oliveira
{"title":"为您的矩阵提供良好的类型:类型矩阵和应用程序的Haskell库(功能珍珠)","authors":"Armando Santos, J. Oliveira","doi":"10.1145/3406088.3409019","DOIUrl":null,"url":null,"abstract":"We study a simple inductive data type for representing correct-by-construction matrices. Despite its simplicity, it can be used to implement matrix-manipulation algorithms efficiently and safely, performing in some cases faster than existing alternatives even though the algorithms are written in a direct and purely functional style. A rich collection of laws makes it possible to derive and optimise these algorithms using equational reasoning, avoiding the notorious off-by-one indexing errors when fiddling with matrix dimensions. We demonstrate the usefulness of the data type on several examples, and highlight connections to related topics in category theory.","PeriodicalId":242706,"journal":{"name":"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell","volume":"65 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Type your matrices for great good: a Haskell library of typed matrices and applications (functional pearl)\",\"authors\":\"Armando Santos, J. Oliveira\",\"doi\":\"10.1145/3406088.3409019\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We study a simple inductive data type for representing correct-by-construction matrices. Despite its simplicity, it can be used to implement matrix-manipulation algorithms efficiently and safely, performing in some cases faster than existing alternatives even though the algorithms are written in a direct and purely functional style. A rich collection of laws makes it possible to derive and optimise these algorithms using equational reasoning, avoiding the notorious off-by-one indexing errors when fiddling with matrix dimensions. We demonstrate the usefulness of the data type on several examples, and highlight connections to related topics in category theory.\",\"PeriodicalId\":242706,\"journal\":{\"name\":\"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell\",\"volume\":\"65 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-08-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3406088.3409019\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3406088.3409019","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

摘要

我们研究了一种表示构造正确矩阵的简单归纳数据类型。尽管它很简单,但它可以用来高效安全地实现矩阵操作算法,在某些情况下,即使算法是以直接和纯函数式的方式编写的,也比现有的替代方案执行得更快。丰富的定律集合使得使用等式推理推导和优化这些算法成为可能,避免了在摆弄矩阵维度时臭名昭著的偏离1的索引错误。我们在几个例子上展示了数据类型的有用性,并强调了与范畴论中相关主题的联系。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Type your matrices for great good: a Haskell library of typed matrices and applications (functional pearl)
We study a simple inductive data type for representing correct-by-construction matrices. Despite its simplicity, it can be used to implement matrix-manipulation algorithms efficiently and safely, performing in some cases faster than existing alternatives even though the algorithms are written in a direct and purely functional style. A rich collection of laws makes it possible to derive and optimise these algorithms using equational reasoning, avoiding the notorious off-by-one indexing errors when fiddling with matrix dimensions. We demonstrate the usefulness of the data type on several examples, and highlight connections to related topics in category theory.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信