Abstract effects and proof-relevant logical relations

  • Authors:
  • Nick Benton;Martin Hofmann;Vivek Nigam

  • Affiliations:
  • Microsoft Research, Cambridge, United Kingdom;LMU, Munich, Germany;UFPB, João Pessoa, Brazil

  • Venue:
  • Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

We give a denotational semantics for a region-based effect system that supports type abstraction in the sense that only externally visible effects need to be tracked: non-observable internal modifications, such as the reorganisation of a search tree or lazy initialisation, can count as 'pure' or 'read only'. This 'fictional purity' allows clients of a module to validate soundly more effect-based program equivalences than would be possible with previous semantics. Our semantics uses a novel variant of logical relations that maps types not merely to partial equivalence relations on values, as is commonly done, but rather to a proof-relevant generalisation thereof, namely setoids. The objects of a setoid establish that values inhabit semantic types, whilst its morphisms are understood as proofs of semantic equivalence. The transition to proof-relevance solves twoawkward problems caused by naïve use of existential quantification in Kripke logical relations, namely failure of admissibility and spurious functional dependencies.