Have a personal or library account? Click to login
Partial Correctness of an Algorithm Computing Lucas Sequences Cover

Partial Correctness of an Algorithm Computing Lucas Sequences

By: Adrian Jaszczak  
Open Access
|May 2021

Abstract

In this paper we define some properties about finite sequences and verify the partial correctness of an algorithm computing n-th element of Lucas sequence [23], [20] with given P and Q coefficients as well as two first elements (x and y). The algorithm is encoded in nominative data language [22] in the Mizar system [3], [1].

i := 0

s := x

b := y

c := x

while (i <> n)

c := s

s := b

ps := p*s

qc := q*c

b := ps − qc

i := i + j

return s

This paper continues verification of algorithms [10], [14], [12], [15], [13] written in terms of simple-named complex-valued nominative data [6], [8], [19], [11], [16], [17]. 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 [18], [21], [7], [5].

DOI: https://doi.org/10.2478/forma-2020-0025 | Journal eISSN: 1898-9934 | Journal ISSN: 1426-2630
Language: English
Page range: 279 - 288
Accepted on: Oct 25, 2020
|
Published on: May 21, 2021
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year

© 2021 Adrian Jaszczak, published by University of Białystok
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 License.