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

向 λ_GT 引入线性蕴含类型以计算不完整图

Introducing Linear Implication Types to $λ_{GT}$ for Computing With Incomplete Graphs

Waseda University(早稻田大学)

Jin Sano, Naoki Yamamoto, Kazunori Ueda

AI总结:

本研究通过引入线性蕴含类型到 λ_GT 中,解决了不完整图处理和动态类型检查的问题,提升类型系统的安全性和抽象能力。

摘要:

设计能够直观且安全地操作数据结构的编程语言是一个关键研究挑战。传统使用指针的破坏性内存操作复杂且容易出错。现有的类型系统,如仿射类型和形状类型,针对安全操作堆和指针的问题,但设计出允许我们在更高抽象层次上操作复杂指针数据结构的高层声明性语言仍然是一个开放问题。λ_GT 语言是一种纯函数式编程语言,将超图(此处称为图)作为主要数据结构。通过将共享引用和循环抽象为图,它通过模式匹配实现声明性操作,并利用其类型系统来保证这些操作的安全性。然而,之前提出的类型系统仍存在两个显著的开放挑战。首先,类型系统不支持不完整图,即用户定义类型的图中某些元素缺失。其次,类型系统依赖于模式匹配期间的动态类型检查。本研究通过将线性蕴含引入 λ_GT 类型系统,并引入新的约束以确保其正确性,来解决这两个挑战。

英文摘要:

Designing programming languages that enable intuitive and safe manipulation of data structures is a critical research challenge. Conventional destructive memory operations using pointers are complex and prone to errors. Existing type systems, such as affine types and shape types, address this problem towards safe manipulation of heaps and pointers, but design of high-level declarative languages that allow us to manipulate complex pointer data structures at a higher level of abstraction is largely an open problem. The $λ_{GT}$ language, a purely functional programming language that treats hypergraphs (hereafter referred to as graphs) as primary data structures, addresses some of these challenges. By abstracting data with shared references and cycles as graphs, it enables declarative operations through pattern matching and leverages its type system to guarantee safety of these operations. Nevertheless, the previously proposed type system of $λ_{GT}$ leaves two significant open challenges. First, the type system does not support \emph{incomplete graphs}, that is, graphs in which some elements are missing from the graphs of user-defined types. Second, the type system relies on dynamic type checking during pattern matching. This study addresses these two challenges by incorporating linear implication into the $λ_{GT}$ type system, while introducing new constraints to ensure its soundness.

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

↑