4,160 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
Combining and Relating Control Effects and their Semantics
Combining local exceptions and first class continuations leads to programs
with complex control flow, as well as the possibility of expressing powerful
constructs such as resumable exceptions. We describe and compare games models
for a programming language which includes these features, as well as
higher-order references. They are obtained by contrasting methodologies: by
annotating sequences of moves with "control pointers" indicating where
exceptions are thrown and caught, and by composing the exceptions and
continuations monads.
The former approach allows an explicit representation of control flow in
games for exceptions, and hence a straightforward proof of definability (full
abstraction) by factorization, as well as offering the possibility of a
semantic approach to control flow analysis of exception-handling. However,
establishing soundness of such a concrete and complex model is a non-trivial
problem. It may be resolved by establishing a correspondence with the monad
semantics, based on erasing explicit exception moves and replacing them with
control pointers.Comment: In Proceedings COS 2013, arXiv:1309.092
Weighted Relational Models for Mobility
We investigate operational and denotational semantics for
computational and concurrent systems with mobile names which capture
their computational properties. For example, various properties of
fixed networks, such as shortest or longest path, transition
probabilities, and secure data flows, correspond to the ``sum\u27\u27 in a
semiring of the weights of paths through the network: we aim to model
networks with a dynamic topology in a similar way. Alongside rich
computational formalisms such as the lambda-calculus, these can be
represented as terms in a calculus of solos with weights from a
complete semiring , so that reduction associates a weight in R to
each reduction path.
Taking inspiration from differential nets, we develop a denotational
semantics for this calculus in the category of sets and R-weighted
relations, based on its differential and compact-closed structure, but
giving a simple, syntax-independent representation of terms as
matrices over R. We show that this corresponds to the sum in R of
the values associated to its independent reduction paths, and that our
semantics is fully abstract with respect to the observational
equivalence induced by sum-of-paths evaluation
Commuting costs and their impact on wage rates
Using data from households across Scotland this research found strong evidence that wage compensation for commuting does occur, though this is only partial. The evidence also appears to suggest that compensation for commuting costs occurs entirely through the wage rate. Additionally, there is evidence to suggest that the marginal level of compensation varies by gender. A key finding of this study is that the complex interaction between wage rates, commuting costs, work and household location decisions and the value of travel time means that, through labour supply effects, transport policy has little impact on wages. The wage appears almost insensitive to transport policy measures as the behavioural response to such measures is to alter commuting distances
Dinaturality Meets Genericity: A Game Semantics of Bounded Polymorphism
We study subtyping and parametric polymorphism, with the aim of providing direct and tractable semantic representations of type systems with these expressive features. The liveness order uses the Player-Opponent duality of game semantics to give a simple representation of subtyping: we generalize it to include graphs extracted directly from second-order intuitionistic types, and use the resulting complete lattice to interpret bounded polymorphic types in the style of System F_<:, but with a more tractable subtyping relation.
To extend this to a semantics of terms, we use the type-derived graphs as arenas, on which strategies correspond to dinatural transformations with respect to the canonical coercions ("on the nose" copycats) induced by the liveness ordering. This relationship between the interpretation of generic and subtype polymorphism thus provides the basis of the semantics of our type system
Revisiting Decidable Bounded Quantification, via Dinaturality
We use a semantic interpretation to investigate the problem of defining an
expressive but decidable type system with bounded quantification. Typechecking
in the widely studied System Fsub is undecidable thanks to an undecidable
subtyping relation, for which the culprit is the rule for subtyping bounded
quantification. Weaker versions of this rule, allowing decidable subtyping,
have been proposed. One of the resulting type systems (Kernel Fsub) lacks
expressiveness, another (System Fsubtop) lacks the minimal typing property and
thus has no evident typechecking algorithm.
We consider these rules as defining distinct forms of bounded quantification,
one for interpreting type variable abstraction, and the other for type
instantiation. By giving a semantic interpretation for both in terms of
unbounded quantification, using the dinaturality of type instantiation with
respect to subsumption, we show that they can coexist within a single type
system. This does have the minimal typing property and thus a simple
typechecking procedure.
We consider the fragments of this unified type system over types which
contain only one form of bounded quantifier. One of these is equivalent to
Kernel Fsub, while the other can type strictly more terms than System Fsubtop
but the same set of beta-normal terms. We show decidability of typechecking for
this fragment, and thus for System Fsubtop typechecking of beta-normal terms.Comment: In Mathematical Semantics of Programming Languages (MFPS) '2
A Curry-style Semantics of Interaction:From Untyped to Second-Order Lazy λμ-Calculus
We propose a “Curry-style” semantics of programs in which a nominal labelled transition system of types, characterizing observable behaviour, is overlaid on a nominal LTS of untyped computation. This leads to a notion of program equivalence as typed bisimulation. Our semantics reflects the role of types as hiding operators, firstly via an axiomatic characterization of “parallel composition with hiding” which yields a general technique for establishing congruence results for typed bisimulation, and secondly via an example which captures the hiding of implementations in abstract data types: a typed bisimulation for the (Curry-style) lazy λμ-calculus with polymorphic types. This is built on an abstract machine for CPS evaluation of λμ-terms: we first give a basic typing system for this LTS which characterizes acyclicity of the environment and local control flow, and then refine this to a polymorphic typing system which uses equational constraints on instantiated type variables, inferred from observable interaction, to capture behaviour at polymorphic and abstract types.</p
A Compositional Cost Model for the Lambda-calculus
We describe a (time) cost model for the (call-by-value) λ-calculus based on a natural presentation of its game semantics: the cost of computing a finite approximant to the denotation of a term (its evaluation tree) is the size of its smallest derivation in the semantics. This measure has an optimality property enabling compositional reasoning about cost bounds: for any term A, con C[_] and approximants a and c to the trees of A and C[A], the cost of computing c from C[A] is no more than the cost of computing a from A and c from C[a].Although the natural semantics on which it is based is nondeterministic, our cost model is reasonable: we describe a deterministic algorithm for recognizing evaluation tree approximants which satisfies it (up to a constant factor overhead) on a Random Access Machine. This requires an implementation of the λv-calculus on the RAM which is completely lazy: compositionality of costs entails that work done to evaluate any part of a term cannot be duplicated. This is achieved by a novel implementation of graph reduction for nameless explicit substitutions, to which we compile the λv-calculus via a series of linear cost reductions.</p
- …