Refinement type checkers are a powerful way to reason about functional programs. For example, one can prove properties of a slow, specification implementation, porting the proofs to an optimized implementation that behaves the same. Without functional extensionality, proofs must relate functions that are fully applied. When data itself has a higher-order representation, fully applied proofs face serious impediments! When working with first-order data, fully applied proofs lead to noisome duplication when using higher-order functions. While dependent type theories are typically consistent with functional extensionality axioms, refinement type systems with semantic subtyping treat naive phrasings of functional extensionality inconsistently, leading to unsoundness. We demonstrate this unsoundness and develop a new approach to equality in Liquid Haskell: we define a propositional equality in a library we call PEq. Using PEq avoids the unsoundness while still proving useful equalities at higher types; we demonstrate its use in several case studies. We validate PEq by building a small model and developing its metatheory. Additionally, we prove metaproperties of PEq inside Liquid Haskell itself using an unnamed folklore technique, which we dub `classy induction'.


翻译:精细类型校验器是解释功能性程序的一个有力方法。 例如, 能够证明缓慢、 规格执行的特性, 将证明移植到行为相同的优化执行的特性。 没有功能扩展性, 证明必须涉及到完全应用的功能。 当数据本身具有更高级的表示方式时, 完全应用的证明会面临严重障碍 。 当使用一阶数据时, 充分应用的证明会导致在使用更高级功能时出现恶性重复 。 虽然依赖性类型理论通常与功能扩展性轴轴一致, 改进类型系统, 精细的语义下亚型系统处理功能扩展性天性天性表达式处理方法前后不一致, 导致不健全 。 我们展示了这种不健全性, 并开发了在液 Haskell 中实现平等的新方法 : 我们定义了在我们称为 PEq 的图书馆中的主张平等。 使用 PEqq 来避免不健全之处, 同时证明在更高类型上仍然有用的平等性 ; 我们在若干案例研究中展示了它的用途 。 我们通过建立小型模型和开发其非元理论来验证PEq 。 此外, 我们验证了“ ”, 我们用了“ Hashqliglishemal ” 。

0
下载
关闭预览

相关内容

专知会员服务
75+阅读 · 2021年3月16日
【CVPR2021】自监督几何感知
专知会员服务
45+阅读 · 2021年3月6日
专知会员服务
33+阅读 · 2020年11月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
143+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
98+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
【Reformer】图解Reformer:一种高效的Transformer
深度学习自然语言处理
5+阅读 · 2020年3月9日
《自然》(20190829出版)一周论文导读
科学网
6+阅读 · 2019年8月30日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
动物脑的好奇心和强化学习的好奇心
CreateAMind
10+阅读 · 2019年1月26日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
carla 学习笔记
CreateAMind
9+阅读 · 2018年2月7日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2021年4月26日
Arxiv
7+阅读 · 2020年6月29日
VIP会员
相关VIP内容
专知会员服务
75+阅读 · 2021年3月16日
【CVPR2021】自监督几何感知
专知会员服务
45+阅读 · 2021年3月6日
专知会员服务
33+阅读 · 2020年11月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
143+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
98+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
相关资讯
【Reformer】图解Reformer:一种高效的Transformer
深度学习自然语言处理
5+阅读 · 2020年3月9日
《自然》(20190829出版)一周论文导读
科学网
6+阅读 · 2019年8月30日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
动物脑的好奇心和强化学习的好奇心
CreateAMind
10+阅读 · 2019年1月26日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
carla 学习笔记
CreateAMind
9+阅读 · 2018年2月7日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员