72 research outputs found
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 Type System For Call-By-Name Exceptions
We present an extension of System F with call-by-name exceptions. The type
system is enriched with two syntactic constructs: a union type for programs
whose execution may raise an exception at top level, and a corruption type for
programs that may raise an exception in any evaluation context (not necessarily
at top level). We present the syntax and reduction rules of the system, as well
as its typing and subtyping rules. We then study its properties, such as
confluence. Finally, we construct a realizability model using orthogonality
techniques, from which we deduce that well-typed programs are weakly
normalizing and that the ones who have the type of natural numbers really
compute a natural number, without raising exceptions.Comment: 25 page
A Type-Theoretic Foundation of Delimited Continuations
International audienceThere is a correspondence between classical logic and programming language calculi with first-class continuations. With the addition of control delimiters, the continuations become composable and the calculi become more expressive. We present a fine-grained analysis of control delimiters and formalise that their addition corresponds to the addition of a single dynamically-scoped variable modelling the special top-level continuation. From a type perspective, the dynamically-scoped variable requires effect annotations. In the presence of control, the dynamically-scoped variable can be interpreted in a purely functional way by applying a store-passing style. At the type level, the effect annotations are mapped within standard classical logic extended with the dual of implication, namely subtraction. A continuation-passing-style transformation of lambda-calculus with control and subtraction is defined. Combining the translations provides a decomposition of standard CPS transformations for delimited continuations. Incidentally, we also give a direct normalisation proof of the simply-typed lambda-calculus with control and subtraction
Linear and Affine Typing of Continuation-Passing Style
Submitted for the degree of Doctor of Philosophy, Queen Mary, University of Londo
Calculating correct compilers
In this article we present a new approach to the problem of calculating compilers. In particular, we develop a simple but general technique that allows us to derive correct compilers from high- level semantics by systematic calculation, with all details of the implementation of the compilers falling naturally out of the calculation process. Our approach is based upon the use of standard equational reasoning techniques, and has been applied to calculate compilers for a wide range of language features and their combination, including arithmetic expressions, exceptions, state, various forms of lambda calculi, bounded and unbounded loops, non-determinism, and interrupts. All the calculations in the article have been formalised using the Coq proof assistant, which serves as a convenient interactive tool for developing and verifying the calculations
Recommended from our members
Citizenship, Normativity and Well-being: an Exploratory Analysis of the Life Narratives of Men in Civil Partnerships in the UK
Countries around the world provide various forms of legal recognition for same-sex relationships. In the UK, legal recognition for same-sex relationships first became available in 2005 with the introduction of civil partnership (CP) which remained the only option until 2014 when same-sex civil marriage legislation was passed in England, Wales and Scotland. In a context of heated debate and speculation, this thesis contributes to emerging literature on individual’s experiences of legal forms of same-sex relationship recognition by exploring how CP is experienced, given meaning, and situated biographically. The thesis draws on personal narratives elicited through qualitative life story interviews with 28 men from across the UK. Interviews covered the life course, but were thematically focused around CP to provide insight into: motivations for entering CPs; experiences of planning, constructing, and participating in CP ceremonies and celebrations; and meanings and impacts of becoming and being civilly partnered. The resulting co-constructed narratives were systematically analysed using narrative methods. Minority stress theory, along with other relevant theories and concepts, were employed to further illuminate, analyse, and interpret participants’ narratives. Two generational core-narratives were identified in participants’ biographical accounts. Older participants told stories of struggle and resilience, and younger participants told new narratives of normality. Despite some generational differences, all participants reported experiences consistent with minority stress, including coping and resilience mechanisms, arising from their gay social identities which remain subject to residual stigma. Participants’ accounts of CP revealed that becoming and being civilly partnered was largely, but not wholly, a positive experience which can be understood in terms of the overarching, and overlapping themes of citizenship, normativity and well-being. With regard to citizenship, participants welcomed the legal rights and recognition of CP which was seen to offer varying forms and degrees of equality. In terms of normativity, some participants reported that CP confirmed their perceived normality while others thought it was a normalizing process granting them normative identities. Furthermore, while some engaged in, or were compelled to engage in, arguably normative marital practices, others felt they were resisting these. Regarding well-being, becoming and being civilly partnered seemed to mitigate minority stress and contribute to well-being. Overall, the knowledge generated from the personal narratives presented in this thesis enriches debates, contributes broadly to the social sciences literature, and provides new perspectives on, and representations of, gay men’s identities, lives, and relationships
Programming Languages and Systems
This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
Wireless Application Protocol -teknologian hyödyntäminen kansainvälisessä extranet -liiketoiminnassa
- …