z-logo
open-access-imgOpen Access
Partial Correctness of a Fibonacci Algorithm
Author(s) -
Artur Korniłowicz
Publication year - 2020
Publication title -
formalized mathematics
Language(s) - English
Resource type - Journals
eISSN - 1898-9934
pISSN - 1426-2630
DOI - 10.2478/forma-2020-0016
Subject(s) - correctness , fibonacci number , computer science , algorithm , nominative case , hoare logic , simple (philosophy) , mathematics , mathematical proof , theoretical computer science , discrete mathematics , artificial intelligence , verb , philosophy , geometry , epistemology
Summary 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 n -th Fibonacci number: i := 0 s := 0 b := 1 c := 0 while (i n)    c := s    s := b    b := c + s    i := i + 1 return s 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].

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here