Results 1 -
5 of
5
The essence of monotonic state
, 2009
"... We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are inde ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are independent of the treatment of mutable state, but combine with it to offer a flexible account of “monotonic state”. To demonstrate their use, we present a simple yet challenging example, namely monotonic integer counters. We then show how an implementation of thunks in terms of references can be assigned types that reflect time complexity properties, in the style of Danielsson (2008). This offers a foundational explanation of Danielsson’s system and, at the same time, extends it to a calculus with mutable state. Last, we sketch an application to hash-consing.
Languages, Theory
"... We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are indep ..."
Abstract
- Add to MetaCart
We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are independent of the treatment of mutable state, but combine with it to offer a flexible account of “monotonic state”. We apply these mechanisms to solve two reasoning challenges that involve mutable state. First, we show how an implementation of thunks in terms of references can be assigned types that reflect time complexity properties, in the style of Danielsson (2008). Second, we show how an implementation of hash-consing can be assigned a specification that conceals the existence of an internal state yet guarantees that two pieces of input data receive the same code if and only if they are equal.
Relational Parametricity for a Polymorphic Linear Lambda Calculus
"... Abstract. This paper presents a novel syntactic logical relation for a polymorphic linear λ-calculus that treats all types as linear and introduces the constructor! to account for intuitionistic terms. We define a logical relation for open values under both open linear and intuitionistic contexts, t ..."
Abstract
- Add to MetaCart
Abstract. This paper presents a novel syntactic logical relation for a polymorphic linear λ-calculus that treats all types as linear and introduces the constructor! to account for intuitionistic terms. We define a logical relation for open values under both open linear and intuitionistic contexts, then extend it for open terms with evaluation and open relation substitutions. Relations that instantiate type quantifiers are for open terms and types. We demonstrate the applicability of this logical relation through its soundness with respect to contextual equivalence, along with free theorems for linearity that are difficult to achieve by closed logical relations. When interpreting types on only closed terms, the model defaults to a closed logical relation that is both sound and complete with respect to contextual equivalence, and is sufficient to reason about isomorphisms of type encodings. The idea of using open logical relations also extends easily to System F ◦ —an extension of System F that uses kinds to distinguish linear from intuitionistic types. All of our results have been mechanically verified in Coq, which are also extensive formalizations for polymorphic linear languages in proof assistants. 1
Noname manuscript No. (will be inserted by the editor) Mechanizing Metatheory without Typing Contexts
"... Abstract When mechanizing the metatheory of a programming language, one usually needs many lemmas proving structural properties of typing judgments, such as permutation and weakening. Such structural lemmas are sometimes unnecessary if we eliminate typing contexts by expanding typing judgments into ..."
Abstract
- Add to MetaCart
Abstract When mechanizing the metatheory of a programming language, one usually needs many lemmas proving structural properties of typing judgments, such as permutation and weakening. Such structural lemmas are sometimes unnecessary if we eliminate typing contexts by expanding typing judgments into their original hypothetical proofs. This technique of eliminating typing contexts, which has been around since Church [4], is based on the view that entailment relations, such as typing judgments, are just syntactic tools for displaying only the hypotheses and conclusion of a hypothetical proof while hiding its internal structure. In this paper, we apply this technique to the POPLmark challenge [1] and experimentally evaluate its efficiency by formalizing System F<: in the Coq proof assistant in a number of different ways. An analysis of our Coq developments shows that eliminating typing contexts produces a more significant reduction in both the number of lemmas and the count of tactics than the cofinite quantification, one of the most effective ways of simplifying the mechanization involving binders. Our experiment with System F<: suggests three guidelines to follow when applying the technique of eliminating typing contexts.

