Cargando…
Recursive Data Structures in SPARK
SPARK is both a deductive verification tool for the Ada language and the subset of Ada on which it operates. In this paper, we present a recent extension of the SPARK language and toolset to support pointers. This extension is based on an ownership policy inspired by Rust to enforce non-aliasing thr...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7363197/ http://dx.doi.org/10.1007/978-3-030-53291-8_11 |
_version_ | 1783559621903908864 |
---|---|
author | Dross, Claire Kanig, Johannes |
author_facet | Dross, Claire Kanig, Johannes |
author_sort | Dross, Claire |
collection | PubMed |
description | SPARK is both a deductive verification tool for the Ada language and the subset of Ada on which it operates. In this paper, we present a recent extension of the SPARK language and toolset to support pointers. This extension is based on an ownership policy inspired by Rust to enforce non-aliasing through a move semantics of assignment. In particular, we consider pointer-based recursive data structures, and discuss how they are supported in SPARK. We explain how iteration over these structures can be handled using a restricted form of aliasing called local borrowing. To avoid introducing a memory model and to stay in the first-order logic background of SPARK, the relation between the iterator and the underlying structure is encoded as a predicate which is maintained throughout the program control flow. Special first-order contracts, called pledges, can be used to describe this relation. Finally, we give examples of programs that can be verified using this framework. |
format | Online Article Text |
id | pubmed-7363197 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-73631972020-07-16 Recursive Data Structures in SPARK Dross, Claire Kanig, Johannes Computer Aided Verification Article SPARK is both a deductive verification tool for the Ada language and the subset of Ada on which it operates. In this paper, we present a recent extension of the SPARK language and toolset to support pointers. This extension is based on an ownership policy inspired by Rust to enforce non-aliasing through a move semantics of assignment. In particular, we consider pointer-based recursive data structures, and discuss how they are supported in SPARK. We explain how iteration over these structures can be handled using a restricted form of aliasing called local borrowing. To avoid introducing a memory model and to stay in the first-order logic background of SPARK, the relation between the iterator and the underlying structure is encoded as a predicate which is maintained throughout the program control flow. Special first-order contracts, called pledges, can be used to describe this relation. Finally, we give examples of programs that can be verified using this framework. 2020-06-16 /pmc/articles/PMC7363197/ http://dx.doi.org/10.1007/978-3-030-53291-8_11 Text en © The Author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as 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. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. |
spellingShingle | Article Dross, Claire Kanig, Johannes Recursive Data Structures in SPARK |
title | Recursive Data Structures in SPARK |
title_full | Recursive Data Structures in SPARK |
title_fullStr | Recursive Data Structures in SPARK |
title_full_unstemmed | Recursive Data Structures in SPARK |
title_short | Recursive Data Structures in SPARK |
title_sort | recursive data structures in spark |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7363197/ http://dx.doi.org/10.1007/978-3-030-53291-8_11 |
work_keys_str_mv | AT drossclaire recursivedatastructuresinspark AT kanigjohannes recursivedatastructuresinspark |