Modern programming frequently requires generalised notions of program equivalence based on a metric or a similar structure. Previous work addressed this challenge by introducing the notion of a V-equation, i.e. an equation labelled by an element of a quantale V, which covers inter alia (ultra-)metric, classical, and fuzzy (in)equations. It also introduced a V-equational system for the linear variant of lambda-calculus where any given resource must be used exactly once. In this paper we drop the (often too strict) linearity constraint by adding graded modal types which allow multiple uses of a resource in a controlled manner. We show that such a control, whilst providing more expressivity to the programmer, also interacts more richly with V-equations than the linear or Cartesian cases. Our main result is the introduction of a sound and complete V-equational system for a lambda-calculus with graded modal types interpreted by what we call a Lipschitz exponential comonad. We also show how to build such comonads canonically via a universal construction, and use our results to derive graded metric equational systems (and corresponding models) for programs with timed and probabilistic behaviour.


翻译:现代编程经常需要基于度量或类似结构的广义程序等价性概念。早期的研究通过引入 V-等式的概念来解决这个挑战,即由一个量子 V 标记的等式,其中涵盖了包括(超)度量、经典和模糊(不)等式在内的各种情况。同时还引入了一个 V-等式系统,用于线性 lambda 演算的变体,其中给定的任何资源必须正好使用一次。本文通过添加分级模态类型来丢弃(往往过于严格的)线性约束,从而允许以受控制的方式多次使用资源。我们证明了这样的控制不仅为程序员提供了更多的表达能力,而且也更加丰富地与 V-等式进行交互,而线性或笛卡尔的情况则不能如此。我们的主要结果是针对一个由 Lipschitz 指数余函子解释的带有分级模态类型的 lambda 演算引入了一个音效和完整的 V-等式系统。我们还展示了如何通过一个通用的构造来规范地构建这样的余函子,并利用我们的结果为具有时态和概率行为的程序推导分级度量等式系统(以及相应的模型)。

0
下载
关闭预览

相关内容

专知会员服务
76+阅读 · 2021年3月16日
专知会员服务
42+阅读 · 2020年12月18日
专知会员服务
50+阅读 · 2020年12月14日
Diganta Misra等人提出新激活函数Mish,在一些任务上超越RuLU
专知会员服务
14+阅读 · 2019年10月15日
机器学习入门的经验与建议
专知会员服务
92+阅读 · 2019年10月10日
【2022新书】Python数据分析第三版,579页pdf
专知
17+阅读 · 2022年8月31日
7 Papers & Radios | IJCAI 2022杰出论文;苹果2D GAN转3D
机器之心
0+阅读 · 2022年7月31日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Transferring Knowledge across Learning Processes
CreateAMind
27+阅读 · 2019年5月18日
【泡泡机器人原创专栏】IMU预积分总结与公式推导(一)
泡泡机器人SLAM
18+阅读 · 2018年7月22日
Reinforcement Learning: An Introduction 2018第二版 500页
CreateAMind
11+阅读 · 2018年4月27日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
【推荐】SVM实例教程
机器学习研究会
17+阅读 · 2017年8月26日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
Arxiv
0+阅读 · 2023年5月24日
Arxiv
0+阅读 · 2023年5月23日
Arxiv
0+阅读 · 2023年5月22日
Arxiv
0+阅读 · 2023年5月22日
Arxiv
0+阅读 · 2023年5月20日
VIP会员
相关资讯
【2022新书】Python数据分析第三版,579页pdf
专知
17+阅读 · 2022年8月31日
7 Papers & Radios | IJCAI 2022杰出论文;苹果2D GAN转3D
机器之心
0+阅读 · 2022年7月31日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Transferring Knowledge across Learning Processes
CreateAMind
27+阅读 · 2019年5月18日
【泡泡机器人原创专栏】IMU预积分总结与公式推导(一)
泡泡机器人SLAM
18+阅读 · 2018年7月22日
Reinforcement Learning: An Introduction 2018第二版 500页
CreateAMind
11+阅读 · 2018年4月27日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
【推荐】SVM实例教程
机器学习研究会
17+阅读 · 2017年8月26日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员