Separation Logic for Non-local Control Flow and Block Scope Variables
We present an approach for handling non-local control flow (goto and return statements) in the presence of allocation and deallocation of block scope variables in imperative programming languages.
We define a small step operational semantics and an axiomatic semantics (in the form of a separation logic) for a small C-like language that combines these two features, and which also supports pointers to block scope variables. Our operational semantics represents the program state through a generalization of Huet’s zipper data structure.
We prove soundness of our axiomatic semantics with respect to our operational semantics. This proof has been fully formalized in Coq.
KeywordsFormalin Nite Cond Cuted
- 1.Appel, A.W.: Tactics for Separation Logic (2006), http://www.cs.princeton.edu/~appel/papers/septacs.pdf
- 3.Chlipala, A.: Mostly-automated verification of low-level programs in computational separation logic. In: PLDI, pp. 234–245. ACM (2011)Google Scholar
- 5.Ellison, C., Rosu, G.: An executable formal semantics of C with applications. In: POPL, pp. 533–544 (2012)Google Scholar
- 8.International Organization for Standardization. ISO/IEC 9899-2011: Programming languages – C. ISO Working Group 14 (2012)Google Scholar
- 9.Knuth, D.: Structured programming with go to statements. In: Classics in software engineering, pp. 257–321. Yourdon Press (1979)Google Scholar
- 12.Leroy, X.: The CompCert verified compiler, software and commented proof (2012), http://compcert.inria.fr/
- 13.Norrish, M.: C formalised in HOL. PhD thesis, University of Cambridge (1998)Google Scholar
- 16.Parkinson, M.J., Bornat, R., Calcagno, C.: Variables as Resource in Hoare Logics. In: LICS, pp. 137–146 (2006)Google Scholar
- 18.Tews, H.: Verifying Duff’s device: A simple compositional denotational semantics for Goto and computed jumps (2004)Google Scholar