Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1480881.1480925acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

State-dependent representation independence

Published: 21 January 2009 Publication History
  • Get Citation Alerts
  • 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

    [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]
    Amal Ahmed and Matthias Blume. Typed closure conversion preserves observational equivalence. In ICFP, 2008.
    [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]
    Andrew W. Appel and David McAllester. An indexed model of recursive types for foundational proof-carrying code. Transactions on Programming Languages and Systems, 23(5):657--683, 2001.
    [5]
    Anindya Banerjee and David A. Naumann. Ownership confinement ensures representation independence in object-oriented programs. Journal of the ACM, 52(6):894--960, 2005.
    [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]
    Derek Dreyer, Karl Crary, and Robert Harper. A type system for higher-order modules. In POPL, 2003.
    [13]
    Vasileios Koutavas and Mitchell Wand. Small bisimulations for reasoning about higher-order imperative programs. In POPL, 2006.
    [14]
    Vasileios Koutavas and Mitchell Wand. Reasoning about class behavior. In FOOL/WOOD, 2007.
    [15]
    Xavier Leroy. Applicative functors and fully transparent higher-order modules. In POPL, 1995.
    [16]
    Paul-André Melliès and Jérôme Vouillon. Recursive polymorphic types and parametricity in an operational framework. In LICS, 2005.
    [17]
    John C. Mitchell. Representation independence and data abstraction. In POPL, 1986.
    [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]
    Benjamin C. Pierce and Davide Sangiorgi. Behavioral equivalence in the polymorphic pi-calculus. Journal of the ACM, 47(3):531--586, 2000.
    [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]
    Andrew Pitts and Ian Stark. Operational reasoning for functions with local state. In HOOTS, 1998.
    [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]
    John C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, 2002.
    [25]
    Claudio V. Russo. Non-dependent types for Standard ML modules. In PPDP, 1999.
    [26]
    Davide Sangiorgi, Naoki Kobayashi, and Eijiro Sumii. Environmental bisimulations for higher-order languages. In LICS, 2007.
    [27]
    Eijiro Sumii and Benjamin Pierce. A bisimulation for dynamic sealing. Theoretical Computer Science, 375(1-3):161--192, 2007.
    [28]
    Eijiro Sumii and Benjamin Pierce. A bisimulation for type abstraction and recursion. Journal of the ACM, 54(5):1--43, 2007.
    [29]
    Janis Voigtländer and Patricia Johann. Selective strictness and parametricity in structural operational semantics, inequationally. Theoretical Computer Science, 388(1-3):290--318, 2007.

    Cited By

    View all
    • (2024)Contextual Equivalence for State and Control via Nested DataProceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3661814.3662109(1-14)Online publication date: 8-Jul-2024
    • (2024)Pushdown Normal-Form Bisimulation: A Nominal Context-Free Approach to Program EquivalenceProceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3661814.3662103(1-15)Online publication date: 8-Jul-2024
    • (2024)Bialgebraic Reasoning on Higher-order Program EquivalenceProceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3661814.3662099(1-15)Online publication date: 8-Jul-2024
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2009
    464 pages
    ISBN:9781605583792
    DOI:10.1145/1480881
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 44, Issue 1
      POPL '09
      January 2009
      453 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1594834
      Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 21 January 2009

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. abstract data types
    2. existential types
    3. local state
    4. representation independence
    5. step-indexed logical relations

    Qualifiers

    • Research-article

    Conference

    POPL09

    Acceptance Rates

    Overall Acceptance Rate 824 of 4,130 submissions, 20%

    Upcoming Conference

    POPL '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)32
    • Downloads (Last 6 weeks)1

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Contextual Equivalence for State and Control via Nested DataProceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3661814.3662109(1-14)Online publication date: 8-Jul-2024
    • (2024)Pushdown Normal-Form Bisimulation: A Nominal Context-Free Approach to Program EquivalenceProceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3661814.3662103(1-15)Online publication date: 8-Jul-2024
    • (2024)Bialgebraic Reasoning on Higher-order Program EquivalenceProceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3661814.3662099(1-15)Online publication date: 8-Jul-2024
    • (2024)The Logical Essence of Well-Bracketed Control FlowProceedings of the ACM on Programming Languages10.1145/36328628:POPL(575-603)Online publication date: 5-Jan-2024
    • (2024)Signature restriction for polymorphic algebraic effectsJournal of Functional Programming10.1017/S095679682400005434Online publication date: 27-May-2024
    • (2023)Compositional Security Definitions for Higher-Order Where DeclassificationProceedings of the ACM on Programming Languages10.1145/35860417:OOPSLA1(406-433)Online publication date: 6-Apr-2023
    • (2023)A Relational Program Logic with Data Abstraction and Dynamic FramingACM Transactions on Programming Languages and Systems10.1145/355149744:4(1-136)Online publication date: 10-Jan-2023
    • (2023)Modal Crash Types for Intermittent ComputingProgramming Languages and Systems10.1007/978-3-031-30044-8_7(168-196)Online publication date: 22-Apr-2023
    • (2022)Gradual System FJournal of the ACM10.1145/355598669:5(1-78)Online publication date: 28-Oct-2022
    • (2022)Two Parametricities Versus Three Universal TypesACM Transactions on Programming Languages and Systems10.1145/353965744:4(1-43)Online publication date: 21-Sep-2022
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media