Correctness of Data Representations Involving Heap Data Structures
While the semantics of local variables in programming languages is by now well-understood, the semantics of pointer-addressed heap variables is still an outstanding issue. In particular, the commonly assumed relational reasoning principles for data representations have not been validated in a semantic model of heap variables. In this paper, we define a parametricity semantics for a Pascal-like language with pointers and heap variables which gives such reasoning principles. It is found that the correspondences between data representations are not simply relations between states, but more intricate correspondences that also need to keep track of visible locations whose pointers can be stored and leaked.
KeywordsInformation Hiding Information Leakage Procedure Call Visible Location Simulation Relation
- 1.Abramsky, S., Honda, K., and McCusker, G. A fully abstract game semantics for general references. In LICS 1998 (1998), pp. 334–344.Google Scholar
- 2.Banerjee, A., and Naumann, D. A. Representation independence, confinement and access control. In POPL 2002 (2002), ACM.Google Scholar
- 3.Dunphy, B. P. Parametricity as a Notion of Uniformity in Reflexive Graphs. PhD thesis, University of Illinois, Dep. of Mathematics, 2002.Google Scholar
- 4.Ghica, D. R. Semantics of dynamic variables in Algol-like languages. Master’s thesis, Queen’s University, Kingston, Canada, Mar 1997. (available electronically from ).Google Scholar
- 5.Ghica, D. R. Parameters and linked structures in algol-like languages. In Report of the Dagstuhl Seminar 98261: The Semantic Challenge of Object-oriented Programming (1998), Schloss Dagstuhl.Google Scholar
- 7.Levy, P. B. Call-by-Push-Value. PhD thesis, Queen Mary, University of London, March 2001.Google Scholar
- 8.Levy, P. B. Possible world semantics for general storage in call-by-value. In CSL 2002 (2002), pp. 232–246.Google Scholar
- 9.Meyer, A. R., and Sieber, K. Towards fully abstract semantics for local variables. In Fifteenth Ann. ACM Symp. on Princ. of Program. Lang. (1988), ACM, pp. 191–203. (Reprinted as Chapter 7 of ).Google Scholar
- 11.O’Hearn, P., Reynolds, J., and Yang, H. Local reasoning about programs that alter data structures. In CSL 2001 (Berlin, 2001), L. Fribourg, Ed., vol. 2142 of LNCS, Springer-Verlag, pp. 1–19.Google Scholar
- 13.O’Hearn, P. W., and Tennent, R. D. Semantics of local variables. In Applications of Categories in Computer Science, M. P. Fourman, P. T. Johnstone, and A. M. Pitts, Eds. Cambridge Univ. Press, 1992, pp. 217–238.Google Scholar
- 15.O’Hearn, P. W., and Tennent, R. D. Algol-like Languages (Two volumes). Birkhäuser, Boston, 1997.Google Scholar
- 16.Oles, F. J. A Category-Theoretic Approach to the Semantics of Programming Languages. PhD thesis, Syracuse University, 1982.Google Scholar
- 17.Reddy, U. S. When parametricity implies naturality. Electronic manuscript, July 1997. URL http://www.cs.bham.ac.uk/~udr.
- 18.Reddy, U. S. Objects and classes in Algol-like languages. In Fifth Intern. Workshop on Foundations of Object-oriented Languages (Jan 1998), electronic proceedings at http://pauillac.inria.fr/~remy/fool/proceedings.html.
- 20.Reynolds, J. C. Towards a theory of type structure. In Coll. sur la Programmation, vol. 19 of LNCS. Springer-Verlag, 1974, pp. 408–425.Google Scholar
- 21.Reynolds, J. C. The essence of Algol. In Algorithmic Languages, J. W. de Bakker and J. C. van Vliet, Eds. North-Holland, 1981, pp. 345–372. (Reprinted as Chapter 3 of ).Google Scholar
- 22.Reynolds, J. C. Intuitionistic reasoning about shared mutable data structure. In Millenial Perspectives in Computer Science. Palgrave, 2000.Google Scholar
- 23.Robinson, E., and Rosolini, G. Reflexive graphs and parametric polymorphism. In Proceedings, Ninth Annual IEEE Symposium on Logic in Computer Science (July 1994), IEEE Computer Society Press.Google Scholar
- 24.Stark, I. Names and higher-order functions. Technical Report 363, University of Cambridge Computer Laboratory, April 1995.Google Scholar
- 26.Tennent, R. D. Correctness of data representations in Algol-like languages. In A Classical Mind: Essays in Honor of C. A. R. Hoare, A. W. Roscoe, Ed. Prentice-Hall International, 1994, pp. 405–417.Google Scholar
- 28.Yang, H. Local reasoning for stateful programs. Tech. Rep. UIUCDCS-R-2001-2227, University of Illinois, Dep. of Computer Science, July 2001.Google Scholar