Partial Correctness of a Fibonacci Algorithm
Abstract
In this paper we introduce some notions to facilitate formulating and proving properties of iterative algorithms encoded in nominative data language [19] in the Mizar system [3], [1]. It is tested on verification of the partial correctness of an algorithm computing-th Fibonacci number:This paper continues verification of algorithms [10], [13], [12] written in terms of simple-named complex-valued nominative data [6], [8], [17], [11], [14], [15]. The validity of the algorithm is presented in terms of semantic Floyd-Hoare triples over such data [9]. Proofs of the correctness are based on an inference system for an extended Floyd-Hoare logic [2], [4] with partial pre- and post-conditions [16], [18], [7], [5]. n i := 0s := 0b := 1c := 0while (i <> n)c := ss := bb := c + si := i + 1return s
© 2021 Artur Korniłowicz, published by University of Białystok
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 License.