arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.26161cs.PL
收藏

有限函数编程

Finite Functional Programming

University of California, Berkeley(加州大学伯克利分校)

Michael Arntzenius, Max Willsey

AI总结:

本文提出有限函数编程,通过将谓词视为具有有限支持的函数,统一了函数式和逻辑编程,用于处理聚合和加权逻辑编程。

摘要:

我们通过将谓词视为具有其支持(即输出非零的输入集合)的函数,统一了函数式和逻辑编程。例如,Datalog是一种有限支持布尔函数的语言。有限支持允许将函数表示为输入-输出表。从布尔函数推广到其他指向集合自然地处理聚合和加权逻辑编程。我们将有限支持函数(作为数据表示)与高阶函数(作为代码表示)的结合称为有限函数编程。我们提供了一个简单的类型系统来检查有限支持,使用分级效果检查变量绑定,并使用相关类型建模指向集合。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑