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 essential to real number computation, we use a carefully designed Plotkin powerdomain. This makes 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 $Z\ni p\mapsto 2^p\in R$, we arrive at a first-order theory which we prove to be decidable, model-complete, and expressive for the base programming language. 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 predicates. Various examples demonstrate the practicality and convenience of our language and proof rules.
翻译:我们建议一种简单而必要的编程语言,即 ERC, 其特征是任意真实数字,作为原始数据类型, 确切地说。 配有一种注解语义的语义, ERC为真实数字的算法处理提供了一个正式的语理理论基础。 为了捕捉对于实际数字计算来说是众所周知的关键的多价值, 我们使用一种精心设计的Plotkin powerddomamamamamamamalemain。 这使得我们编程语言的语义可以比较和完整: 在 ERC 中, 能够实现在可比较分析中可计算的所有和唯一真实的功能。 基础编程语言支持真实的算术和隐含的限度; 扩展支持额外的原始操作( 如用户定义的指数功能 ) 。 通过限制对Presburger 算术的整数和对实际数字计算至关重要的“ 精度”, 我们使用一种第一级理论, 我们证明它可以分解、 模型完整、 和 表达基础编程语言的语言。 以上述逻辑为前提条件和后限的精度语言的规格语言为基础, 我们将“ ” 逻辑” 和“ 精确的逻辑” 解释和“ 逻辑” 解释” 的精确的逻辑, 演示的逻辑展示和“ 的逻辑演示的逻辑演示的逻辑演示的逻辑演示的逻辑, 演示的逻辑演示的逻辑演示的逻辑演示的正确性,, 和精确性, 和精确性, 的逻辑演示的逻辑演示的逻辑演示的正确性, 的逻辑演示的精确性, 和精确性, 演示的逻辑性, 的逻辑性, 的逻辑的逻辑的逻辑的逻辑的逻辑的逻辑的逻辑性, 演示的原理的逻辑性, 的逻辑性, 和精确性, 和精确性, 的逻辑性, 的逻辑性, 的逻辑性, 的逻辑性, 和精确性, 和精确性, 的逻辑的逻辑性, 和精确性, 和精确性, 的逻辑性, 和精确性, 的逻辑性, 和精确性,以。