Data Refinement with Low-Level Pointer Operations

  • Ivana Mijajlović
  • Hongseok Yang
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3780)


We present a method for proving data refinement in the presence of low-level pointer operations, such as memory allocation and deallocation, and pointer arithmetic. Surprisingly, none of the existing methods for data refinement, including those specifically designed for pointers, are sound in the presence of low-level pointer operations. The reason is that the low-level pointer operations allow an additional potential for obtaining the information about the implementation details of the module: using memory allocation and pointer comparison, a client of a module can find out which cells are internally used by the module, even without dereferencing any pointers. The unsoundness of the existing methods comes from the failure of handling this potential. In the paper, we propose a novel method for proving data refinement, called power simulation, and show that power simulation is sound even with low-level pointer operations.


Power Relation Free Cell Memory Allocation Admissibility Condition Forward Simulation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Banerjee, A., Naumann, D.A.: Representation independence, confinement and access control (extended abstract). In: POPL 2002, pp. 166–177. ACM, New York (2002)CrossRefGoogle Scholar
  2. 2.
    Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: POPL 2003, pp. 213–223. ACM, New York (2003)CrossRefGoogle Scholar
  3. 3.
    Clarke, D.G., Noble, J., Potter, J.M.: Simple ownership types for object containment. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 53–76. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  4. 4.
    de Roever, W.-P., Engelhardt, K.: Data Refinement: Model-Oriented Proof Methods and their Comparison. Cambridge Tracts in Theoretical Computer Science, vol. 47. Cambridge University Press, Cambridge (1998)zbMATHCrossRefGoogle Scholar
  5. 5.
    Dijkstra, E.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)zbMATHGoogle Scholar
  6. 6.
    He, J., Hoare, C.A.R., Sanders, J.W.: Data refinement refined. In: Robinet, B., Wilhelm, R. (eds.) ESOP 1986. LNCS, vol. 213, pp. 187–196. Springer, Heidelberg (1986)Google Scholar
  7. 7.
    Hoare, C.A.R.: Proof of correctness of data representations. Acta Informatica 1, 271–281 (1972)zbMATHCrossRefGoogle Scholar
  8. 8.
    Hogg, J.: Islands: Aliasing protection in object-oriented languages. In: OOPLA 1991, pp. 271–285. ACM Press, New York (1991)Google Scholar
  9. 9.
    Hogg, J., Lea, D., Wills, A., de Champeaux, D., Holt, R.: The geneva convention on the treatment of object aliasing. OOPS Messenger 3(2), 11–16 (1992)CrossRefGoogle Scholar
  10. 10.
    Istiaq, S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: POPL 2001, pp. 14–26. ACM Press, London (2001)CrossRefGoogle Scholar
  11. 11.
    Leino, K.R.M., Nelson, G.: Data abstraction and information hiding. ACM Trans. on Program. Lang. and Syst. 24(5), 491–553 (2002)CrossRefGoogle Scholar
  12. 12.
    Mijajlović, I., Torp-Smith, N., O’Hearn, P.W.: Refinement and separation contexts. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 421–433. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Mijajlovic, I., Yang, H.: Data refinement with low-level pointer operations. Manuscript (2005), Available at
  14. 14.
    Naumann, D., Barnett, M.: Towards imperative modules: Reasoning about invariants and sharing of mutable state. In: LICS 2004, pp. 313–323. IEEE, Los Alamitos (2004)Google Scholar
  15. 15.
    O’Hearn, P.W., Yang, H., Reynolds, J.C.: Separation and information hiding. In: POPL 2004, pp. 268–280. ACM, Venice (2004)CrossRefGoogle Scholar
  16. 16.
    Reddy, U.S.: Talk at MFPS 2000. Hokoken, New Jersey (2000)Google Scholar
  17. 17.
    Reddy, U.S., Yang, H.: Correctness of data representations involving heap data structures. Science of Computer Programming 50(1), 257–305 (2004)CrossRefMathSciNetGoogle Scholar
  18. 18.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS 2002, vol. 17, pp. 55–74. IEEE, Copenhagen (2002)Google Scholar
  19. 19.
    Stark, I.: Categorical models for local names. Lisp and Symbolic Comput. 9(1), 77–107 (1996)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Ivana Mijajlović
    • 1
  • Hongseok Yang
    • 2
  1. 1.Queen MaryUniversity of LondonUK
  2. 2.ERC-ACISeoul National UniversitySouth Korea

Personalised recommendations