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
下载
关闭预览

相关内容

使用多模态语言模型生成图像
专知会员服务
32+阅读 · 2023年8月23日
专知会员服务
137+阅读 · 2020年8月24日
面试题:请简要介绍下tensorflow的计算图
七月在线实验室
14+阅读 · 2019年6月10日
图嵌入(Graph embedding)综述
人工智能前沿讲习班
449+阅读 · 2019年4月30日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月19日
VIP会员
相关资讯
面试题:请简要介绍下tensorflow的计算图
七月在线实验室
14+阅读 · 2019年6月10日
图嵌入(Graph embedding)综述
人工智能前沿讲习班
449+阅读 · 2019年4月30日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员