2,601 research outputs found
Generating Bijections between HOAS and the Natural Numbers
A provably correct bijection between higher-order abstract syntax (HOAS) and
the natural numbers enables one to define a "not equals" relationship between
terms and also to have an adequate encoding of sets of terms, and maps from one
term family to another. Sets and maps are useful in many situations and are
preferably provided in a library of some sort. I have released a map and set
library for use with Twelf which can be used with any type for which a
bijection to the natural numbers exists.
Since creating such bijections is tedious and error-prone, I have created a
"bijection generator" that generates such bijections automatically together
with proofs of correctness, all in the context of Twelf.Comment: In Proceedings LFMTP 2010, arXiv:1009.218
No value restriction is needed for algebraic effects and handlers
We present a straightforward, sound Hindley-Milner polymorphic type system
for algebraic effects and handlers in a call-by-value calculus, which allows
type variable generalisation of arbitrary computations, not just values. This
result is surprising. On the one hand, the soundness of unrestricted
call-by-value Hindley-Milner polymorphism is known to fail in the presence of
computational effects such as reference cells and continuations. On the other
hand, many programming examples can be recast to use effect handlers instead of
these effects. Analysing the expressive power of effect handlers with respect
to state effects, we claim handlers cannot express reference cells, and show
they can simulate dynamically scoped state
Regular Expression Subtyping for XML Query and Update Languages
XML database query languages such as XQuery employ regular expression types
with structural subtyping. Subtyping systems typically have two presentations,
which should be equivalent: a declarative version in which the subsumption rule
may be used anywhere, and an algorithmic version in which the use of
subsumption is limited in order to make typechecking syntax-directed and
decidable. However, the XQuery standard type system circumvents this issue by
using imprecise typing rules for iteration constructs and defining only
algorithmic typechecking, and another extant proposal provides more precise
types for iteration constructs but ignores subtyping. In this paper, we
consider a core XQuery-like language with a subsumption rule and prove the
completeness of algorithmic typechecking; this is straightforward for XQuery
proper but requires some care in the presence of more precise iteration typing
disciplines. We extend this result to an XML update language we have introduced
in earlier work.Comment: ESOP 2008. Companion technical report with proof
Recommended from our members
The Computational Attitude in Music Theory
Music studies’s turn to computation during the twentieth century has engendered particular habits of thought about music, habits that remain in operation long after the music scholar has stepped away from the computer. The computational attitude is a way of thinking about music that is learned at the computer but can be applied away from it. It may be manifest in actual computer use, or in invocations of computationalism, a theory of mind whose influence on twentieth-century music theory is palpable. It may also be manifest in more informal discussions about music, which make liberal use of computational metaphors. In Chapter 1, I describe this attitude, the stakes for considering the computer as one of its instruments, and the kinds of historical sources and methodologies we might draw on to chart its ascendance. The remainder of this dissertation considers distinct and varied cases from the mid-twentieth century in which computers or computationalist musical ideas were used to pursue new musical objects, to quantify and classify musical scores as data, and to instantiate a generally music-structuralist mode of analysis.
I present an account of the decades-long effort to prepare an exhaustive and accurate catalog of the all-interval twelve-tone series (Chapter 2). This problem was first posed in the 1920s but was not solved until 1959, when the composer Hanns Jelinek collaborated with the computer engineer Heinz Zemanek to jointly develop and run a computer program. Recognizing the transformation wrought on modern statistics and communications technology by information theory, I revisit Abraham Moles’s book Information Theory and Esthetic Perception (orig. 1958) and use its vocabulary to contextualize contemporary information-theoretic work on music that various evokes the computational mind by John. R. Pierce and Mary Shannon, Wilhelm Fucks, and Henry Quastler (Chapter 3). I conclude with a detailed look into a score-segmentation algorithm of the influential American music theorist Allen Forte (Chapter 4). Forte was a skilled programmer who spent several years at MIT in the 1960s, with cutting-edge computers and the company of first-rank figures in the nascent fields of computer science and artificial intelligence. Each one of the researchers whose work is treated in these case studies—at some stage in their relationship with music—adopted what I call the computational attitude to music, to varying degrees and for diverse ends. Of the many questions this dissertation seeks to answer: what was gained by adopting such an attitude? What was lost? Having understood these past explorations of the computational attitude to music, we are better suited ask of ourselves the same questions today
An Analytical Approach to Programs as Data Objects
This essay accompanies a selection of 32 articles (referred to in bold face in the text and marginally marked in the bibliographic references) submitted to Aarhus University towards a Doctor Scientiarum degree in Computer Science.The author's previous academic degree, beyond a doctoral degree in June 1986, is an "Habilitation à diriger les recherches" from the Université Pierre et Marie Curie (Paris VI) in France; the corresponding material was submitted in September 1992 and the degree was obtained in January 1993.The present 32 articles have all been written since 1993 and while at DAIMI.Except for one other PhD student, all co-authors are or have been the author's students here in Aarhus
Linear/non-Linear Types For Embedded Domain-Specific Languages
Domain-specific languages are often embedded inside of general-purpose host languages so that the embedded language can take advantage of host-language data structures, libraries, and tools. However, when the domain-specific language uses linear types, existing techniques for embedded languages fall short. Linear type systems, which have applications in a wide variety of programming domains including mutable state, I/O, concurrency, and quantum computing, can manipulate embedded non-linear data via the linear type !σ. However, prior work has not been able to produce linear embedded languages that have full and easy access to host-language data, libraries, and tools.
This dissertation proposes a new perspective on linear, embedded, domain-specific languages derived from the linear/non-linear (LNL) interpretation of linear logic. The LNL model consists of two distinct fragments---one with linear types and another with non-linear types---and provides a simple categorical interface between the two. This dissertation identifies the linear fragment with the linear embedded language and the non-linear fragment with the general-purpose host language.
The effectiveness of this framework is illustrated via a number of examples, implemented in a variety of host languages. In Haskell, linear domain-specific languages using mutable state and concurrency can take advantage of the monad that arises from the LNL model. In Coq, the QWIRE quantum circuit language uses linearity to enforce the no-cloning axiom of quantum mechanics. In homotopy type theory, quantum transformations can be encoded as higher inductive types to simplify the presentation of a quantum equational theory. These examples serve as case studies that prove linear/non-linear type theory is a natural and expressive interface in which to embed linear domain-specific languages
- …