Abstract
Separation Logic is a widely-used tool that allows for local reasoning about imperative programs with pointers. A straightforward definition of this ”local reasoning” is that, whenever a program runs safely on some state, adding more state would have no effect on the program’s behavior. However, for a mix of technical and historical reasons, local reasoning is defined in a more subtle way, allowing a program to lose some behaviors when extra state is added. In this paper, we propose strengthening local reasoning to match the straightforward definition mentioned above. We argue that such a strengthening does not have any negative effect on the usability of Separation Logic, and we present four examples that illustrate how this strengthening simplifies some of the metatheoretical reasoning regarding Separation Logic. In one example, our change even results in a more powerful metatheory.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Appel, A.W., Blazy, S.: Separation Logic for Small-Step Cminor. In: Schneider, K., Brandt, J. (eds.) TPHOLs 2007. LNCS, vol. 4732, pp. 5–21. Springer, Heidelberg (2007)
Birkedal, L., Torp-Smith, N., Yang, H.: Semantics of separation-logic typing and higher-order frame rules. In: Proc. 20th IEEE Symp. on Logic in Computer Science, pp. 260–269 (2005)
Brookes, S.: A Semantics for Concurrent Separation Logic. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 16–34. Springer, Heidelberg (2004)
Calcagno, C., O’Hearn, P.W., Yang, H.: Local action and abstract separation logic. In: 22nd Annual IEEE Symposium on Logic in Computer Science, LICS 2007, pp. 366–378 (July 2007)
Costanzo, D., Shao, Z.: A case for behavior-preserving actions in separation logic. Technical report, Dept. of Computer Science, Yale University, New Haven, CT (June 2012), http://flint.cs.yale.edu/publications/bpsl.html
Filipovic, I., O’Hearn, P.W., Torp-Smith, N., Yang, H.: Blaming the client: on data refinement in the presence of pointers. Formal Asp. Comput. 22(5), 547–583 (2010)
Huet, G., Paulin-Mohring, C., et al.: The Coq proof assistant reference manual. The Coq release v6.3.1 (May 2000)
Ishtiaq, S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: Proc. 28th ACM Symposium on Principles of Programming Languages, pp. 14–26 (January 2001)
Kernighan, B.W., Ritchie, D.M.: The C Programming Language, 2nd edn. Prentice Hall (1988)
O’Hearn, P.W.: Resources, Concurrency and Local Reasoning. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 49–67. Springer, Heidelberg (2004)
O’Hearn, P.W., Yang, H., Reynolds, J.C.: Separation and information hiding. ACM Trans. Program. Lang. Syst. 31(3), 1–50 (2009)
Raza, M., Gardner, P.: Footprints in local reasoning. Journal of Logical Methods in Computer Science 5(2) (2009)
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. 17th IEEE Symp. on Logic in Computer Science, pp. 55–74 (July 2002)
Yang, H.: Relational separation logic. Theor. Comput. Sci. 375(1-3), 308–334 (2007)
Yang, H., O’Hearn, P.W.: A Semantic Basis for Local Reasoning. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 402–416. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Costanzo, D., Shao, Z. (2012). A Case for Behavior-Preserving Actions in Separation Logic. In: Jhala, R., Igarashi, A. (eds) Programming Languages and Systems. APLAS 2012. Lecture Notes in Computer Science, vol 7705. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35182-2_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-35182-2_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-35181-5
Online ISBN: 978-3-642-35182-2
eBook Packages: Computer ScienceComputer Science (R0)