arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2108.06562cs.PLcs.LO
收藏

逻辑程序设计中的数据类型推断

Data Type Inference for Logic Programming

João Barbosa, Mário Florido, Vítor Santos Costa

摘要:

本文提出了一种新的逻辑程序设计静态数据类型推断算法。不需要声明类型的谓词,我们的算法是能够自动分配类型的谓词,在大多数情况下,对应的数据类型处理其预期的含义。该算法还能够推断出与Haskell中的数据定义类似的数据类型定义的类型,并且在这种情况下,推断出的类型通常更具信息性。我们提出的类型推断算法,证明了一些属性,最后,我们评估我们的方法处理不同的数据结构的示例程序。

英文摘要:

In this paper we present a new static data type inference algorithm for logic programming. Without the need of declaring types for predicates, our algorithm is able to automatically assign types to predicates which, in most cases, correspond to the data types processed by their intended meaning. The algorithm is also able to infer types given data type definitions similar to data definitions in Haskell and, in this case, the inferred types are more informative in general. We present the type inference algorithm, prove some properties and finally, we evaluate our approach on example programs that deal with different data structures.

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

↑