Mutation in Linked Data Structures
Separation logic was developed as an extension to Hoare logic with the aim of simplifying pointer program proofs. A key feature of the logic is that it focuses the reasoning effort on only those parts of the heap that are relevant to a program - so called local reasoning. Underpinning this local reasoning are the separating conjunction and separating implication operators. Here we present an automated reasoning technique called mutation that provides guidance for separation logic proofs. Specifically, given two heap structures specified within separation logic, mutation attempts to construct an equivalence proof using a difference reduction strategy. Pivotal to this strategy is a generalised decomposition operator which is essential when matching heap structures. We show how mutation provides an effective strategy for proving the functional correctness of iterative and recursive programs within the context of weakest precondition analysis. Currently, mutation is implemented as a proof plan within our CORE program verification system. CORE combines results from shape analysis with our work on invariant generation and proof planning. We present our results for mutation within the context of the CORE system.
KeywordsCore System Separation Logic Functional Correctness Recursive Program Loop Invariant
Unable to display preview. Download preview PDF.
- 1.Atkey, R.: Amortised resource analysis with separation logic. In: 19th European Symposium on Programming, pp. 85–103 (2010)Google Scholar
- 6.Burstall, R.M.: Some techniques for proving correctness of programs. In: Machine Intelligence, vol. 7, pp. 23–50. Edinburgh University Press, Edinburgh (1972)Google Scholar
- 7.Distefano, D., Parkinson, M.J.: jstar: towards practical verification for java. In: Proceedings of the 23rd ACM SIGPLAN Conference on Object-Oriented Programming Systems Languages and Applications, OOPSLA 2008, pp. 213–226. ACM, New York (2008)Google Scholar
- 9.Ireland, A., Maclean, E., Grov, G.: Verification and synthesis of functional correctness of pointer programs. Research Memo HW-MACS-TR-0087, School of Mathematical and Computer Sciences, Heriot-Watt University (2011)Google Scholar
- 10.Maclean, E., Ireland, A., Grov, G.: The core system: Animation and functional correctness of pointer programs, Under review as a ASE-11 Tool Demonstration paper (2011)Google Scholar
- 14.Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Logic in Computer Science, pp. 55–74. IEEE Computer Society, Los Alamitos (2002)Google Scholar