skip to main content
article

Containers for Specification in SPARK

Published:05 April 2023Publication History
Skip Abstract Section

Abstract

The SPARK tool analyzes Ada programs statically. It can be used to verify both that a program is free from runtime exceptions and that it conforms to a specification expressed through contracts. To facilitate dynamic analysis, Ada contracts are regular expressions which can be evaluated at execution. As a result, the annotation language of the SPARK tool is restricted to executable constructs. In this context, high-level concepts necessary for specification by contracts need to be supplied as libraries. For example, the latest version of the Ada language introduces unbounded integers and rational numbers to the standard library. In this article, we present the functional containers library which provides collections suitable for use in specification. We explain how they can be used to specify and verify complex programs through concrete examples that have been developed over many years.

References

  1. M Anthony Aiello, Claire Dross, Patrick Rogers, Laura Humphrey, and James Hamil. 2019. Practical application of SPARK to OpenUxAS. In International Symposium on Formal Methods. Springer, 751--761.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. John Backes, Pauline Bolignano, Byron Cook, Andrew Gacek, Kasper Soe Luckow, Neha Rungta, Martin Schaef, Cole Schlesinger, Rima Tanash, Carsten Varming, et al. 2019. One-click formal methods. IEEE Software 36, 6 (2019), 61--65.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Kshitij Bansal, Andrew Reynolds, Clark Barrett, and Cesare Tinelli. 2016. A new decision procedure for finite sets and cardinality constraints in SMT. In International Joint Conference on Automated Reasoning. Springer, 82--98.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. John Barnes. 2012. SPARK: The Proven Approach to High Integrity Software. Altran Praxis.Google ScholarGoogle Scholar
  5. Allan Blanchard, Nikolai Kosmatov, and Frédéric Loulergue. 2018. Ghosts for lists: a critical module of Contiki verified in Frama-C. In NASA Formal Methods Symposium. Springer, 37--53.Google ScholarGoogle ScholarCross RefCross Ref
  6. Martin Clochard. 2014. Automatically verified implementation of data structures based on AVL trees. In Working Conference on Verified Software: Theories, Tools, and Experiments. Springer, 167--180.Google ScholarGoogle ScholarCross RefCross Ref
  7. Claire Dross, Jean-Christophe Filliâtre, and Yannick Moy. 2011. Correct code containing containers. In International Conference on Tests and Proofs. Springer, 102--118.Google ScholarGoogle ScholarCross RefCross Ref
  8. Claire Dross and Johannes Kanig. 2020. Recursive data structures in SPARK. In International Conference on Computer Aided Verification. Springer, 178--189.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Claire Dross and Johannes Kanig. 2021. Making Proofs of Floating- Point Programs Accessible to Regular Developers. In Software Verification. Springer, 7--24.Google ScholarGoogle Scholar
  10. Claire Dross and Yannick Moy. 2016. Abstract software specifications and automatic proof of refinement. In International Conference on Reliability, Safety, and Security of Railway Systems. Springer, 215--230.Google ScholarGoogle ScholarCross RefCross Ref
  11. Claire Dross and Yannick Moy. 2017. Auto-active proof of red-black trees in SPARK. In NASA Formal Methods Symposium. Springer, 68--83.Google ScholarGoogle ScholarCross RefCross Ref
  12. Jean-Christophe Filliâtre and Andrei Paskevich. 2013. Why3-where programs meet provers. In European symposium on programming. Springer, 125--128.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Richard L Ford and K Rustan M Leino. 2017. Dafny Reference Manual.Google ScholarGoogle Scholar
  14. Peter W O'Hearn. 2018. Continuous reasoning: Scaling the impact of formal methods. In Proceedings of the 33rd annual ACM/IEEE symposium on logic in computer science. 13--25.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Nadia Polikarpova, Julian Tschannen, and Carlo A. Furia. 2015. A fully verified container library. In International Symposium on Formal Methods. Springer, 414--434.Google ScholarGoogle Scholar
  16. Ying Sheng, Andres Nötzli, Andrew Reynolds, Yoni Zohar, David Dill, Wolfgang Grieskamp, Junkil Park, Shaz Qadeer, Clark Barrett, and Cesare Tinelli. 2022. Reasoning About Vectors using an SMT Theory of Sequences. arXiv preprint arXiv:2205.08095 (2022).Google ScholarGoogle Scholar
  17. The Why3 Development Team. 2022. Why3 Documentation. https: //why3.lri.fr/manual.pdfGoogle ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGAda Ada Letters
    ACM SIGAda Ada Letters  Volume 42, Issue 2
    December 2022
    87 pages
    ISSN:1094-3641
    DOI:10.1145/3591335
    Issue’s Table of Contents

    Copyright © 2023 Copyright is held by the owner/author(s)

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 5 April 2023

    Check for updates

    Qualifiers

    • article
  • Article Metrics

    • Downloads (Last 12 months)8
    • Downloads (Last 6 weeks)2

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!