23,965 research outputs found
Stack semantics of type theory
We give a model of dependent type theory with one univalent universe and
propositional truncation interpreting a type as a stack, generalising the
groupoid model of type theory. As an application, we show that countable choice
cannot be proved in dependent type theory with one univalent universe and
propositional truncation
Value Types in Eiffel
Identifies a number of problems with Eiffel's expanded types in modelling value types, and proposes a backward compatible syntactic extension, and a modified semantics. The latter is also shown to be (effectively) backward compatible, in the sense that existing programs would run unaffected if compilers implemented the new semantics. The benefits of the approach are discussed, including an elegant approach to rebuilding data structure libraries
A Linear Logic Programming Language for Concurrent Programming over Graph Structures
We have designed a new logic programming language called LM (Linear Meld) for
programming graph-based algorithms in a declarative fashion. Our language is
based on linear logic, an expressive logical system where logical facts can be
consumed. Because LM integrates both classical and linear logic, LM tends to be
more expressive than other logic programming languages. LM programs are
naturally concurrent because facts are partitioned by nodes of a graph data
structure. Computation is performed at the node level while communication
happens between connected nodes. In this paper, we present the syntax and
operational semantics of our language and illustrate its use through a number
of examples.Comment: ICLP 2014, TPLP 201
Towards a Uniform Theory of Effectful State Machines
Using recent developments in coalgebraic and monad-based semantics, we
present a uniform study of various notions of machines, e.g. finite state
machines, multi-stack machines, Turing machines, valence automata, and weighted
automata. They are instances of Jacobs' notion of a T-automaton, where T is a
monad. We show that the generic language semantics for T-automata correctly
instantiates the usual language semantics for a number of known classes of
machines/languages, including regular, context-free, recursively-enumerable and
various subclasses of context free languages (e.g. deterministic and real-time
ones). Moreover, our approach provides new generic techniques for studying the
expressivity power of various machine-based models.Comment: final version accepted by TOC
A Rational Deconstruction of Landin's SECD Machine with the J Operator
Landin's SECD machine was the first abstract machine for applicative
expressions, i.e., functional programs. Landin's J operator was the first
control operator for functional languages, and was specified by an extension of
the SECD machine. We present a family of evaluation functions corresponding to
this extension of the SECD machine, using a series of elementary
transformations (transformation into continu-ation-passing style (CPS) and
defunctionalization, chiefly) and their left inverses (transformation into
direct style and refunctionalization). To this end, we modernize the SECD
machine into a bisimilar one that operates in lockstep with the original one
but that (1) does not use a data stack and (2) uses the caller-save rather than
the callee-save convention for environments. We also identify that the dump
component of the SECD machine is managed in a callee-save way. The caller-save
counterpart of the modernized SECD machine precisely corresponds to Thielecke's
double-barrelled continuations and to Felleisen's encoding of J in terms of
call/cc. We then variously characterize the J operator in terms of CPS and in
terms of delimited-control operators in the CPS hierarchy. As a byproduct, we
also present several reduction semantics for applicative expressions with the J
operator, based on Curien's original calculus of explicit substitutions. These
reduction semantics mechanically correspond to the modernized versions of the
SECD machine and to the best of our knowledge, they provide the first syntactic
theories of applicative expressions with the J operator
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
- …