arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.06747cs.PL
收藏

面向可扩展记录的代数子类型化研究

Towards Algebraic Subtyping for Extensible Records

Rodrigo Marques, Mário Florido, Pedro Vasconcelos

AI总结:

针对MLsub仅支持不可扩展的显式类型化记录的问题,研究通过向Simple-sub推断算法的类型语言加入行变量、扩展约束求解方法,实现了可扩展记录支持且保留类型推断可判定性。

摘要:

MLsub是一种极简语言,其类型系统结合了子类型与参数多态性,且配备可推断紧致主类型的类型推断算法。Simple-sub是另一种可高效实现、更易理解的推断算法。MLsub支持显式类型化记录,但这类记录不具备可扩展性。本文为Simple-sub扩展了可扩展记录支持,即可向先前定义的记录添加新字段。为此,我们在类型语言中加入行变量,并相应扩展了类型推断算法的类型约束求解方法,同时保持了类型推断的可判定性。

英文摘要:

MLsub is a minimal language with a type system combining subtyping and parametric polymorphism and a type inference algorithm which infers compact principal types. Simple-sub is an alternative inference algorithm which can be implemented efficiently and is easier to understand. MLsub supports explicitly typed records which are not extensible. Here we extend Simple-sub with extensible records, meaning that we can add new fields to a previously defined record. For this we add row variables to our type language and extend the type constraint solving method of our type inference algorithm accordingly, keeping the decidability of type inference.

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

↑