8,861 research outputs found
On One-Pass CPS Transformations
We bridge two distinct approaches to one-pass CPS transformations, i.e., CPS transformations that reduce administrative redexes at transformation time instead of in a post-processing phase. One approach is compositional and higher-order, and is due to Appel, Danvy and Filinski, and Wand, building on Plotkin's seminal work. The other is non-compositional and based on a syntactic theory of the lambda-calculus, and is due to Sabry and Felleisen. To relate the two approaches, we use Church encoding, Reynolds's defunctionalization, and an implementation technique for syntactic theories, refocusing, developed in the second author's PhD thesis
On One-Pass CPS Transformations
We bridge two distinct approaches to one-pass CPS transformations, i.e., CPS transformations that reduce administrative redexes at transformation time instead of in a post-processing phase. One approach is compositional and higher-order, and is independently due to Appel, Danvy and Filinski, and Wand, building on Plotkin's seminal work. The other is non-compositional and based on a reduction semantics for the lambda-calculus, and is due to Sabry and Felleisen. To relate the two approaches, we use three tools: Reynolds's defunctionalization and its left inverse, refunctionalization; a special case of fold-unfold fusion due to Ohori and Sasano, fixed-point promotion; and an implementation technique for reduction semantics due to Danvy and Nielsen, refocusing. This work is directly applicable to transforming programs into monadic normal form
Continuation-Passing C: compiling threads to events through continuations
In this paper, we introduce Continuation Passing C (CPC), a programming
language for concurrent systems in which native and cooperative threads are
unified and presented to the programmer as a single abstraction. The CPC
compiler uses a compilation technique, based on the CPS transform, that yields
efficient code and an extremely lightweight representation for contexts. We
provide a proof of the correctness of our compilation scheme. We show in
particular that lambda-lifting, a common compilation technique for functional
languages, is also correct in an imperative language like C, under some
conditions enforced by the CPC compiler. The current CPC compiler is mature
enough to write substantial programs such as Hekate, a highly concurrent
BitTorrent seeder. Our benchmark results show that CPC is as efficient, while
using significantly less space, as the most efficient thread libraries
available.Comment: Higher-Order and Symbolic Computation (2012). arXiv admin note:
substantial text overlap with arXiv:1202.324
Formal Compiler Implementation in a Logical Framework
The task of designing and implementing a compiler can be a difficult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable
Time Evolution and Deterministic Optimisation of Correlator Product States
We study a restricted class of correlator product states (CPS) for a
spin-half chain in which each spin is contained in just two overlapping
plaquettes. This class is also a restriction upon matrix product states (MPS)
with local dimension ( being the size of the overlapping regions of
plaquettes) equal to the bond dimension. We investigate the trade-off between
gains in efficiency due to this restriction against losses in fidelity. The
time-dependent variational principle formulated for these states is numerically
very stable. Moreover, it shows significant gains in efficiency compared to the
naively related matrix product states - the evolution or optimisation scales as
for the correlator product states versus for the unrestricted
matrix product state. However, much of this advantage is offset by a
significant reduction in fidelity. Correlator product states break the local
Hilbert space symmetry by the explicit selection of a local basis. We
investigate this dependence in detail and formulate the broad principles under
which correlator product states may be a useful tool. In particular, we find
that scaling with overlap/bond order may be more stable with correlator product
states allowing a more efficient extraction of critical exponents - we present
an example in which the use of correlator product states is several orders of
magnitude quicker than matrix product states.Comment: 19 pages, 14 figure
On Various Negative Translations
Several proof translations of classical mathematics into intuitionistic
mathematics have been proposed in the literature over the past century. These
are normally referred to as negative translations or double-negation
translations. Among those, the most commonly cited are translations due to
Kolmogorov, Godel, Gentzen, Kuroda and Krivine (in chronological order). In
this paper we propose a framework for explaining how these different
translations are related to each other. More precisely, we define a notion of a
(modular) simplification starting from Kolmogorov translation, which leads to a
partial order between different negative translations. In this derived
ordering, Kuroda and Krivine are minimal elements. Two new minimal translations
are introduced, with Godel and Gentzen translations sitting in between
Kolmogorov and one of these new translations.Comment: In Proceedings CL&C 2010, arXiv:1101.520
- …