skip to main content
10.1145/1863543.1863566acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

The impact of higher-order state and control effects on local relational reasoning

Published: 27 September 2010 Publication History

Abstract

Reasoning about program equivalence is one of the oldest problems in semantics. In recent years, useful techniques have been developed, based on bisimulations and logical relations, for reasoning about equivalence in the setting of increasingly realistic languages - languages nearly as complex as ML or Haskell. Much of the recent work in this direction has considered the interesting representation independence principles enabled by the use of local state, but it is also important to understand the principles that powerful features like higher-order state and control effects disable. This latter topic has been broached extensively within the framework of game semantics, resulting in what Abramsky dubbed the "semantic cube": fully abstract game-semantic characterizations of various axes in the design space of ML-like languages. But when it comes to reasoning about many actual examples, game semantics does not yet supply a useful technique for proving equivalences.
In this paper, we marry the aspirations of the semantic cube to the powerful proof method of step-indexed Kripke logical relations. Building on recent work of Ahmed, Dreyer, and Rossberg, we define the first fully abstract logical relation for an ML-like language with recursive types, abstract types, general references and call/cc. We then show how, under orthogonal restrictions to the expressive power our language - namely, the restriction to first-order state and/or the removal of call/cc - we can enhance the proving power of our possible-worlds model in correspondingly orthogonal ways, and we demonstrate this proving power on a range of interesting examples. Central to our story is the use of state transition systems to model the way in which properties of local state evolve over time.

Supplementary Material

JPG File (icfp-tues-1055-neis.jpg)
MOV File (icfp-tues-1055-neis.mov)

References

[1]
}}S. Abramsky, K. Honda, and G. McCusker. A fully abstract game semantics for general references. In LICS, 1998.
[2]
}}A. Ahmed. Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004.
[3]
}}A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009.
[4]
}}A. Appel and D. McAllester. An indexed model of recursive types for foundational proof-carrying code. TOPLAS, 23(5):657--683, 2001.
[5]
}}N. Benton and C.-K. Hur. Biorthogonality, step-indexing and compiler correctness. In ICFP, 2009.
[6]
}}N. Benton and N. Tabareau. Compiling functional types to relational specifications for low level imperative code. In TLDI, 2009.
[7]
}}N. Bohr. Advances in Reasoning Principles for Contextual Equivalence and Termination. PhD thesis, IT University of Copenhagen, 2007.
[8]
}}D. Dreyer, G. Neis, and L. Birkedal. The impact of higher-order state and control effects on local relational reasoning (Technical appendix), 2010. http://www.mpi-sws.org/ dreyer/papers/stslr/
[9]
}}D. Dreyer, G. Neis, A. Rossberg, and L. Birkedal. A relational modal logic for higher-order stateful ADTs. In POPL, 2010.
[10]
}}M. Felleisen and R. Hieb. The revised report on the syntactic theories of sequential control and state. TCS, 103(2):235--271, 1992.
[11]
}}D. Friedman and C. Haynes. Constraining control. In POPL, 1985.
[12]
}}D. R. Ghica and G. McCusker. Reasoning about Idealized Algol using regular languages. In ICALP, 2000.
[13]
}}P. Johann. Short cut fusion is correct. JFP, 13(4):797--814, 2003.
[14]
}}P. Johann, A. Simpson, and J. Voigtländer. A generic operational metatheory for algebraic effects. In LICS, 2010.
[15]
}}P. Johann and J. Voigtländer. The impact of phseq on free theorems-based program transformations. Fundamenta Informaticae, 69(1-2):63--102, 2006.
[16]
}}V. Koutavas and S. Lassen. Fun with fully abstract operational game semantics for general references. Unpublished, Feb. 2008.
[17]
}}V. Koutavas and M. Wand. Small bisimulations for reasoning about higher-order imperative programs. In POPL, 2006.
[18]
}}J.-L. Krivine. Classical logic, storage operators and second-order lambda-calculus. Annals of Pure and Applied Logic, 68:53--78, 1994.
[19]
}}J. Laird. Full abstraction for functional languages with control. In LICS, 1997.
[20]
}}J. Laird. A fully abstract trace semantics for general references. In ICALP, 2007.
[21]
}}S. B. Lassen and P. B. Levy. Typed normal form bisimulation. In CSL, 2007.
[22]
}}S. B. Lassen and P. B. Levy. Typed normal form bisimulation for parametric polymorphism. In LICS, 2008.
[23]
}}I. Mason and C. Talcott. Equivalence in functional languages with effects. JFP, 1(3):287--327, 1991.
[24]
}}A. S. Murawski. Functions with local state: regularity and undecidability. TCS, 338(1-3):315--349, 2005.
[25]
}}A. S. Murawski and I. Walukiewicz. Third-order Idealized Algol with iteration is decidable. TCS, 390(2-3):214--229, 2008.
[26]
}}P. O’Hearn and U. Reddy. Objects, interference, and the Yoneda embedding. In MFPS, 1995.
[27]
}}A. Pilkiewicz and F. Pottier. The essence of monotonic state. Submitted for publication, 2009.
[28]
}}A. Pitts and I. Stark. Operational reasoning for functions with local state. In HOOTS, 1998.
[29]
}}A. M. Pitts. Reasoning about local variables with operationally-based logical relations. In LICS, 1996.
[30]
}}F. Pottier. Hiding local state in direct style: a higher-order anti-frame rule. In LICS, 2008.
[31]
}}F. Pottier. Generalizing the higher-order frame and anti-frame rules. Unpublished, 2009.
[32]
}}D. Sangiorgi, N. Kobayashi, and E. Sumii. Environmental bisimulations for higher-order languages. In LICS, 2007.
[33]
}}J. Schwinghammer, H. Yang, L. Birkedal, F. Pottier, and B. Reus. A semantic foundation for hidden state. In FOSSACS, 2010.
[34]
}}K. Støvring and S. B. Lassen. A complete, co-inductive syntactic theory of sequential control and state. In POPL, 2007.
[35]
}}E. Sumii. A complete characterization of observational equivalence in polymorphic λ-calculus with general references. In CSL, 2009.
[36]
}}E. Sumii and B. Pierce. A bisimulation for type abstraction and recursion. Journal of the ACM, 54(5):1--43, 2007.
[37]
}}H. Thielecke. On exceptions versus continuations in the presence of state. In ESOP, 2000.
[38]
}}N. Yoshida, K. Honda, and M. Berger. Logical reasoning for higher-order functions with local state. LMCS, 4(4:2), 2008.

Cited By

View all
  • (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)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
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
September 2010
398 pages
ISBN:9781605587943
DOI:10.1145/1863543
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 9
    ICFP '10
    September 2010
    382 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1932681
    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: 27 September 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. biorthogonality
  2. exceptions
  3. first-class continuations
  4. higher-order state
  5. local state
  6. observational equivalence
  7. state transition systems
  8. step-indexed kripke logical relations

Qualifiers

  • Research-article

Conference

ICFP '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)1
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (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)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
  • (2022)GADTs, Functoriality, Parametricity: Pick TwoElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.357.6357(77-92)Online publication date: 7-Apr-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
  • (2022)End-to-end translation validation for the halide languageProceedings of the ACM on Programming Languages10.1145/35273286:OOPSLA1(1-30)Online publication date: 29-Apr-2022
  • (2022)Purity of an ST monad: full abstraction by semantically typed back-translationProceedings of the ACM on Programming Languages10.1145/35273266:OOPSLA1(1-27)Online publication date: 29-Apr-2022
  • (2022)Finding real bugs in big programs with incorrectness logicProceedings of the ACM on Programming Languages10.1145/35273256:OOPSLA1(1-27)Online publication date: 29-Apr-2022
  • (2022)Le temps des cerises: efficient temporal stack safety on capability machines using directed capabilitiesProceedings of the ACM on Programming Languages10.1145/35273186:OOPSLA1(1-30)Online publication date: 29-Apr-2022
  • (2022)Coverage-guided tensor compiler fuzzing with joint IR-pass mutationProceedings of the ACM on Programming Languages10.1145/35273176:OOPSLA1(1-26)Online publication date: 29-Apr-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

EPUB

View this article in ePub.

ePub

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media