Results 1 - 10
of
11
Unembedding Domain-Specific Languages
"... Higher-order abstract syntax provides a convenient way of embedding domain-specific languages, but is awkward to analyse and manipulate directly. We explore the boundaries of higher-order abstract syntax. Our key tool is the unembedding of embedded terms as de Bruijn terms, enabling intensional anal ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Higher-order abstract syntax provides a convenient way of embedding domain-specific languages, but is awkward to analyse and manipulate directly. We explore the boundaries of higher-order abstract syntax. Our key tool is the unembedding of embedded terms as de Bruijn terms, enabling intensional analysis. As part of our solution we present techniques for separating the definition of an embedded program from its interpretation, giving modular extensions of the embedded language, and different ways to encode the types of the embedded language.
A Deep Embedding of Parametric Polymorphism in Coq
"... We describe a deep embedding of System F inside Coq, along with a denotational semantics that supports reasoning using Reynolds parametricity [4]. The denotations of System F types are given exactly by objects of sort Set in Coq, and the relations ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We describe a deep embedding of System F inside Coq, along with a denotational semantics that supports reasoning using Reynolds parametricity [4]. The denotations of System F types are given exactly by objects of sort Set in Coq, and the relations
Adding Equations to System F Types
"... Abstract. System F, the polymorphic lambda calculus, is well-known for its rich equational theory. In this paper, we study internalizing the equational theory of System F by extending it with a type of term-level equations. This results in a core calculus suitable for formalizing features such as Ha ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Abstract. System F, the polymorphic lambda calculus, is well-known for its rich equational theory. In this paper, we study internalizing the equational theory of System F by extending it with a type of term-level equations. This results in a core calculus suitable for formalizing features such as Haskell’s rewriting rules mechanism or Extended ML signatures. 1
Effects in functional and dependently-typed programming
"... Effectful programming is supported in Haskell by compilers which provide primitive effectful operations, together with functions to combine these operations into larger programs. Unfortunately, this makes the task of reasoning about the correctness of and understanding the behaviour of programs with ..."
Abstract
- Add to MetaCart
Effectful programming is supported in Haskell by compilers which provide primitive effectful operations, together with functions to combine these operations into larger programs. Unfortunately, this makes the task of reasoning about the correctness of and understanding the behaviour of programs with effects into a difficult problem. In the first part of this report, we survey the technologies that have been developed to express effects when programming in a functional language. We then move on to discuss some techniques which are used for reasoning about these programs, as well as developing correct-by-construction programs which are guaranteed to match their specifications. We move on to discuss a potential new model for specifying local state (á la the ST monad), along with an initial prototype in the dependently-typed functional programming language Agda. This model specifies the effect that computations have on the heap which
Accumulating bindings
"... We give a Haskell implementation of Filinski’s normalisation by evaluation algorithm for the computational lambda-calculus with sums. Taking advantage of extensions to the GHC compiler, our implementation represents object language types as Haskell types and ensures that type errors are detected sta ..."
Abstract
- Add to MetaCart
We give a Haskell implementation of Filinski’s normalisation by evaluation algorithm for the computational lambda-calculus with sums. Taking advantage of extensions to the GHC compiler, our implementation represents object language types as Haskell types and ensures that type errors are detected statically. Following Filinski, the implementation is parameterised over a residualising monad. The standard residualising monad for sums is a continuation monad. Defunctionalising the uses of the continuation monad we present the binding tree monad as an alternative. 1
General Terms
"... Higher-order abstract syntax provides a convenient way of embedding domain-specific languages, but is awkward to analyse and manipulate directly. We explore the boundaries of higher-order abstract syntax. Our key tool is the unembedding of embedded terms as de Bruijn terms, enabling intensional anal ..."
Abstract
- Add to MetaCart
Higher-order abstract syntax provides a convenient way of embedding domain-specific languages, but is awkward to analyse and manipulate directly. We explore the boundaries of higher-order abstract syntax. Our key tool is the unembedding of embedded terms as de Bruijn terms, enabling intensional analysis. As part of our solution we present techniques for separating the definition of an embedded program from its interpretation, giving modular extensions of the embedded language, and different ways to encode the types of the embedded language.
Categories and Subject Descriptors D.3.3 [Programming Languages]:
"... A wide range of computer programs, including compilers and theorem provers, manipulate data structures that involve names and binding. However, the design of programming idioms which allow performing these manipulations in a safe and natural style has, to a large extent, remained elusive. In this pa ..."
Abstract
- Add to MetaCart
A wide range of computer programs, including compilers and theorem provers, manipulate data structures that involve names and binding. However, the design of programming idioms which allow performing these manipulations in a safe and natural style has, to a large extent, remained elusive. In this paper, we present a novel approach to the problem. Our proposal can be viewed either as a programming language design or as a library: in fact, it is currently implemented within Agda. It provides a safe and expressive means of programming with names and binders. It is abstract enough to support multiple concrete implementations: we present one in nominal style and one in de Bruijn style. We use logical relations to prove that “well-typed programs do not mix names with different scope”. We exhibit an adequate encoding of Pitts-style nominal terms into our system.
General Terms Languages, Theory
"... This millennium has seen a great deal of research into embedded domain-specific languages. Primarily, such languages are simplytyped. Focusing on System F, we demonstrate how to embed polymorphic domain specific languages in Haskell and OCaml. We exploit recent language extensions including kind pol ..."
Abstract
- Add to MetaCart
This millennium has seen a great deal of research into embedded domain-specific languages. Primarily, such languages are simplytyped. Focusing on System F, we demonstrate how to embed polymorphic domain specific languages in Haskell and OCaml. We exploit recent language extensions including kind polymorphism and first-class modules. Categories and Subject Descriptors D.3.1 [Programming Languages]:
A Relationally Parametric Model of the Calculus of Constructions
"... In this paper, we give the first relationally parametric model of the (extensional) calculus of constructions. Our model remains as simple as traditional PER models of dependent types, but unlike them, our model additionally permits relating terms at different implementation types. Using this model, ..."
Abstract
- Add to MetaCart
In this paper, we give the first relationally parametric model of the (extensional) calculus of constructions. Our model remains as simple as traditional PER models of dependent types, but unlike them, our model additionally permits relating terms at different implementation types. Using this model, we can validate the soundness of quotient types, as well as derive strong equality axioms for Church-encoded data, such as the eta-law for strong dependent pair types. 1.
Generic Conversions of Abstract Syntax Representations
"... In this paper we present a datatype-generic approach to syntax with variable binding. A universe specifies the binding and scoping structure of object languages, including binders that bind multiple variables as well as sequential and recursive scoping. Two interpretations of the universe are given: ..."
Abstract
- Add to MetaCart
In this paper we present a datatype-generic approach to syntax with variable binding. A universe specifies the binding and scoping structure of object languages, including binders that bind multiple variables as well as sequential and recursive scoping. Two interpretations of the universe are given: one based on parametric higher-order abstract syntax and one on well-typed de Bruijn indices. The former provides convenient interfaces to embedded domain-specific languages, but is awkward to analyse and manipulate directly, while the latter is a convenient representation in implementations, but is unusable as a surface language. We show how to generically convert from the parametric HOAS interpretation to the de Bruijn interpretation thereby taking the pain from DSL developer to write the conversion themselves.

