精确实数计算的语义、规范逻辑与霍尔逻辑
Semantics, Specification Logic, and Hoare Logic of Exact Real Computation
AI总结:
本文提出精确实数计算语言 ERC,利用 Plotkin 幂域实现可计算且完备的实数语义,并基于可判定的一阶规范逻辑扩展霍尔逻辑,以形式化验证实数程序的完全正确性。
摘要:
我们提出一种简单的命令式编程语言 ERC,其特点是将任意实数作为原始数据类型进行精确处理。ERC 配备了指称语义,为实数的算法处理提供了形式化的编程语言理论基础。为了刻画多值性——众所周知,多值性对实数计算至关重要——我们使用 Plotkin 幂域,并使我们的编程语言语义具有可计算性和完备性:在可计算分析中所有且仅有可计算的实函数都能在 ERC 中实现。基础编程语言支持实数算术以及隐式极限;扩展则支持额外的原始操作(例如用户定义的指数函数)。通过将整数限制为 Presburger 算术,并将实数强制转换限制为“精度”嵌入 $\mathbb{Z}\ni p\mapsto 2^p\in\mathbb{R}$,我们得到一个一阶理论,并证明它是可判定的且模型完备的。基于上述逻辑作为前置条件和后置条件的规范语言,我们将霍尔逻辑扩展为一个可靠的(相对于指称语义)且具有表达力的系统,用于推导正确的完全正确性规范。多个示例展示了我们的语言及扩展霍尔逻辑的实用性和便利性。
英文摘要:
We propose a simple imperative programming language, ERC, that features arbitrary real numbers as primitive data type, exactly. Equipped with a denotational semantics, ERC provides a formal programming language-theoretic foundation to the algorithmic processing of real numbers. In order to capture multi-valuedness, which is well-known to be essential to real number computation, we use a Plotkin powerdomain and make our programming language semantics computable and complete: all and only real functions computable in computable analysis can be realized in ERC. The base programming language supports real arithmetic as well as implicit limits; expansions support additional primitive operations (such as a user-defined exponential function). By restricting integers to Presburger arithmetic and real coercion to the `precision' embedding $\mathbb{Z}\ni p\mapsto 2^p\in\mathbb{R}$, we arrive at a first-order theory which we prove to be decidable and model-complete. Based on said logic as specification language for preconditions and postconditions, we extend Hoare logic to a sound (w.r.t. the denotational semantics) and expressive system for deriving correct total correctness specifications. Various examples demonstrate the practicality and convenience of our language and the extended Hoare logic.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。