11,669 research outputs found
Step-Indexed Relational Reasoning for Countable Nondeterminism
Programming languages with countable nondeterministic choice are
computationally interesting since countable nondeterminism arises when modeling
fairness for concurrent systems. Because countable choice introduces
non-continuous behaviour, it is well-known that developing semantic models for
programming languages with countable nondeterminism is challenging. We present
a step-indexed logical relations model of a higher-order functional programming
language with countable nondeterminism and demonstrate how it can be used to
reason about contextually defined may- and must-equivalence. In earlier
step-indexed models, the indices have been drawn from {\omega}. Here the
step-indexed relations for must-equivalence are indexed over an ordinal greater
than {\omega}
A generic operational metatheory for algebraic effects
We provide a syntactic analysis of contextual preorder and equivalence for a polymorphic programming language with effects. Our approach applies uniformly across a range of algebraic effects, and incorporates, as instances: errors, input/output, global state, nondeterminism, probabilistic choice, and combinations thereof. Our approach is to extend Plotkin and Power’s structural operational semantics for algebraic effects (FoSSaCS 2001) with a primitive “basic preorder” on ground type computation trees. The basic preorder is used to derive notions of contextual preorder and equivalence on program terms. Under mild assumptions on this relation, we prove fundamental properties of contextual preorder (hence equivalence) including extensionality properties and a characterisation via applicative contexts, and we provide machinery for reasoning about polymorphism using relational parametricity
Specifying and Verifying Concurrent Algorithms with Histories and Subjectivity
We present a lightweight approach to Hoare-style specifications for
fine-grained concurrency, based on a notion of time-stamped histories that
abstractly capture atomic changes in the program state. Our key observation is
that histories form a partial commutative monoid, a structure fundamental for
representation of concurrent resources. This insight provides us with a
unifying mechanism that allows us to treat histories just like heaps in
separation logic. For example, both are subject to the same assertion logic and
inference rules (e.g., the frame rule). Moreover, the notion of ownership
transfer, which usually applies to heaps, has an equivalent in histories. It
can be used to formally represent helping---an important design pattern for
concurrent algorithms whereby one thread can execute code on behalf of another.
Specifications in terms of histories naturally abstract granularity, in the
sense that sophisticated fine-grained algorithms can be given the same
specifications as their simplified coarse-grained counterparts, making them
equally convenient for client-side reasoning. We illustrate our approach on a
number of examples and validate all of them in Coq.Comment: 17 page
FunTAL: Reasonably Mixing a Functional Language with Assembly
We present FunTAL, the first multi-language system to formalize safe
interoperability between a high-level functional language and low-level
assembly code while supporting compositional reasoning about the mix. A central
challenge in developing such a multi-language is bridging the gap between
assembly, which is staged into jumps to continuations, and high-level code,
where subterms return a result. We present a compositional stack-based typed
assembly language that supports components, comprised of one or more basic
blocks, that may be embedded in high-level contexts. We also present a logical
relation for FunTAL that supports reasoning about equivalence of high-level
components and their assembly replacements, mixed-language programs with
callbacks between languages, and assembly components comprised of different
numbers of basic blocks.Comment: 15 pages; implementation at https://dbp.io/artifacts/funtal/;
published in PLDI '17, Proceedings of the 38th ACM SIGPLAN Conference on
Programming Language Design and Implementation, June 18 - 23, 2017,
Barcelona, Spai
Step-Indexed Logical Relations for Probability (long version)
It is well-known that constructing models of higher-order probabilistic
programming languages is challenging. We show how to construct step-indexed
logical relations for a probabilistic extension of a higher-order programming
language with impredicative polymorphism and recursive types. We show that the
resulting logical relation is sound and complete with respect to the contextual
preorder and, moreover, that it is convenient for reasoning about concrete
program equivalences. Finally, we extend the language with dynamically
allocated first-order references and show how to extend the logical relation to
this language. We show that the resulting relation remains useful for reasoning
about examples involving both state and probabilistic choice.Comment: Extended version with appendix of a FoSSaCS'15 pape
The Problem of Contextuality and the Impossibility of Experimental Metaphysics Thereof
Recently a new impulse has been given to the experimental investigation of
contextuality. In this paper we show that for a widely used definition of
contextuality there can be no decisive experiment on the existence of
contextuality. To this end, we give a clear presentation of the hidden variable
models due to Meyer, Kent and Clifton (MKC), which would supposedly nullify the
Kochen-Specker Theorem. Although we disagree with this last statement, the
models play a significant role in the discussion on the meaning of
contextuality. In fact, we introduce a specific MKC-model of which we show that
it is non-contextual and completely in agreement with quantum mechanical
predictions. We also investigate the possibility of other definitions of
non-contextuality --with an emphasis on operational definitions-- and argue
that any useful definition relies on the specification of a theoretical
framework. It is therefore concluded that no experimental test can yield any
conclusions about contextuality on a metaphysical level
No solvable lambda-value term left behind
In the lambda calculus a term is solvable iff it is operationally relevant.
Solvable terms are a superset of the terms that convert to a final result
called normal form. Unsolvable terms are operationally irrelevant and can be
equated without loss of consistency. There is a definition of solvability for
the lambda-value calculus, called v-solvability, but it is not synonymous with
operational relevance, some lambda-value normal forms are unsolvable, and
unsolvables cannot be consistently equated. We provide a definition of
solvability for the lambda-value calculus that does capture operational
relevance and such that a consistent proof-theory can be constructed where
unsolvables are equated attending to the number of arguments they take (their
"order" in the jargon). The intuition is that in lambda-value the different
sequentialisations of a computation can be distinguished operationally. We
prove a version of the Genericity Lemma stating that unsolvable terms are
generic and can be replaced by arbitrary terms of equal or greater order.Comment: 43 page
- …