Abstract
Separation Logic (SL) provides a simple but powerful technique for reasoning about imperative programs that use shared data structures. Unfortunately, SL supports only “strong updates”, in which mutation to a heap location is safe only if a unique reference is owned. This limits the applicability of SL when reasoning about the interaction between many high-level languages (e.g., ML, Java, C#) and low-level ones since these high-level languages do not support strong updates. Instead, they adopt the discipline of “weak updates”, in which there is a global “heap type” to enforce the invariant of type-preserving heap updates. We present SLw, a logic that extends SL with reference types and elegantly reasons about the interaction between strong and weak updates. We also describe a semantic framework for reference types; this framework is used to prove the soundness of SLw.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ahmed, A.J.: Semantics of Types for Mutable State. PhD thesis, Princeton University (2004)
Appel, A.W., McAllester, D.: An indexed model of recursive types for foundational proof-carrying code. ACM Trans. on Prog. Lang. and Sys. 23(5), 657–683 (2001)
Appel, A.W., Mellies, P.-A., Richards, C.D., Vouillon, J.: A very modal model of a modern, major, general type system. In: POPL 2007, pp. 109–122. ACM Press, New York (2007)
Furr, M., Foster, J.S.: Checking type safety of foreign function calls. ACM Trans. Program. Lang. Syst. 30(4), 1–63 (2008)
Harper, R.: A simplified account of polymorphic references. Information Processing Letters 57(1), 15–16 (1996)
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 578–580 (1969)
Honda, K., Yoshida, N., Berger, M.: An observationally complete program logic for imperative higher-order frame rules. In: LICS 2005, June 2005, pp. 270–279 (2005)
Krishnaswami, N., Birkedal, L., Aldrich, J., Reynolds, J.: Idealized ML and its separation logic (July 2007)
Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. In: Proc. 34th ACM Symp. on Principles of Prog. Lang., pp. 3–10 (2007)
O’Hearn, P.W., Reynolds, J.C., Yang, H.: Local reasoning about programs that alter data structures. In: Fribourg, L. (ed.) CSL 2001. LNCS, vol. 2142, pp. 1–19. Springer, Heidelberg (2001)
Parkinson, M.: Local reasoning for Java. PhD thesis, University of Cambridge Computer Laboratory, Oxford. Tech Report UCAM-CL-TR-654 (November 2005)
Reus, B., Schwinghammer, J.: Separation logic for higher-order store. In: Ésik, Z. (ed.) CSL 2006. LNCS, vol. 4207, pp. 575–590. Springer, Heidelberg (2006)
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. LICS 2002, July 2002, pp. 55–74 (2002)
Tan, G., Croft, J.: An empirical security study of the native code in the JDK. In: 17th Usenix Security Symposium, pp. 365–377 (2008)
Tan, G., Shao, Z., Feng, X., Cai, H.: Weak updates and separation logic (June 2009), http://www.cse.lehigh.edu/~gtan/paper/WUSL-tr.pdf
Tofte, M.: Type inference for polymorphic references. Inf. and Comp. 89(1), 1–34 (1990)
Tofte, M., Talpin, J.-P.: Region-based memory management. Information and Computation 132(2), 109–176 (1997)
Trifonov, V., Shao, Z.: Safe and principled language interoperation. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 128–146. Springer, Heidelberg (1999)
Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. Information and Computation 115(1), 38–94 (1994)
Yoshida, N., Honda, K., Berge, M.: Logical reasoning for higher-order functions with local state. In: Seidl, H. (ed.) FOSSACS 2007. LNCS, vol. 4423, pp. 361–377. Springer, Heidelberg (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Tan, G., Shao, Z., Feng, X., Cai, H. (2009). Weak updates and separation logic. In: Hu, Z. (eds) Programming Languages and Systems. APLAS 2009. Lecture Notes in Computer Science, vol 5904. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-10672-9_14
Download citation
DOI: https://doi.org/10.1007/978-3-642-10672-9_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-10671-2
Online ISBN: 978-3-642-10672-9
eBook Packages: Computer ScienceComputer Science (R0)