erlang的集合类型理论:理论、实现与评估
Set-Theoretic Types for Erlang: Theory, Implementation, and Evaluation
AI总结:
本文提出一种集合类型系统,用于解决erlang动态类型在进程重启后仍可能引发的运行时错误问题,通过静态类型检查提高代码可靠性。
摘要:
Erlang的动态类型纪律可能导致在进程重启后仍持续存在的运行时错误。一些这些运行时错误可以通过静态类型检查来防止。虽然Erlang提供了一种类型规范语言,但编译器不强制执行这些类型,因此其作用仅限于文档用途。对Erlang代码进行类型检查具有挑战性,由于语言特性如动态类型测试、子类型、等递归类型、多态性、签名中的交集类型和未标记的联合类型。本文提出了一种集合类型系统用于Erlang,该系统捕捉了Erlang现有类型语言的核心特性。正式的类型系统保证了类型正确性,并确保类型检查仍可判定。此外,提供了一个类型检查器的实现,支持Erlang类型语言的所有特性以及大多数术语级语言构造。使用Erlang标准库的模块、外部项目和类型检查器本身进行的案例研究证明了其在验证真实世界Erlang代码中的有效性。
英文摘要:
Erlang's dynamic typing discipline can lead to runtime errors that persist even after process restarts. Some of these runtime errors could be prevented through static type checking. While Erlang provides a type specification language, the compiler does not enforce these types, thereby limiting their role to documentation purposes. Type checking Erlang code is challenging due to language features such as dynamic type tests, subtyping, equi-recursive types, polymorphism, intersection types in signatures, and untagged union types. This work presents a set-theoretic type system for Erlang which captures the core features of Erlang's existing type language. The formal type system guarantees type soundness, and ensures that type checking remains decidable. Additionally, an implementation of a type checker is provided, supporting all features of the Erlang type language and most term-level language constructs. A case study with modules from Erlang's standard library, an external project, and the type checker itself demonstrates its effectiveness in verifying real-world Erlang code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。