Semantics, Specification Logic, and Hoare Logic of Exact Real Computation

Sewon Park, Franz Brauße, Pieter Collins, SunYoung Kim, Michal Konečný +5 more
8/20/2016
9 citations
math.NAcs.LO

Official code: michalkonecny/aern2 (27 stars, Haskell, last commit 2026-10-05).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

A Haskell library for Approximating Exact Real Numbers (AERN) based on interval computation. (aern2 is a rewrite of aern.)

273Haskell, HTMLNov 25, 20151 months ago
exact-realshaskellnumericspolynomials

Similar Papers

Cite this paper

@article{park2016semantics,
  title  = {Semantics, Specification Logic, and Hoare Logic of Exact Real Computation},
  author = {Sewon Park and Franz Brauße and Pieter Collins and SunYoung Kim and Michal Konečný and Gyesik Lee and Norbert Müller and Eike Neumann and Norbert Preining and Martin Ziegler},
  year   = {2016},
  eprint = {1608.05787},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1608.05787}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1608.05787.svg)](https://codeofpaper.com/paper/1608.05787)

Discussion