Formal engineering of the bitonic sort using PVS

Raphaël Couturier
1998 unpublished
In this paper, we present a proof that the bitonic sort is sound using PVS, a powerful specification and verification environment. First, we briefly introduce this well-known parallel sort. It is based on bitonic lists whose relevant properties can be proven with PVS. To achieve our goal of constructing the proof from scratch, we start by studying some examples of this sort. Then we try to prove properties of this algorithm. Failure in the proof of particular lemmas provides us with information
more » ... which helps to correct these lemmas. To complete this proof, we start with general cases, continue by examining each of the exception cases, and finish when all cases have been considered. Then we can construct the specification of the bitonic sort which can easily be translated into a traditional imperative language. Formal engineering of the bitonic sort using PVS Definition 2.1 A bitonic list is either: an increasing sequence followed by a decreasing sequence, or an increasing sequence, or a decreasing sequence, or a left circular permutation of one of the three previous cases of ¾ Ô numbers (Ô ¼) Note that the most frequent case is the first one (we shall call such a list general bitonic). Definition 2.2 A bitonic merge consists of merging two bitonic lists of ¾ Ô ½ numbers (more precisely, in the general case, the first list is increasing whereas the second one is decreasing) in order to have a bitonic list of ¾ Ô numbers. Example 2.2 A bitonic merge, as defined later, applied on the lists (3, 7, 9, 15, 18, 22) and (36, 32, 27, 25, 17, 6) produces the list (3, 7, 9, 15, 17, 6, 36, 32, 27, 25, 18, 22). (3, 7, 9, 15, 18, 22, 36, 32, 27, 25, 17, 6) produces the list (3, 7, 9, 15, 18, 22) and the list (36, 32, 27, 25, 17, 6) . Definition 2.3 A bitonic split consists of splitting a bitonic list of ¾ Ô numbers into two bitonic lists of ¾ Ô ½ numbers (Ô ¼). Example 2.3 A bitonic split, as defined later, applied on the list Definition 2.4 The bitonic sort takes a sequence of numbers and makes bitonic lists with these numbers. The size of the bitonic sequences grows step by step until we obtain one sorted sequence.
doi:10.14236/ewic/fm1998.2 fatcat:6k2v32drznhkbksailszpbuz5q