367 research outputs found
Intensional and Extensional Semantics of Bounded and Unbounded Nondeterminism
We give extensional and intensional characterizations of nondeterministic
functional programs: as structure preserving functions between biorders, and as
nondeterministic sequential algorithms on ordered concrete data structures
which compute them. A fundamental result establishes that the extensional and
intensional representations of non-deterministic programs are equivalent, by
showing how to construct a unique sequential algorithm which computes a given
monotone and stable function, and describing the conditions on sequential
algorithms which correspond to continuity with respect to each order.
We illustrate by defining may and must-testing denotational semantics for a
sequential functional language with bounded and unbounded choice operators. We
prove that these are computationally adequate, despite the non-continuity of
the must-testing semantics of unbounded nondeterminism. In the bounded case, we
prove that our continuous models are fully abstract with respect to may and
must-testing by identifying a simple universal type, which may also form the
basis for models of the untyped lambda-calculus. In the unbounded case we
observe that our model contains computable functions which are not denoted by
terms, by identifying a further "weak continuity" property of the definable
elements, and use this to establish that it is not fully abstract
Decidability and syntactic control of interference
AbstractWe investigate the decidability of observational equivalence and approximation in Reynolds’ “Syntactic Control of Interference” (SCI), a prototypical functional-imperative language in which covert interference between functions and their arguments is prevented by the use of an affine typing discipline.By associating denotations of terms in a fully abstract “relational” model of finitary basic SCI (due to Reddy) with multitape finite state automata, we show that observational approximation is not decidable (even at first order), but that observational equivalence is decidable for all terms.We then consider the same problems for basic SCI extended with non-local control in the form of backwards jumps. We show that both observational approximation and observational equivalence are decidable in this “observably sequential” version of the language by describing a fully abstract games model in which strategies are regular languages
Adaptive Lock-Free Data Structures in Haskell: A General Method for Concurrent Implementation Swapping
A key part of implementing high-level languages is providing built-in and
default data structures. Yet selecting good defaults is hard. A mutable data
structure's workload is not known in advance, and it may shift over its
lifetime - e.g., between read-heavy and write-heavy, or from heavy contention
by multiple threads to single-threaded or low-frequency use. One idea is to
switch implementations adaptively, but it is nontrivial to switch the
implementation of a concurrent data structure at runtime. Performing the
transition requires a concurrent snapshot of data structure contents, which
normally demands special engineering in the data structure's design. However,
in this paper we identify and formalize an relevant property of lock-free
algorithms. Namely, lock-freedom is sufficient to guarantee that freezing
memory locations in an arbitrary order will result in a valid snapshot. Several
functional languages have data structures that freeze and thaw, transitioning
between mutable and immutable, such as Haskell vectors and Clojure transients,
but these enable only single-threaded writers. We generalize this approach to
augment an arbitrary lock-free data structure with the ability to gradually
freeze and optionally transition to a new representation. This augmentation
doesn't require changing the algorithm or code for the data structure, only
replacing its datatype for mutable references with a freezable variant. In this
paper, we present an algorithm for lifting plain to adaptive data and prove
that the resulting hybrid data structure is itself lock-free, linearizable, and
simulates the original. We also perform an empirical case study in the context
of heating up and cooling down concurrent maps.Comment: To be published in ACM SIGPLAN Haskell Symposium 201
Slot Games for Detecting Timing Leaks of Programs
In this paper we describe a method for verifying secure information flow of
programs, where apart from direct and indirect flows a secret information can
be leaked through covert timing channels. That is, no two computations of a
program that differ only on high-security inputs can be distinguished by
low-security outputs and timing differences. We attack this problem by using
slot-game semantics for a quantitative analysis of programs. We show how
slot-games model can be used for performing a precise security analysis of
programs, that takes into account both extensional and intensional properties
of programs. The practicality of this approach for automated verification is
also shown.Comment: In Proceedings GandALF 2013, arXiv:1307.416
Observably Deterministic Concurrent Strategies and Intensional Full Abstraction for Parallel-or
International audienceAlthough Plotkin's parallel-or is inherently deterministic, it has a non-deterministic interpretation in games based on (prime) event structures-in which an event has a unique causal history-because they do not directly support disjunctive causality. General event structures can express disjunctive causality and have a more permissive notion of determinism, but do not support hiding. We show that (structures equivalent to) deterministic general event structures do support hiding, and construct a new category of games based on them with a deterministic interpretation of aPCFpor, an affine variant of PCF extended with parallel-or. We then exploit this deterministic interpretation to give a relaxed notion of determinism (observable determinism) on the plain event structures model. Putting this together with our previously introduced concurrent notions of well-bracketing and innocence, we obtain an intensionally fully abstract model of aPCFpor
Resource modalities in game semantics
The description of resources in game semantics has never achieved the
simplicity and precision of linear logic, because of a misleading conception:
the belief that linear logic is more primitive than game semantics. We advocate
instead the contrary: that game semantics is conceptually more primitive than
linear logic. Starting from this revised point of view, we design a categorical
model of resources in game semantics, and construct an arena game model where
the usual notion of bracketing is extended to multi- bracketing in order to
capture various resource policies: linear, affine and exponential
- …