V2EX  ›  英汉词典

Hoare Logic

释义 Definition

霍尔逻辑:一种用于形式化证明程序正确性的方法,核心是用“三元组”来描述程序片段在给定前提下执行后会满足的结果:
{P} C {Q},其中 P 是前置条件(precondition),C 是程序/命令(command),Q 是后置条件(postcondition)。常用于程序验证、静态分析与形式化方法中。(也常称 Hoare calculus / Hoare system

发音 Pronunciation (IPA)

/hɔːr ˈlɒdʒɪk/

例句 Examples

Hoare logic helps us prove that a program does what it claims.
霍尔逻辑帮助我们证明一个程序确实实现了它所宣称的功能。

Using Hoare logic, we can specify invariants and show that the loop maintains them until the postcondition is satisfied.
使用霍尔逻辑,我们可以给出不变式并证明循环在执行过程中保持它们,直到满足后置条件。

词源 Etymology

“Hoare”来自英国计算机科学家 C. A. R. Hoare(托尼·霍尔) 的姓氏;他在 1969 年提出以公理化方式推理程序的框架(Hoare triples)。 “logic”表示其推理规则与证明体系的逻辑性质,因此合称 Hoare logic(霍尔逻辑)。

相关词 Related Words

文学与经典出处 Literary Works

  • C. A. R. Hoare, “An Axiomatic Basis for Computer Programming”(1969,Communications of the ACM):提出并系统化 Hoare logic 的奠基论文。
  • Edsger W. Dijkstra, **A Discipline of Programming**(1976):大量使用类似 Hoare 风格的规范与不变式推理来讲解程序构造与正确性。
  • Glynn Winskel, **The Formal Semantics of Programming Languages**(1993):在形式语义与程序推理章节中讨论 Hoare logic 及其变体与联系。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   732 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 20:35 · PVG 04:35 · LAX 12:35 · JFK 15:35
♥ Do have faith in what you're doing.