English

Completeness of Hoare Logic over Nonstandard Models

Logic in Computer Science 2017-03-02 v1

Abstract

The nonstandard approach to program semantics has successfully resolved the completeness problem of Floyd-Hoare logic. The known versions of nonstandard semantics, the Hungary semantics and axiomatic semantics, are so general that they are absent either from mathematical elegance or from practical usefulness. The aim of this paper is to exhibit a not only mathematically elegant but also practically useful nonstandard semantics. A basic property of computable functions in the standard model NN of Peano arithmetic PAPA is Σ1\Sigma_1-definability. However, the functions induced by the standard interpretation of while-programs SS in nonstandard models MM of PAPA are not always arithmetical. The problem consists in that the standard termination of SS in MM uses the finiteness in NN, which is not the finiteness in MM. To this end, we shall give a new interpretation of SS in MM such that the termination of SS uses MM-finiteness, and the functions produced by SS in all models of PAPA have the uniform Σ1\Sigma_1-definability. Then we define, based on the new semantics of while-programs, a new semantics of Hoare logic in nonstandard models of PAPA, and show that the standard axiom system of Hoare logic is sound and complete w.r.t. the new semantics. It will be established, in PAPA, that the Hungary semantics and axiomatic semantics coincide with the new semantics of while-programs. Moreover, various comparisons with the previous results, usefulness of the nonstandard semantics, and remarks on the completeness issues are presented.

Cite

@article{arxiv.1703.00240,
  title  = {Completeness of Hoare Logic over Nonstandard Models},
  author = {Zhaowei Xu and Yuefei Sui and Wenhui Zhang},
  journal= {arXiv preprint arXiv:1703.00240},
  year   = {2017}
}
R2 v1 2026-06-22T18:32:04.937Z