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.


翻译:设计能够直观且安全地操作数据结构的编程语言是一项关键的研究挑战。使用指针的传统破坏性内存操作复杂且容易出错。现有的类型系统(如仿射类型和形状类型)针对堆和指针的安全操作提出了解决方案,但设计允许在更高抽象层次上操作复杂指针数据结构的高级声明式语言,在很大程度上仍是一个未解决的问题。$λ_{GT}$语言作为一种纯函数式编程语言,将超图(本文中统称为图)作为主要数据结构,部分解决了这些挑战。通过将具有共享引用和循环的数据抽象为图,该语言支持通过模式匹配进行声明式操作,并利用其类型系统保证这些操作的安全性。然而,先前提出的$λ_{GT}$类型系统仍存在两个重要的开放性问题。首先,该类型系统不支持不完全图,即用户定义类型的图中缺失某些元素的图。其次,该类型系统在模式匹配过程中依赖动态类型检查。本研究通过将线性蕴含引入$λ_{GT}$类型系统,并引入新的约束条件以确保其可靠性,从而解决了这两个挑战。

0
下载
关闭预览

相关内容

【WWW2024】博弈论式反事实解释图神经网络
专知会员服务
32+阅读 · 2024年2月17日
【AAAI2023】自适应黎曼空间中的自监督连续图学习
专知会员服务
27+阅读 · 2022年12月2日
【ICML2022】闭式同构变换的时间序列对齐
专知会员服务
12+阅读 · 2022年6月20日
专知会员服务
63+阅读 · 2021年3月12日
图节点嵌入(Node Embeddings)概述,9页pdf
专知
15+阅读 · 2020年8月22日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
VIP会员
相关VIP内容
【WWW2024】博弈论式反事实解释图神经网络
专知会员服务
32+阅读 · 2024年2月17日
【AAAI2023】自适应黎曼空间中的自监督连续图学习
专知会员服务
27+阅读 · 2022年12月2日
【ICML2022】闭式同构变换的时间序列对齐
专知会员服务
12+阅读 · 2022年6月20日
专知会员服务
63+阅读 · 2021年3月12日
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员