## Correctness of Data Representations involving Heap Data Structures (2003)

Venue: | Science of Computer Programming |

Citations: | 23 - 7 self |

### BibTeX

@INPROCEEDINGS{Reddy03correctnessof,

author = {Uday S. Reddy and Hongseok Yang},

title = {Correctness of Data Representations involving Heap Data Structures},

booktitle = {Science of Computer Programming},

year = {2003},

pages = {2004},

publisher = {Springer Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

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 de ne 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.

### Citations

385 |
Towards a theory of type structure
- Reynolds
- 1974
(Show Context)
Citation Context ...t A meth M end : exp (cls ) ` K : exp (cls ) ; x : ` C : com ` flocal K x; Cg : com Table 1. Type syntax of terms Notation We use convenient notation borrowed from the polymorphic lambda calculus [20] to denote polymorphic families. A family fP (X)gX is written as X (X) and, if is such a family, then component selection X is written as [X ]. 4 Semantics We consider a Pascal-like language with... |

310 |
Abstract types have existential types
- Mitchell, Plotkin
- 1988
(Show Context)
Citation Context ...n relations between successive pairs. The equivalence class of a pair hX; ai under the behavioral equivalence relation is denoted hjX; aji. These equivalence classes denote true \abstract data types&q=-=uot; [10, 19-=-]. { 9X F (X) is a quotient of P X F (X) where the allowed simulations between pairs are restricted to correspondences (; R)sI W . The induced behavioral equivalence relation with respect to W is deno... |

291 | Local Reasoning about Programs that Alter Data Structures
- O’Hearn, Reynolds, et al.
- 2001
(Show Context)
Citation Context ... breakdown of the data encapsulation, so that faulty conclusions are avoided. Our treatment bears a close relationship with the ongoing work on separation logic for local reasoning about heap storage =-=[22, 11, 28]. In -=-particular, our relations are \local" in the same sense as the assertions of separation logic. We use the ideas of partial heaps and heap-splitting developed there to formulate the relations. We ... |

168 |
The essence of algol
- Reynolds
- 1981
(Show Context)
Citation Context .... Hence, this block is equivalent to diverge. 2 We give an indication of how this form of selective information hiding can be modelled in the semantics. Using a possible world form of semantics as in =-=[21, 16, 13]-=-, we take worlds to be sets of typed locations (or equivalently record types) of the form W = fl 1 :s1 ; : : : ; l k :sk g. We write XsW to mean that X is an extension of W with additional locations (... |

126 | A fully abstract game semantics for general references - Abramsky, Honda, et al. - 1998 |

108 | Parametricity and local variables
- O’Hearn, Tennent
- 1995
(Show Context)
Citation Context ...nition of (; S)s(; R) is that S extends R by imposing additional conditions for new locations but does not alter R for the part of the heap that R deals with. This is the same intuition as that in [16=-=,-=- 14] for local variables. The identity correspondence for a world W is I W = ( W ; emp W ) : W $ W , where W is the diagonal relation for W and emp W maps every s W to emp. Fact 1. Whenever XsW , I X... |

108 | Intuitionistic reasoning about shared mutable data structure
- Reynolds
(Show Context)
Citation Context ... breakdown of the data encapsulation, so that faulty conclusions are avoided. Our treatment bears a close relationship with the ongoing work on separation logic for local reasoning about heap storage =-=[22, 11, 28]. In -=-particular, our relations are \local" in the same sense as the assertions of separation logic. We use the ideas of partial heaps and heap-splitting developed there to formulate the relations. We ... |

100 |
Towards fully abstract semantics for local variables: Preliminary report
- Meyer, Sieber
- 1988
(Show Context)
Citation Context ...ures. In this section, we give an informal introduction to these information hiding aspects through a series of examples. Example 1. Consider the following program block adapted from Meyer and Sieber =-=[9]-=-: f local var int x; x := 0; p(); if x = 0 then diverge g Here, p is an arbitrary non-local procedure with no arguments, and diverge is a diverging command. The program block should be observationally... |

58 | From Algol to polymorphic linear lambda-calculus - O’Hearn, Reynolds |

56 |
Names and Higher-Order Functions
- Stark
- 1994
(Show Context)
Citation Context ...lection [15]), none of this theory is directly applicable to heap variables because the shape of the heap storage dynamically varies. A number of attacks have been made on the problem: Stark's thesis =-=[25, 24]-=-, which deals with dynamic allocation but not pointers, and Ghica's and Levy's theses [4, 5, 7, 8], which address the general semantic structure but not data representation reasoning. The recent paper... |

46 |
A Category-Theoretic Approach to the Semantics of Programming Languages
- Oles
- 1982
(Show Context)
Citation Context .... Hence, this block is equivalent to diverge. 2 We give an indication of how this form of selective information hiding can be modelled in the semantics. Using a possible world form of semantics as in =-=[21, 16, 13]-=-, we take worlds to be sets of typed locations (or equivalently record types) of the form W = fl 1 :s1 ; : : : ; l k :sk g. We write XsW to mean that X is an extension of W with additional locations (... |

43 | Categorical models for local names
- Stark
- 1996
(Show Context)
Citation Context ...lection [15]), none of this theory is directly applicable to heap variables because the shape of the heap storage dynamically varies. A number of attacks have been made on the problem: Stark's thesis =-=[25, 24]-=-, which deals with dynamic allocation but not pointers, and Ghica's and Levy's theses [4, 5, 7, 8], which address the general semantic structure but not data representation reasoning. The recent paper... |

41 |
Local Reasoning for Stateful Programs
- Yang
- 2001
(Show Context)
Citation Context ... breakdown of the data encapsulation, so that faulty conclusions are avoided. Our treatment bears a close relationship with the ongoing work on separation logic for local reasoning about heap storage =-=[22, 11, 28]. In -=-particular, our relations are \local" in the same sense as the assertions of separation logic. We use the ideas of partial heaps and heap-splitting developed there to formulate the relations. We ... |

36 | Semantics of local variables
- O’Hearn, Tennent
- 1992
(Show Context)
Citation Context .... Hence, this block is equivalent to diverge. 2 We give an indication of how this form of selective information hiding can be modelled in the semantics. Using a possible world form of semantics as in =-=[21, 16, 13]-=-, we take worlds to be sets of typed locations (or equivalently record types) of the form W = fl 1 :s1 ; : : : ; l k :sk g. We write XsW to mean that X is an extension of W with additional locations (... |

31 |
Possible world semantics for general storage in call-by-value
- Levy
- 2002
(Show Context)
Citation Context ...of the heap storage dynamically varies. A number of attacks have been made on the problem: Stark's thesis [25, 24], which deals with dynamic allocation but not pointers, and Ghica's and Levy's theses =-=[4, 5, 7, 8]-=-, which address the general semantic structure but not data representation reasoning. The recent paper of Banerjee and Naumann [2] is thesrst to address data representation correctness with heap varia... |

24 |
Algol-like Languages (Two volumes
- O'Hearn, Tennent
- 1997
(Show Context)
Citation Context ... for data representation reasoning, involving invariants or simulation relations, have not been validated. While remarkable progress has been made in understanding local variables (cf. the collection =-=[15]-=-), none of this theory is directly applicable to heap variables because the shape of the heap storage dynamically varies. A number of attacks have been made on the problem: Stark's thesis [25, 24], wh... |

23 | Objects and classes in Algol-like languages
- Reddy
(Show Context)
Citation Context ...The program blocks create local data structures which they attempt to hide from the client procedures in varying ways.) Our programming language also contains a class construct, previously studied in =-=[18, 19]-=-, providing a more direct form of data abstraction. The next example uses this to illustrate relational reasoning: Example 3. Consider a list class implemented using linked lists in heap: List = class... |

23 | Re graphs and parametric polymorphism
- Robinson, Rosolini
- 1994
(Show Context)
Citation Context ...e list cells. The corresponding denition for Example 3 would use a constant function R() because no pointers are to be related. 2 Categorical matters We use the setting of re exive graph categories [1=-=4, 23, 3]-=- to explicate the categorical structure that we use. Proposition 3. There is a re exive graph of categories World with the following data: worlds as vertices, extensions XsW as vertex morphisms, corre... |

22 |
A contribution to the development of algol
- Wirth, Hoare
- 1966
(Show Context)
Citation Context ...d to keep track of visible locations whose pointers can be stored and leaked. 1 Introduction Programming languages with dynamically allocated storage variables (\heap variables") date back to Alg=-=ol W [27]-=- and include the majority of languages in use today: imperative languages like C, Pascal and Ada, object-oriented languages ranging from Simula 67 to Java, and functional languages like Scheme, Standa... |

13 |
Correctness of data representations in Algol-like languages. In: A Classical Mind: Essays
- Tennent
- 1994
(Show Context)
Citation Context ...cally allocated variables, pointers, and call-by-value procedures. The validity of simulation-based reasoning principles follows from the structure of the semantics (similar to Tennent's treatment in =-=[26]-=- for local variables). The type structure of the semantics makes explicit where information hiding is going on, while the formal parametricity conditions back up one's intuitions and allow one to prod... |

5 | Semantics of dynamic variables in Algol-like languages
- Ghica
- 1997
(Show Context)
Citation Context ...xp ]](W ) = 8X St(X) ! [[]](X) + ffaultg [[com]](W ) = 8X St(X) ! 9YsSt(Y ) + ffaultg The position of the type quantications 8 and 9 in the type interpretations has been recognized in earlier work [25=-=, 4, 8-=-]. Intuitively, a command dened for a world W should be prepared to accept additional locations (represented by X) in its input state, and it might itself allocate new locations during the execution (... |

5 |
When parametricity implies naturality. Electronic manuscript
- Reddy
- 1997
(Show Context)
Citation Context ... (; S). The 8 quantier uses relational parametricity to capture uniformity and information hiding. The categorical condition of natural transformation is an alternative condition for uniformity. In [1=-=7, 3]-=-, it is argued that ideally naturality should be subsumed under parametricity. However, our relational correspondences for heap worlds are not rich enough to subsume naturality. So, for the present pa... |

4 |
Representation independence, con and access control
- Banerjee, Naumann
(Show Context)
Citation Context ...c allocation but not pointers, and Ghica's and Levy's theses [4, 5, 7, 8], which address the general semantic structure but not data representation reasoning. The recent paper of Banerjee and Naumann =-=[2]-=- is thesrst to address data representation correctness with heap variables and pointers. While their work is remarkably successful in dealing with a Java-like language with dynamically allocated objec... |

2 |
Parametricity as a Notion of Uniformity in Re Graphs
- Dunphy
- 2002
(Show Context)
Citation Context ...e list cells. The corresponding denition for Example 3 would use a constant function R() because no pointers are to be related. 2 Categorical matters We use the setting of re exive graph categories [1=-=4, 23, 3]-=- to explicate the categorical structure that we use. Proposition 3. There is a re exive graph of categories World with the following data: worlds as vertices, extensions XsW as vertex morphisms, corre... |

1 |
Parameters and linked structures in algol-like languages
- Ghica
(Show Context)
Citation Context ...of the heap storage dynamically varies. A number of attacks have been made on the problem: Stark's thesis [25, 24], which deals with dynamic allocation but not pointers, and Ghica's and Levy's theses =-=[4, 5, 7, 8]-=-, which address the general semantic structure but not data representation reasoning. The recent paper of Banerjee and Naumann [2] is thesrst to address data representation correctness with heap varia... |