Skip to main content

Datatypes in Memory

  • Conference paper
Algebra and Coalgebra in Computer Science (CALCO 2007)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4624))

Included in the following conference series:

  • 428 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Reynolds, J.: Separation logic: A logic for shared mutable data structures. In: LICS 2002, pp. 55–74 (2002)

    Google Scholar 

  2. Honda, K., Yoshida, N., Berger, M.: An observationally complete program logic for imperative higher-order frame rules. LICS 2005, pp. 270–279 (2005)

    Google Scholar 

  3. Aspinall, D., Beringer, L., Hofmann, M., Loidl, H.W., Momigliano, A.: A program logic for resources. Theoretical Computer Science (accepted, 2007)

    Google Scholar 

  4. Petersen, L., Harper, R., Crary, K., Pfenning, F.: A type theory for memory allocation and data layout. POPL 2003, pp. 172–184 (2003)

    Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Pym, D., O’Hearn, P., Yang, H.: Possible worlds and resources: The semantics of BI. Theoretical Computer Science 315(1), 257–305 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  7. Jacobs, B., Poll, E.: Coalgebras and monads in the semantics of Java. TCS 291(3), 329–349 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  8. Schröder, L., Mossakowski, T.: Monad-independent dynamic logic in HasCasl. J. Log. Comput. 14(4), 571–619 (2004)

    Article  MATH  Google Scholar 

  9. Calcagno, C., O’Hearn, P., Bornat, R.: Program logic and equivalence in the presence of garbage collection. TCS 298(3), 557–581 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  10. Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: POPL 2004, pp. 14–25 (2004)

    Google Scholar 

  11. Goguen, J., Malcolm, G.: A hidden agenda. TCS 245(1), 55–101 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  12. 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)

    Google Scholar 

  13. Hennicker, R., Bidoit, M.: Observational logic. In: Haeberer, A.M. (ed.) AMAST 1998. LNCS, vol. 1548, pp. 263–277. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Till Mossakowski Ugo Montanari Magne Haveraaen

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics