Back to Search
Start Over
Witnessing the elimination of magic wands
- Source :
- International journal on software tools for technology transfer, 17(6), 757-781. Springer, International Journal on Software Tools for Technology Transfer
- Publication Year :
- 2015
-
Abstract
- This paper discusses static verification of programs that have been specified using separation logic with magic wands. Magic wands are used to specify incomplete resources in separation logic, i.e., if missing resources are provided, a magic wand allows one to exchange these for the completed resources. One of the applications of the magic wand operator is to describe loop invariants for algorithms that traverse a data structure, such as the imperative version of the tree delete problem (Challenge 3 from the VerifyThis@FM2012 Program Verification Competition), which is the motivating example for our work. Most separation logic-based static verification tools do not provide support for magic wands, possibly because validity of formulas containing the magic wand is, by itself, undecidable. To avoid this problem, in our approach the program annotator has to provide a witness for the magic wand, thus circumventing undecidability due to the use of magic wands. A witness is an object that encodes both instructions for the permission exchange that is specified by the magic wand and the extra resources needed during that exchange. We show how this witness information is used to encode a specification with magic wands as a specification without magic wands. Concretely, this approach is used in the VerCors tool set: annotated Java programs are encoded as Chalice programs. Chalice then further translates the program to BoogiePL, where appropriate proof obligations are generated. Besides our encoding of magic wands, we also discuss the encoding of other aspects of annotated Java programs into Chalice, and in particular, the encoding of abstract predicates with permission parameters. We illustrate our approach on the tree delete algorithm, and on the verification of an iterator of a linked list.
- Subjects :
- Loop invariant
Iterator
Theoretical computer science
Mechanical verification
Computer science
Separation Logic
EWI-26512
METIS-315064
0102 computer and information sciences
02 engineering and technology
Separation logic
Permission
computer.software_genre
01 natural sciences
GeneralLiterature_MISCELLANEOUS
program verificationseparation logicmagic wand
0202 electrical engineering, electronic engineering, information engineering
IR-98397
Program Verification
Programming language
Formal methods
Magic (programming)
020207 software engineering
Linked list
Data structure
Specification techniques
TheoryofComputation_MATHEMATICALLOGICANDFORMALLANGUAGES
010201 computation theory & mathematics
TheoryofComputation_LOGICSANDMEANINGSOFPROGRAMS
VerifyThis 2012
magic wand
computer
Correctness proofs
Software
Information Systems
Subjects
Details
- ISSN :
- 14332779
- Volume :
- 17
- Issue :
- 6
- Database :
- OpenAIRE
- Journal :
- International journal on software tools for technology transfer
- Accession number :
- edsair.doi.dedup.....fc0f11a499c3e1121989e47068eb2dd9
- Full Text :
- https://doi.org/10.1007/s10009-015-0372-3