A linear argument must be consumed exactly once in the body of its function. A linear type system can verify the correct usage of resources such as file handles and manually managed memory. But this verification requires bureaucracy. This paper presents linear constraints, a front-end feature for linear typing that decreases the bureaucracy of working with linear types. Linear constraints are implicit linear arguments that are to be filled in automatically by the compiler. Linear constraints are presented as a qualified type system, together with an inference algorithm which extends OutsideIn, GHC's existing constraint solver algorithm. Soundness of linear constraints is ensured by the fact that they desugar into Linear Haskell.


翻译:线性参数必须在其函数正文中完全消化一次。 线性类型系统可以核查文件把手和手动管理的内存等资源的正确使用。 但这种核查需要官僚主义。 本文提供了线性限制, 这是线性打字的前端特征, 减少了线性工作类型的官僚主义。 线性限制是线性隐含的线性参数, 由编译者自动填充。 线性限制作为合格的类型系统提出, 连同一种推算算算算法, 延伸到GHC现有的限制解算法OuterIn。 线性限制的正确性得到保证, 因为它们会将线性限制从苏加尔运入Linear Haskell。

0
下载
关闭预览

相关内容

【干货书】机器学习速查手册,135页pdf
专知会员服务
123+阅读 · 2020年11月20日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
161+阅读 · 2020年3月18日
开源书:PyTorch深度学习起步
专知会员服务
50+阅读 · 2019年10月11日
MIT新书《强化学习与最优控制》
专知会员服务
272+阅读 · 2019年10月9日
灾难性遗忘问题新视角:迁移-干扰平衡
CreateAMind
17+阅读 · 2019年7月6日
深度自进化聚类:Deep Self-Evolution Clustering
我爱读PAMI
15+阅读 · 2019年4月13日
逆强化学习-学习人先验的动机
CreateAMind
15+阅读 · 2019年1月18日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】SLAM相关资源大列表
机器学习研究会
10+阅读 · 2017年8月18日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Disentangled Information Bottleneck
Arxiv
12+阅读 · 2020年12月22日
Arxiv
31+阅读 · 2020年9月21日
Meta-Learning with Implicit Gradients
Arxiv
13+阅读 · 2019年9月10日
Rapid Customization for Event Extraction
Arxiv
7+阅读 · 2018年9月20日
Arxiv
5+阅读 · 2018年4月22日
Arxiv
6+阅读 · 2018年2月8日
VIP会员
相关资讯
灾难性遗忘问题新视角:迁移-干扰平衡
CreateAMind
17+阅读 · 2019年7月6日
深度自进化聚类:Deep Self-Evolution Clustering
我爱读PAMI
15+阅读 · 2019年4月13日
逆强化学习-学习人先验的动机
CreateAMind
15+阅读 · 2019年1月18日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】SLAM相关资源大列表
机器学习研究会
10+阅读 · 2017年8月18日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
相关论文
Disentangled Information Bottleneck
Arxiv
12+阅读 · 2020年12月22日
Arxiv
31+阅读 · 2020年9月21日
Meta-Learning with Implicit Gradients
Arxiv
13+阅读 · 2019年9月10日
Rapid Customization for Event Extraction
Arxiv
7+阅读 · 2018年9月20日
Arxiv
5+阅读 · 2018年4月22日
Arxiv
6+阅读 · 2018年2月8日
Top
微信扫码咨询专知VIP会员