首页    期刊浏览 2024年11月06日 星期三
登录注册

文章基本信息

  • 标题:A Hoare logic for the coinductive trace-based big-step semantics of While
  • 本地全文:下载
  • 作者:Keiko Nakata ; Tarmo Uustalu
  • 期刊名称:Logical Methods in Computer Science
  • 印刷版ISSN:1860-5974
  • 电子版ISSN:1860-5974
  • 出版年度:2015
  • 卷号:11
  • 期号:1
  • 页码:1
  • DOI:10.2168/LMCS-11(1:1)2015
  • 出版社:Technical University of Braunschweig
  • 摘要:In search for a foundational framework for reasoning about observable behavior of programs that may not terminate, we have previously devised a trace-based big-step semantics for While. In this semantics, both traces and evaluation (relating initial states of program runs to traces they produce) are defined coinductively. On terminating runs, this semantics agrees with the standard inductive state-based semantics. Here we present a Hoare logic counterpart of our coinductive trace-based semantics and prove it sound and complete. Our logic subsumes the standard partial-correctness state-based Hoare logic as well as the total-correctness variation: they are embeddable. In the converse direction, projections can be constructed: a derivation of a Hoare triple in our trace-based logic can be translated into a derivation in the state-based logic of a translated, weaker Hoare triple. Since we work with a constructive underlying logic, the range of program properties we can reason about has a fine structure; in particular, we can distinguish between termination and nondivergence, e.g., unbounded classically total search fails to be terminating, but is nonetheless nondivergent. Our meta-theory is entirely constructive as well, and we have formalized it in Coq.
  • 其他关键词:big-step semantics, Hoare logic, nontermination, coinductive traces, formalization, Coq.
国家哲学社会科学文献中心版权所有