A Generic Approach to the Verification of the Permutation Property of Sequential and Parallel Swap-Based Sorting Algorithms

被引:7
作者
Safari, Mohsen [1 ]
Huisman, Marieke [1 ]
机构
[1] Univ Twente, Formal Methods & Tools, Enschede, Netherlands
来源
INTEGRATED FORMAL METHODS, IFM 2020 | 2020年 / 12546卷
关键词
Sorting algorithms; Deductive verification; Separation logic;
D O I
10.1007/978-3-030-63461-2_14
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Sorting is one of the fundamental operations in computer science, and many sequential and parallel algorithms have been proposed in the literature. Swap-based sorting algorithms are one category of sorting algorithms where elements are swapped repeatedly to achieve the desired order. Since these algorithms are widely used in practice, their (functional) correctness, i.e., proving sortedness and permutation properties, is of utmost importance. However, proving the permutation property using automated program verifiers is much more challenging as the formal definition of this property involves existential quantifiers. In this paper, we propose a generic pattern to verify the permutation property for any sequential and parallel swap-based sorting algorithm automatically. To demonstrate our approach, we use VerCors, a verification tool based on separation logic for concurrent and parallel programs, to verify the permutation property of bubble sort, selection sort, insertion sort, parallel odd-even transposition sort, quick sort, two in-place merge sorts and TimSort for any arbitrary size of input.
引用
收藏
页码:257 / 275
页数:19
相关论文
共 25 条
  • [1] Ahrendt W, 2016, LECT NOTES COMPUT SC, V10001, P495, DOI 10.1007/978-3-319-49812-6_15
  • [2] PERMISSION-BASED SEPARATION LOGIC FOR MULTITHREADED JAVA']JAVA PROGRAMS
    Amighi, Afshin
    Haack, Citristian
    Huisman, Marieke
    Hurlin, Clement
    [J]. LOGICAL METHODS IN COMPUTER SCIENCE, 2015, 11 (01)
  • [3] [Anonymous], COQ PROOF ASSISTANT
  • [4] Proving JDK's Dual Pivot Quicksort Correct
    Beckert, Bernhard
    Schiffl, Jonas
    Schmitt, Peter H.
    Ulbrich, Mattias
    [J]. VERIFIED SOFTWARE: THEORIES, TOOLS, AND EXPERIMENTS (VSTTE 2017), 2017, 10712 : 35 - 48
  • [5] Blom Stefan, 2017, Integrated Formal Methods. 13th International Conference, IFM 2017. Proceedings: LNCS 10510, P102, DOI 10.1007/978-3-319-66845-1_7
  • [6] Permission accounting in separation logic
    Bornat, R
    Calcagno, C
    O'Hearn, P
    Parkinson, M
    [J]. ACM SIGPLAN NOTICES, 2005, 40 (01) : 259 - 270
  • [7] Boyland J., 2003, LNCS, V2694, P55, DOI [10.1007/3-540-44898-54, DOI 10.1007/3-540-44898-54]
  • [8] OpenJDK's Java']Java.utils.Collection.sort() Is Broken: The Good, the Bad and the Worst Case
    de Gouw, Stijn
    Rot, Jurriaan
    de Boer, Frank S.
    Bubel, Richard
    Haehnle, Reiner
    [J]. COMPUTER AIDED VERIFICATION, PT I, 2015, 9206 : 273 - 289
  • [9] MERGING BY DECOMPOSITION REVISITED
    DVORAK, S
    DURIAN, B
    [J]. COMPUTER JOURNAL, 1988, 31 (06) : 553 - 556
  • [10] Filli^atre J.C., 1999, TPHOLS