Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Banerjee, A., Naumann, D.A.: Representation independence, confinement and access control (extended abstract). In: POPL 2002, pp. 166–177. ACM, New York (2002)
Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: POPL 2003, pp. 213–223. ACM, New York (2003)
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)
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)
Dijkstra, E.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)
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)
Hoare, C.A.R.: Proof of correctness of data representations. Acta Informatica 1, 271–281 (1972)
Hogg, J.: Islands: Aliasing protection in object-oriented languages. In: OOPLA 1991, pp. 271–285. ACM Press, New York (1991)
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)
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)
Leino, K.R.M., Nelson, G.: Data abstraction and information hiding. ACM Trans. on Program. Lang. and Syst. 24(5), 491–553 (2002)
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)
Mijajlovic, I., Yang, H.: Data refinement with low-level pointer operations. Manuscript (2005), Available at http://ropas.snu.ac.kr/~hyang/paper/full-ps.ps
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)
O’Hearn, P.W., Yang, H., Reynolds, J.C.: Separation and information hiding. In: POPL 2004, pp. 268–280. ACM, Venice (2004)
Reddy, U.S.: Talk at MFPS 2000. Hokoken, New Jersey (2000)
Reddy, U.S., Yang, H.: Correctness of data representations involving heap data structures. Science of Computer Programming 50(1), 257–305 (2004)
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS 2002, vol. 17, pp. 55–74. IEEE, Copenhagen (2002)
Stark, I.: Categorical models for local names. Lisp and Symbolic Comput. 9(1), 77–107 (1996)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mijajlović, I., Yang, H. (2005). Data Refinement with Low-Level Pointer Operations. In: Yi, K. (eds) Programming Languages and Systems. APLAS 2005. Lecture Notes in Computer Science, vol 3780. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11575467_3
Download citation
DOI: https://doi.org/10.1007/11575467_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29735-2
Online ISBN: 978-3-540-32247-4
eBook Packages: Computer ScienceComputer Science (R0)