V2EX  ›  英汉词典
Enqueued related words: Agda, Idris

Dependent typing

Definition / 释义

Dependent typing(依赖类型/依赖型类型系统):一种类型系统特性,使“类型”可以依赖于“值”(或程序中的具体数据)。因此,类型能够表达更精确的约束与规格(例如“长度为 n 的向量”),常用于形式化验证、证明辅助器与高级函数式编程语言中。(更广义相关概念常称 dependent types;此外“typing”也可泛指“类型判定/类型赋予”的过程。)

Pronunciation (IPA) / 发音(IPA)

/dɪˈpɛndənt ˈtaɪpɪŋ/

Examples / 例句

Dependent typing can guarantee that a vector’s length matches what the program expects.
依赖类型可以保证向量的长度与程序期望一致。

With dependent typing, you can encode preconditions in types, so many errors are caught before the code runs.
借助依赖类型,你可以把前置条件编码进类型里,从而在运行前就捕获许多错误。

Etymology / 词源

dependent 来自拉丁语 dependere(“悬挂于、依赖于”),引申为“取决于”。typing 源自 type(“类型/铅字模”)在计算机语境中的发展,指“进行类型标注或类型推断/判定”。“dependent typing”作为术语主要在现代类型理论与程序语言研究中流行,用来指“类型依赖值”的类型系统实践与方法。

Related Words / 相关词汇

Notable Works / 文献与著作中的用例

  • Homotopy Type Theory: Univalent Foundations of Mathematics(HoTT Book):大量讨论依赖类型在数学基础与证明中的作用。
  • Benjamin C. Pierce, Types and Programming Languages:介绍类型系统概念,并在相关章节提到依赖类型作为更强表达力的方向。
  • Robert Harper, Practical Foundations for Programming Languages:系统性讲解类型理论与编程语言语义,涉及依赖类型思想。
  • Thierry Coquand & Gérard Huet, “The Calculus of Constructions”(论文):经典依赖类型框架之一,对后续证明助手影响深远。
  • Rob Nederpelt & Herman Geuvers, Type Theory and Formal Proof:以形式化证明为主线,广泛使用依赖类型相关概念。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   870 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 21:30 · PVG 05:30 · LAX 14:30 · JFK 17:30
♥ Do have faith in what you're doing.