ACM Home Page
Please provide us with feedback. Feedback
State-dependent representation independence
Full text PdfPdf (382 KB)
Source
Annual Symposium on Principles of Programming Languages archive
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Savannah, GA, USA
SESSION: Types II table of contents
Pages 340-353  
Year of Publication: 2009
ISBN:978-1-60558-379-2
Also published in ...
Authors
Amal Ahmed  TTI-C, Chicago, IL, USA
Derek Dreyer  MPI-SWS, Saarbrücken, Germany
Andreas Rossberg  MPI-SWS, Saarbrücken, Germany
Sponsors
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 21,   Downloads (12 Months): 110,   Citation Count: 2
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1480881.1480925
What is a DOI?

ABSTRACT

Mitchell's notion of representation independence is a particularly useful application of Reynolds' relational parametricity -- two different implementations of an abstract data type can be shown contextually equivalent so long as there exists a relation between their type representations that is preserved by their operations. There have been a number of methods proposed for proving representation independence in various pure extensions of System F (where data abstraction is achieved through existential typing), as well as in Algol- or Java-like languages (where data abstraction is achieved through the use of local mutable state). However, none of these approaches addresses the interaction of existential type abstraction and local state. In particular, none allows one to prove representation independence results for generative ADTs -- i.e. ADTs that both maintain some local state and define abstract types whose internal representations are dependent on that local state.

In this paper, we present a syntactic, logical-relations-based method for proving representation independence of generative ADTs in a language supporting polymorphic types, existential types, general recursive types, and unrestricted ML-style mutable references. We demonstrate the effectiveness of our method by using it to prove several interesting contextual equivalences that involve a close interaction between existential typing and local state, as well as some well-known equivalences from the literature (such as Pitts and Stark's "awkward" example) that have caused trouble for previous logical-relations-based methods.

The success of our method relies on two key technical innovations. First, in order to handle generative ADTs, we develop a possible-worlds model in which relational interpretations of types are allowed to grow over time in a manner that is tightly coupled with changes to some local state. Second, we employ a step-indexed stratification of possible worlds, which facilitates a simplified account of mutable references of higher type.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Amal Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In ESOP, 2006. Extended/corrected version of this paper available as Harvard University TR-01-06.
2
 
3
Amal Ahmed, Derek Dreyer, and Andreas Rossberg. State-dependent representation independence (Technical appendix), 2008. Available at: http://ttic.uchicago.edu/~amal/papers/sdri/
4
5
 
6
Anindya Banerjee and David A. Naumann. State based ownership, reentrance, and encapsulation. In ECOOP, 2005.
 
7
Nick Benton and Benjamin Leperchey. Relational reasoning in a nominal semantics for storage. In TLCA, 2005.
 
8
Lars Birkedal, Kristian Støvring, and Jacob Thamsborg. Relational parametricity for references and recursive types, July 2008. Draft, submitted for publication.
 
9
Nina Bohr. Advances in Reasoning Principles for Contextual Equivalence and Termination. PhD thesis, IT University of Copenhagen, 2007.
 
10
Nina Bohr and Lars Birkedal. Relational reasoning for recursive types and references. In APLAS, 2006.
 
11
Karl Crary and Robert Harper. Syntactic logical relations for polymorphic and recursive types. In Computation, Meaning and Logic: Articles dedicated to Gordon Plotkin. 2007.
12
13
 
14
Vasileios Koutavas and Mitchell Wand. Reasoning about class behavior. In FOOL/WOOD, 2007.
15
 
16
17
 
18
Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. Hoare type theory, polymorphism and separation. Journal of Functional Programming, 18(5&6):865--911, September 2008.
19
 
20
Andrew Pitts. Typed operational reasoning. In B. C. Pierce, editor, Advanced Topics in Types and Programming Languages, pages 245--289. The MIT Press, 2005.
 
21
 
22
Uday Reddy and Hongseok Yang. Correctness of data representations involving heap data structures. In ESOP, 2003.
 
23
John C. Reynolds. Types, abstraction and parametric polymorphism. In Information Processing, 1983.
 
24
 
25
 
26
 
27
28
 
29


Collaborative Colleagues:
Amal Ahmed: colleagues
Derek Dreyer: colleagues
Andreas Rossberg: colleagues