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

按名调用渐进类型理论

Call-by-name Gradual Type Theory

Max S. New, Daniel R. Licata

AI总结:

本文提出按名调用渐进类型理论,通过普遍性质定义动态类型、类型转换和类型错误,证明标准转换行为由渐进保证唯一确定,并构建了域理论模型。

摘要:

我们提出了渐进类型理论,这是一种用于按名调用渐进类型化的逻辑和类型理论。我们以一种新颖的方式定义了渐进类型化的核心构造(动态类型、类型转换和类型错误),这些构造通过相对于新的渐进类型和项动态性判断的普遍性质来定义,这些判断是在责备演算中发展起来的,并用于陈述渐进类型化的“渐进保证”定理。结合类型理论提供的普通外延性(η)原理,我们证明了转换的大部分标准操作行为是由渐进保证唯一确定的。这为转换的定义提供了语义上的合理性证明,并表明非标准的转换定义必然违反这些原理。我们的类型理论是某类称为装备的预序范畴的内部语言。我们给出了一种从表示非渐进类型和程序的2-范畴构建解释渐进类型理论的装备的一般构造,这是Findler和Felleisen的契约定义的语义类比,并利用它构建了一些具体的渐进类型化的域理论模型。

英文摘要:

We present gradual type theory, a logic and type theory for call-by-name gradual typing. We define the central constructions of gradual typing (the dynamic type, type casts and type error) in a novel way, by universal properties relative to new judgments for gradual type and term dynamism, which were developed in blame calculi and to state the "gradual guarantee" theorem of gradual typing. Combined with the ordinary extensionality ($η$) principles that type theory provides, we show that most of the standard operational behavior of casts is uniquely determined by the gradual guarantee. This provides a semantic justification for the definitions of casts, and shows that non-standard definitions of casts must violate these principles. Our type theory is the internal language of a certain class of preorder categories called equipments. We give a general construction of an equipment interpreting gradual type theory from a 2-category representing non-gradual types and programs, which is a semantic analogue of Findler and Felleisen's definitions of contracts, and use it to build some concrete domain-theoretic models of gradual typing.

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

↑