Abstract
Besides functional correctness, specifications must describe other properties of permissible implementations. We want to use simple algebraic techniques to specify resource usage alongside functional behaviour. In this paper we examine the space behaviour of datatypes, which depends on the representation of values in memory. In particular, it varies according to how much values are allowed to overlap, and how much they must be kept apart to ensure correctness for destructive space-reusing operations.
We introduce a mechanism for specifying datatypes represented in a memory, with operations that may be destructive to varying degrees. We start from an abstract model notion for data-in-memory and then show how to specify the observable behaviour of models. The method is demonstrated by specifications of lists-in-memory and pointers; with a suitable definition of implementation, we show that lists-in-memory may be implemented by pointers. We then present a method for proving implementations correct and show that it is sound and, under certain assumptions, complete.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Reynolds, J.: Separation logic: A logic for shared mutable data structures. In: LICS 2002, pp. 55–74 (2002)
Honda, K., Yoshida, N., Berger, M.: An observationally complete program logic for imperative higher-order frame rules. LICS 2005, pp. 270–279 (2005)
Aspinall, D., Beringer, L., Hofmann, M., Loidl, H.W., Momigliano, A.: A program logic for resources. Theoretical Computer Science (accepted, 2007)
Petersen, L., Harper, R., Crary, K., Pfenning, F.: A type theory for memory allocation and data layout. POPL 2003, pp. 172–184 (2003)
Benton, N., Kennedy, A., Hofmann, M., Beringer, L.: Reading, writing and relations. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 114–130. Springer, Heidelberg (2006)
Pym, D., O’Hearn, P., Yang, H.: Possible worlds and resources: The semantics of BI. Theoretical Computer Science 315(1), 257–305 (2004)
Jacobs, B., Poll, E.: Coalgebras and monads in the semantics of Java. TCS 291(3), 329–349 (2003)
Schröder, L., Mossakowski, T.: Monad-independent dynamic logic in HasCasl. J. Log. Comput. 14(4), 571–619 (2004)
Calcagno, C., O’Hearn, P., Bornat, R.: Program logic and equivalence in the presence of garbage collection. TCS 298(3), 557–581 (2003)
Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: POPL 2004, pp. 14–25 (2004)
Goguen, J., Malcolm, G.: A hidden agenda. TCS 245(1), 55–101 (2000)
Baumeister, H., Zamulin, A.: State-based extension of CASL. In: Grieskamp, W., Santen, T., Stoddart, B. (eds.) IFM 2000. LNCS, vol. 1945, pp. 3–24. Springer, Heidelberg (2000)
Hennicker, R., Bidoit, M.: Observational logic. In: Haeberer, A.M. (ed.) AMAST 1998. LNCS, vol. 1548, pp. 263–277. Springer, Heidelberg (1999)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Aspinall, D., Hoffman, P. (2007). Datatypes in Memory. In: Mossakowski, T., Montanari, U., Haveraaen, M. (eds) Algebra and Coalgebra in Computer Science. CALCO 2007. Lecture Notes in Computer Science, vol 4624. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-73859-6_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-73859-6_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-73857-2
Online ISBN: 978-3-540-73859-6
eBook Packages: Computer ScienceComputer Science (R0)