We unify functional and logic programming by treating predicatesas functions equipped with their support: the set of inputs whose output is nonzero. Datalog, for instance, is a language of finitely supported boolean functions. Finite support allows representing functions as input-output tables. Generalizing from boolean functions to other pointed sets neatly handles aggregation and weighted logic programming. We refer to the combination of finitely supported functions, represented as data, with higher order functions, represented as code, as finite functional programming. We give a simple type system to check finite support, using graded effects to check variable grounding and relevance types to model pointed sets.


翻译:我们将谓词视为带有支撑集(输出非零的输入集合)的函数,从而统一了函数式与逻辑编程范式。例如,Datalog 是一种有限支撑布尔函数语言。有限支撑使得函数可以表示为输入-输出表。从布尔函数推广到其他带基点集合,可以优雅地处理聚合与加权逻辑编程。我们将基于数据的有限支撑函数与基于代码的高阶函数相结合,称为有限函数式编程。我们给出一个简单的类型系统来检查有限支撑,使用分级效果检查变量接地性,并通过相关性类型对带基点集合进行建模。

0
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
【牛津大学博士论文】可微分编程的结构基础,176页pdf
专知会员服务
26+阅读 · 2023年8月20日
【Manning新书】面向数据编程降低软件复杂度,426页pdf
专知会员服务
88+阅读 · 2022年9月5日
【Manning新书】面向数据编程:减少软件复杂度,426页pdf
专知会员服务
81+阅读 · 2022年7月20日
专知会员服务
78+阅读 · 2021年3月16日
【经典书】贝叶斯编程,378页pdf,Bayesian Programming
专知会员服务
251+阅读 · 2020年5月18日
【2022新书】Python数学逻辑,285页pdf
专知
13+阅读 · 2022年11月24日
激活函数还是有一点意思的!
计算机视觉战队
12+阅读 · 2019年6月28日
从信息论的角度来理解损失函数
深度学习每日摘要
17+阅读 · 2019年4月7日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
【干货】深入理解自编码器(附代码实现)
用于数学的 10 个优秀编程语言
算法与数据结构
13+阅读 · 2018年1月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月7日
Arxiv
0+阅读 · 4月1日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关资讯
【2022新书】Python数学逻辑,285页pdf
专知
13+阅读 · 2022年11月24日
激活函数还是有一点意思的!
计算机视觉战队
12+阅读 · 2019年6月28日
从信息论的角度来理解损失函数
深度学习每日摘要
17+阅读 · 2019年4月7日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
【干货】深入理解自编码器(附代码实现)
用于数学的 10 个优秀编程语言
算法与数据结构
13+阅读 · 2018年1月5日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员