Abstract Effects and Proof-Relevant Logical Relations
Abstract Effects and Proof-Relevant Logical Relations
复制标题
DOI:
10.1145/2535838.2535869
复制
发表时间:
2014-01-01
影响因子:
--
通讯作者:
Nigam, Vivek
中科院分区:
文献类型:
--
作者:
Benton, Nick;Hofmann, Martin;Nigam, Vivek
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 two awkward problems caused by naive use of existential quantification in Kripke logical relations, namely failure of admissibility and spurious functional dependencies.