Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Sam Lindley is active.

Publication


Featured researches published by Sam Lindley.


international conference on functional programming | 2013

Handlers in action

Ohad Kammar; Sam Lindley; Nicolas Oury

Plotkin and Pretnars handlers for algebraic effects occupy a sweet spot in the design space of abstractions for effectful computation. By separating effect signatures from their implementation, algebraic effects provide a high degree of modularity, allowing programmers to express effectful programs independently of the concrete interpretation of their effects. A handler is an interpretation of the effects of an algebraic computation. The handler abstraction adapts well to multiple settings: pure or impure, strict or lazy, static types or dynamic types. This is a position paper whose main aim is to popularise the handler abstraction. We give a gentle introduction to its use, a collection of illustrative examples, and a straightforward operational semantics. We describe our Haskell implementation of handlers in detail, outline the ideas behind our OCaml, SML, and Racket implementations, and present experimental results comparing handlers with existing code.


international conference on functional programming | 2013

A practical theory of language-integrated query

James Cheney; Sam Lindley; Philip Wadler

Language-integrated query is receiving renewed attention, in part because of its support through Microsofts LINQ framework. We present a practical theory of language-integrated query based on quotation and normalisation of quoted terms. Our technique supports join queries, abstraction over values and predicates, composition of queries, dynamic generation of queries, and queries with nested intermediate data. Higher-order features prove useful even for constructing first-order queries. We prove a theorem characterising when a host query is guaranteed to generate a single SQL query. We present experimental results confirming our technique works, even in situations where Microsofts LINQ framework either fails to produce an SQL query or, in one case, produces an avalanche of SQL queries.


international conference on functional programming | 2015

Generating performance portable code using rewrite rules: from high-level functional expressions to high-performance OpenCL code

Michel Steuwer; Christian Fensch; Sam Lindley; Christophe Dubach

Computers have become increasingly complex with the emergence of heterogeneous hardware combining multicore CPUs and GPUs. These parallel systems exhibit tremendous computational power at the cost of increased programming effort resulting in a tension between performance and code portability. Typically, code is either tuned in a low-level imperative language using hardware-specific optimizations to achieve maximum performance or is written in a high-level, possibly functional, language to achieve portability at the expense of performance. We propose a novel approach aiming to combine high-level programming, code portability, and high-performance. Starting from a high-level functional expression we apply a simple set of rewrite rules to transform it into a low-level functional representation, close to the OpenCL programming model, from which OpenCL code is generated. Our rewrite rules define a space of possible implementations which we automatically explore to generate hardware-specific OpenCL implementations. We formalize our system with a core dependently-typed lambda-calculus along with a denotational semantics which we use to prove the correctness of the rewrite rules. We test our design in practice by implementing a compiler which generates high performance imperative OpenCL code. Our experiments show that we can automatically derive hardware-specific implementations from simple functional high-level algorithmic expressions offering performance on a par with highly tuned code for multicore CPUs and GPUs written by experts.


Electronic Notes in Theoretical Computer Science | 2011

Idioms are Oblivious, Arrows are Meticulous, Monads are Promiscuous

Sam Lindley; Philip Wadler; Jeremy Yallop

We revisit the connection between three notions of computation: Moggi?s monads, Hughes?s arrows and McBride and Paterson?s idioms (also called applicative functors). We show that idioms are equivalent to arrows that satisfy the type isomorphism A?B?1?(A?B) and that monads are equivalent to arrows that satisfy the type isomorphism A?B?A?(1?B). Further, idioms embed into arrows and arrows embed into monads.


international conference on typed lambda calculi and applications | 2005

Reducibility and ⊤⊤-lifting for computation types

Sam Lindley; Ian Stark

We propose ⊤⊤-lifting as a technique for extending operational predicates to Moggis monadic computation types, independent of the choice of monad. We demonstrate the method with an application to Girard-Tait reducibility, using this to prove strong normalisation for the computational metalanguage λml. The particular challenge with reducibility is to apply this semantic notion at computation types when the exact meaning of “computation” (stateful, side-effecting, nondeterministic, etc.) is left unspecified. Our solution is to define reducibility for continuations and use that to support the jump from value types to computation types. The method appears robust: we apply it to show strong normalisation for the computational metalanguage extended with sums, and with exceptions. Based on these results, as well as previous work with local state, we suggest that this “leap-frog” approach offers a general method for raising concepts defined at value types up to observable properties of computations.


symposium/workshop on haskell | 2009

Unembedding domain-specific languages

Robert Atkey; Sam Lindley; Jeremy Yallop

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.


Journal of Functional Programming | 2010

The arrow calculus

Sam Lindley; Philip Wadler; Jeremy Yallop

We introduce the arrow calculus, a metalanguage for manipulating Hughess arrows with close relations both to Moggis metalanguage for monads and to Patersons arrow notation. Arrows are classically defined by extending lambda calculus with three constructs satisfying nine (somewhat idiosyncratic) laws; in contrast, the arrow calculus adds four constructs satisfying five laws (which fit two well-known patterns). The five laws were previously known to be sound; we show that they are also complete, and hence that the five laws may replace the nine.


asian symposium on programming languages and systems | 2008

The Essence of Form Abstraction

Ezra Cooper; Sam Lindley; Philip Wadler; Jeremy Yallop

Abstraction is the cornerstone of high-level programming; HTML forms are the principal medium of web interaction. However, most web programming environments do not support abstraction of form components, leading to a lack of compositionality. Using a semantics based on idioms, we show how to support compositional form construction and give a convenient syntax.


symposium/workshop on haskell | 2013

Hasochism: the pleasure and pain of dependently typed haskell programming

Sam Lindley; Conor McBride

Haskells type system has outgrown its Hindley-Milner roots to the extent that it now stretches to the basics of dependently typed programming. In this paper, we collate and classify techniques for programming with dependent types in Haskell, and contribute some new ones. In particular, through extended examples---merge-sort and rectangular tilings---we show how to exploit Haskells constraint solver as a theorem prover, delivering code which, as Agda programmers, we envy. We explore the compromises involved in simulating variations on the theme of the dependent function space in an attempt to help programmers put dependent types to work, and to inform the evolving language design both of Haskell and of dependently typed languages more broadly.


types in languages design and implementation | 2012

Row-based effect types for database integration

Sam Lindley; James Cheney

We present CoreLinks, a call-by-value variant of System F with row polymorphism, row-based effect types, and implicit subkinding, which forms the basis for the Links web programming language. We focus on extensions to CoreLinks for database programming. The effect types support abstraction over database queries, while ensuring that queries are translated predictably to idiomatic and efficient SQL at run-time. Subkinding statically enforces the constraint that queries must return a list of records of base type. Polymorphism over the presence of record labels supports abstraction over database queries, inserts, deletes and updates.

Collaboration


Dive into the Sam Lindley's collaboration.

Top Co-Authors

Avatar
Top Co-Authors

Avatar

James Cheney

University of Edinburgh

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Robert Atkey

University of Strathclyde

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Conor McBride

University of Strathclyde

View shared research outputs
Top Co-Authors

Avatar

Ezra Cooper

University of Edinburgh

View shared research outputs
Top Co-Authors

Avatar

Heiko Müller

Humboldt University of Berlin

View shared research outputs
Top Co-Authors

Avatar
Researchain Logo
Decentralizing Knowledge