Cargando…
Verifying OpenJDK’s Sort Method for Generic Collections
TimSort is the main sorting algorithm provided by the Java standard library and many other programming frameworks. Our original goal was functional verification of TimSort with mechanical proofs. However, during our verification attempt we discovered a bug which causes the implementation to crash by...
Autores principales: | , , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Springer Netherlands
2017
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6404383/ https://www.ncbi.nlm.nih.gov/pubmed/30930511 http://dx.doi.org/10.1007/s10817-017-9426-4 |
_version_ | 1783400871922499584 |
---|---|
author | de Gouw, Stijn de Boer, Frank S. Bubel, Richard Hähnle, Reiner Rot, Jurriaan Steinhöfel, Dominic |
author_facet | de Gouw, Stijn de Boer, Frank S. Bubel, Richard Hähnle, Reiner Rot, Jurriaan Steinhöfel, Dominic |
author_sort | de Gouw, Stijn |
collection | PubMed |
description | TimSort is the main sorting algorithm provided by the Java standard library and many other programming frameworks. Our original goal was functional verification of TimSort with mechanical proofs. However, during our verification attempt we discovered a bug which causes the implementation to crash by an uncaught exception. In this paper, we identify conditions under which the bug occurs, and from this we derive a bug-free version that does not compromise performance. We formally specify the new version and verify termination and the absence of exceptions including the bug. This verification is carried out mechanically with KeY, a state-of-the-art interactive verification tool for Java. We provide a detailed description and analysis of the proofs. The complexity of the proofs required extensions and new capabilities in KeY, including symbolic state merging. |
format | Online Article Text |
id | pubmed-6404383 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2017 |
publisher | Springer Netherlands |
record_format | MEDLINE/PubMed |
spelling | pubmed-64043832019-03-27 Verifying OpenJDK’s Sort Method for Generic Collections de Gouw, Stijn de Boer, Frank S. Bubel, Richard Hähnle, Reiner Rot, Jurriaan Steinhöfel, Dominic J Autom Reason Article TimSort is the main sorting algorithm provided by the Java standard library and many other programming frameworks. Our original goal was functional verification of TimSort with mechanical proofs. However, during our verification attempt we discovered a bug which causes the implementation to crash by an uncaught exception. In this paper, we identify conditions under which the bug occurs, and from this we derive a bug-free version that does not compromise performance. We formally specify the new version and verify termination and the absence of exceptions including the bug. This verification is carried out mechanically with KeY, a state-of-the-art interactive verification tool for Java. We provide a detailed description and analysis of the proofs. The complexity of the proofs required extensions and new capabilities in KeY, including symbolic state merging. Springer Netherlands 2017-08-31 2019 /pmc/articles/PMC6404383/ /pubmed/30930511 http://dx.doi.org/10.1007/s10817-017-9426-4 Text en © The Author(s) 2017 Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. |
spellingShingle | Article de Gouw, Stijn de Boer, Frank S. Bubel, Richard Hähnle, Reiner Rot, Jurriaan Steinhöfel, Dominic Verifying OpenJDK’s Sort Method for Generic Collections |
title | Verifying OpenJDK’s Sort Method for Generic Collections |
title_full | Verifying OpenJDK’s Sort Method for Generic Collections |
title_fullStr | Verifying OpenJDK’s Sort Method for Generic Collections |
title_full_unstemmed | Verifying OpenJDK’s Sort Method for Generic Collections |
title_short | Verifying OpenJDK’s Sort Method for Generic Collections |
title_sort | verifying openjdk’s sort method for generic collections |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6404383/ https://www.ncbi.nlm.nih.gov/pubmed/30930511 http://dx.doi.org/10.1007/s10817-017-9426-4 |
work_keys_str_mv | AT degouwstijn verifyingopenjdkssortmethodforgenericcollections AT deboerfranks verifyingopenjdkssortmethodforgenericcollections AT bubelrichard verifyingopenjdkssortmethodforgenericcollections AT hahnlereiner verifyingopenjdkssortmethodforgenericcollections AT rotjurriaan verifyingopenjdkssortmethodforgenericcollections AT steinhofeldominic verifyingopenjdkssortmethodforgenericcollections |