Manuel M. T. Chakravarty

dblp:21/1656 · DBLP profile ↗
← Back
35ranked-venue papers
12as first author
3since 2021 · last 2025
0009-0005-6241-5273ORCID · corroborated

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 31 · 10 first-author · 2 since 2021Systems, architecture and hardware · 2 · 1 first-authorTheory of computation · 2Security and privacy · 1 · 1 first-author · 1 since 2021
YearPublicationVenuePosition
2025 Plinth: A Plugin-Powered Language Built on Haskell (Experience Report)
abstract
The Cardano blockchain is the first to use proof of stake, offers native support for multiple currencies and is evolving toward a distributed governance model. It supports smart contracts through Plutus, a language based on System Fω with recursion. About half a dozen languages compile into Plutus, the first of which is Plinth (formerly Plutus Tx) — a language that reuses a subset of the Haskell syntax, and has been in commercial use since 2021.
Kenneth MacKenzie, Roman Kireev, Michael Peyton Jones, Philip Wadler, Manuel M. T. Chakravarty
Haskell6
2024 Translation certification for smart contracts
abstract
Compiler correctness is an old problem, but with the emergence of smart contracts on blockchains that problem presents itself in a new light. Smart contracts are self-contained pieces of software that control (valuable) assets in an adversarial environment; once committed to the blockchain, these smart contracts cannot be modified. Smart contracts are typically developed in a high-level contract language and compiled to low-level virtual machine code before being committed to the blockchain. For a smart contract user to trust a given piece of low-level code on the blockchain, they must convince themselves that (a) they are in possession of the matching source code and (b) that the compiler has correctly translated the source code to the given low-level code. Classic approaches to compiler correctness tackle the second point. We argue that translation certification also squarely addresses the first. We describe the proof architecture of a translation certification framework and demonstrate how we can model the compilation pipeline as a sequence of translation relations. We give a detailed account of such relations for most passes of the Plutus Tx compiler, which we formalised in Coq. This approach facilitates a modular verification methodology and is robust in the face of an evolving compiler implementation.
Jacco Krijnen, Manuel M. T. Chakravarty, Gabriele Keller, Wouter Swierstra
Sci. Comput. Program.2
2022 Babel Fees via Limited Liabilities
Manuel M. T. Chakravarty, Nikos Karayannidis, Aggelos Kiayias, Michael Peyton Jones, Polina Vinogradova
ACNS1
2020 Native Custom Tokens in the Extended UTXO Model
Manuel M. T. Chakravarty, James Chapman 0001, Kenneth MacKenzie, Orestis Melkonian, Jann Müller, Michael Peyton Jones, Polina Vinogradova, Philip Wadler
ISoLA (3)1
2020 UTXOsf ma: UTXO with Multi-asset Support
Manuel M. T. Chakravarty, James Chapman 0001, Kenneth MacKenzie, Orestis Melkonian, Jann Müller, Michael Peyton Jones, Polina Vinogradova, Philip Wadler, Joachim Zahnentferner
ISoLA (3)1
2017 Streaming irregular arrays
abstract
Previous work has demonstrated that it is possible to generate efficient and highly parallel code for multicore CPUs and GPUs from combinator-based array languages for a range of applications. That work, however, has been limited to operating on flat, rectangular structures without any facilities for irregularity or nesting.
Robert Clifton-Everest, Trevor L. McDonell, Manuel M. T. Chakravarty, Gabriele Keller
Haskell3
2015 Type-safe runtime code generation: accelerate to LLVM
abstract
Embedded languages are often compiled at application runtime; thus, embedded compile-time errors become application runtime errors. We argue that advanced type system features, such as GADTs and type families, play a crucial role in minimising such runtime errors. Specifically, a rigorous type discipline reduces runtime errors due to bugs in both embedded language applications and the implementation of the embedded language compiler itself. In this paper, we focus on the safety guarantees achieved by type preserving compilation. We discuss the compilation pipeline of Accelerate, a high-performance array language targeting both multicore CPUs and GPUs, where we are able to preserve types from the source language down to a low-level register language in SSA form. Specifically, we demonstrate the practicability of our approach by creating a new type-safe interface to the industrial-strength LLVM compiler infrastructure, which we used to build two new Accelerate backends that show competitive runtimes on a set of benchmarks across both CPUs and GPUs.
Trevor L. McDonell, Manuel M. T. Chakravarty, Vinod Grover, Ryan Newton
Haskell2
2014 Foreign inline code: systems demonstration
abstract
No abstract available.
Manuel M. T. Chakravarty
Haskell1
2014 Embedding Foreign Code
Robert Clifton-Everest, Trevor L. McDonell, Manuel M. T. Chakravarty, Gabriele Keller
PADL3
2013 Data flow fusion with series expressions in Haskell
abstract
Existing approaches to array fusion can deal with straight-line producer consumer pipelines, but cannot fuse branching data flows where a generated array is consumed by several different consumers. Branching data flows are common and natural to write, but a lack of fusion leads to the creation of an intermediate array at every branch point. We present a new array fusion system that handles branches, based on Waters's series expression framework, but extended to work in a functional setting. Our system also solves a related problem in stream fusion, namely the introduction of duplicate loop counters. We demonstrate speedup over existing fusion systems for several key examples.
Ben Lippmeier, Manuel M. T. Chakravarty, Gabriele Keller, Amos Robinson
Haskell2
2013 Optimising purely functional GPU programs
abstract
Purely functional, embedded array programs are a good match for SIMD hardware, such as GPUs. However, the naive compilation of such programs quickly leads to both code explosion and an excessive use of intermediate data structures. The resulting slow-down is not acceptable on target hardware that is usually chosen to achieve high performance.
Trevor L. McDonell, Manuel M. T. Chakravarty, Gabriele Keller, Ben Lippmeier
ICFP2
2012 Vectorisation avoidance
abstract
Flattening nested parallelism is a vectorising code transform that converts irregular nested parallelism into flat data parallelism. Although the result has good asymptotic performance, flattening thoroughly restructures the code. Many intermediate data structures and traversals are introduced, which may or may not be eliminated by subsequent optimisation. We present a novel program analysis to identify parts of the program where flattening would only introduce overhead, without appropriate gain. We present empirical evidence that avoiding vectorisation in these cases leads to more efficient programs than if we had applied vectorisation and then relied on array fusion to eliminate intermediates from the resulting code.
Gabriele Keller, Manuel M. T. Chakravarty, Roman Leshchinskiy, Ben Lippmeier, Simon L. Peyton Jones
Haskell2
2012 Guiding parallel array fusion with indexed types
abstract
We present a refined approach to parallel array fusion that uses indexed types to specify the internal representation of each array. Our approach aids the client programmer in reasoning about the performance of their program in terms of the source code. It also makes the intermediate code easier to transform at compile-time, resulting in faster compilation and more reliable runtimes. We demonstrate how our new approach improves both the clarity and performance of several end-user written programs, including a fluid flow solver and an interpolator for volumetric data.
Ben Lippmeier, Manuel M. T. Chakravarty, Gabriele Keller, Simon L. Peyton Jones
Haskell2
2012 Work efficient higher-order vectorisation
abstract
Existing approaches to higher-order vectorisation, also known as flattening nested data parallelism, do not preserve the asymptotic work complexity of the source program. Straightforward examples, such as sparse matrix-vector multiplication, can suffer a severe blow-up in both time and space, which limits the practicality of this method. We discuss why this problem arises, identify the mis-handling of index space transforms as the root cause, and present a solution using a refined representation of nested arrays. We have implemented this solution in Data Parallel Haskell (DPH) and present benchmarks showing that realistic programs, which used to suffer the blow-up, now have the correct asymptotic work complexity. In some cases, the asymptotic complexity of the vectorised program is even better than the original.
Ben Lippmeier, Manuel M. T. Chakravarty, Gabriele Keller, Roman Leshchinskiy, Simon L. Peyton Jones
ICFP2
2010 An llVM backend for GHC
abstract
In the presence of ever-changing computer architectures, high-quality optimising compiler backends are moving targets that require specialist knowledge and sophisticated algorithms. In this paper, we explore a new backend for the Glasgow Haskell Compiler (GHC) that leverages the Low Level Virtual Machine (LLVM), a new breed of compiler written explicitly for use by other compiler writers, not high-level programmers, that promises to enable outsourcing of low-level and architecture-dependent aspects of code generation. We discuss the conceptual challenges and our backend design. We also provide an extensive quantitative evaluation of the performance of the backend and of the code it produces.
David A. Terei, Manuel M. T. Chakravarty
Haskell2
2010 Regular, shape-polymorphic, parallel arrays in Haskell
abstract
We present a novel approach to regular, multi-dimensional arrays in Haskell. The main highlights of our approach are that it (1) is purely functional, (2) supports reuse through shape polymorphism, (3) avoids unnecessary intermediate structures rather than relying on subsequent loop fusion, and (4) supports transparent parallelisation.
Gabriele Keller, Manuel M. T. Chakravarty, Roman Leshchinskiy, Simon L. Peyton Jones, Ben Lippmeier
ICFP2
2008 ML Modules and Haskell Type Classes: A Constructive Comparison
Stefan Wehr, Manuel M. T. Chakravarty
APLAS2
2008 Harnessing the Multicores: Nested Data Parallelism in Haskell
abstract
If you want to program a parallel computer, a purely functional language like Haskell is a promising starting point. Since the language is pure, it is by-default safe for parallel evaluation, whereas imperative languages are by-default unsafe. But that doesn\'t make it easy! Indeed it has proved quite difficult to get robust, scalable performance increases through parallel functional programming, especially as the number of processors increases. A particularly promising and well-studied approach to employing large numbers of processors is data parallelism. Blelloch\'s pioneering work on NESL showed that it was possible to combine a rather flexible programming model (nested data parallelism) with a fast, scalable execution model (flat data parallelism). In this paper we describe Data Parallel Haskell, which embodies nested data parallelism in a modern, general-purpose language, implemented in a state-of-the-art compiler, GHC. We focus particularly on the vectorisation transformation, which transforms nested to flat data parallelism.
Simon L. Peyton Jones, Roman Leshchinskiy, Gabriele Keller, Manuel M. T. Chakravarty
FSTTCS4
2008 Type checking with open type functions
abstract
We report on an extension of Haskell with open type-level functions and equality constraints that unifies earlier work on GADTs, functional dependencies, and associated types. The contribution of the paper is that we identify and characterise the key technical challenge of entailment checking; and we give a novel, decidable, sound, and complete algorithm to solve it, together with some practically-important variants. Our system is implemented in GHC, and is already in active use.
Tom Schrijvers, Simon L. Peyton Jones, Manuel M. T. Chakravarty, Martin Sulzmann
ICFP3
2008 Specialising Simulator Generators for High-Performance Monte-Carlo Methods
Gabriele Keller, Hugh Chaffey-Millar, Manuel M. T. Chakravarty, Don Stewart, Christopher Barner-Kowollik
PADL3
2007 Modular type classes
abstract
ML modules and Haskell type classes have proven to be highly effective tools for program structuring. Modules emphasize explicit configuration of program components and the use of data abstraction. Type classes emphasize implicit program construction and ad hoc polymorphism. In this paper, we show how the implicitly-typed style of type class programming may be supported within the framework of an explicitly-typed module language by viewing type classes as a particular mode of use of modules. This view offers a harmonious integration of modules and type classes, where type class features, such as class hierarchies and associated types, arise naturally as uses of existing module-language constructs, such as module hierarchies and type components. In addition, programmers have explicit control over which type class instances are available for use by type inference in a given scope. We formalize our approach as a Harper-Stone-style elaboration relation, and provide a sound type inference algorithm as a guide to implementation.
Derek Dreyer, Robert Harper 0001, Manuel M. T. Chakravarty, Gabriele Keller
POPL3
2006 Running the manual: an approach to high-assurance microkernel development
abstract
We propose a development methodology for designing and prototyping high assurance microkernels, and describe our application of it. The methodology is based on rapid prototyping and iterative refinement of the microkernel in a functional programming language. The prototype provides a precise semi-formal model, which is also combined with a machine simulator to form a reference implementation capable of executing real user-level software, to obtain accurate feedback on the suitability of the kernel API during development phases. We extract from the prototype a machine-checkable formal specification in higher-order logic, which may be used to verify properties of the design, and also results in corrections to the design without the need for full verification. We found the approach leads to productive, highly iterative development where formal modelling, semi-formal design and prototyping, and end use all contribute to a more mature final design in a shorter period of time.
Philip Derrin, Kevin Elphinstone, Gerwin Klein, David A. Cock, Manuel M. T. Chakravarty
Haskell5
2006 On the Automated Synthesis of Proof-Carrying Temporal Reference Monitors
Simon Winwood, Gerwin Klein, Manuel M. T. Chakravarty
LOPSTR3
2005 Dynamic applications from the ground up
abstract
Some Lisp programs such as Emacs, but also the Linux kernel (when fully modularised) are mostly dynamic; i.e., apart from a small static core, the significant functionality is dynamically loaded. In this paper, we explore fully dynamic applications in Haskell where the static core is minimal and code is hot swappable. We demonstrate the feasibility of this architecture by two applications: Yi, an extensible editor, and Lambdabot, a plugin-based IRC robot. Benefits of the approach include hot swappable code and sophisticated application configuration and extension via embedded DSLs. We illustrate both benefits in detail at the example of a novel embedded DSL for editor interfaces.
Don Stewart, Manuel M. T. Chakravarty
Haskell2
2005 Associated type synonyms
abstract
Haskell programmers often use a multi-parameter type class in which one or more type parameters are functionally dependent on the first. Although such functional dependencies have proved quite popular in practice, they express the programmer's intent somewhat indirectly. Developing earlier work on associated data types, we propose to add functionally dependent types as type synonyms to type-class bodies. These associated type synonyms constitute an interesting new alternative to explicit functional dependencies.
Manuel M. T. Chakravarty, Gabriele Keller, Simon L. Peyton Jones
ICFP1
2005 Associated types with class
abstract
Haskell's type classes allow ad-hoc overloading, or type-indexing, of functions. A natural generalisation is to allow type-indexing of data types as well. It turns out that this idea directly supports a powerful form of abstraction called associated types, which are available in C++ using traits classes. Associated types are useful in many applications, especially for self-optimising libraries that adapt their data representations and algorithms in a type-directed manner.In this paper, we introduce and motivate associated types as a rather natural generalisation of Haskell's existing type classes. Formally, we present a type system that includes a type-directed translation into an explicitly typed target language akin to System F; the existence of this translation ensures that the addition of associated data types to an existing Haskell compiler only requires changes to the front end.
Manuel M. T. Chakravarty, Gabriele Keller, Simon L. Peyton Jones, Simon Marlow
POPL1
2004 Optimising Embedded DSLs Using Template Haskell
Sean Seefried, Manuel M. T. Chakravarty, Gabriele Keller
GPCE2
2004 Plugging Haskell in
abstract
Extension languages enable users to expand the functionality of an application without touching its source code. Commonly, these languages are dynamically typed languages, such as Lisp, Python, or domain-specific languages, which support runtime plugins via dynamic loading of components. We show that Haskell can be comfortably used as a statically typed extension language for both Haskell and foreign-language applications supported by the Haskell FFI, and that it can perform type-safe dynamic loading of plugins using dynamic types. Moreover, we discuss how plugin support is especially useful to applications where Haskell is used as an embedded domain-specific language (EDSL). We explain how to realise type-safe plugins using dynamic types, runtime compilation, and dynamic linking, exploiting infrastructure provided by the Glasgow Haskell Compiler. We demonstrate the practicability of our approach with several applications that serve as running examples.
André T. H. Pang, Don Stewart, Sean Seefried, Manuel M. T. Chakravarty
Haskell4
2004 The risks and benefits of teaching purely functional programming in first year
abstract
We argue that teaching purely functional programming as such in freshman courses is detrimental to both the curriculum as well as to promoting the paradigm. Instead, we need to focus on the more general aims of teaching elementary techniques of programming and essential concepts of computing. We support this viewpoint with experience gained during several semesters of teaching large first-year classes (up to 600 students) in Haskell. These classes consisted of computer science students as well as students from other disciplines. We have systematically gathered student feedback by conducting surveys after each semester. This article contributes an approach to the use of modern functional languages in first year courses and, based on this, advocates the use of functional languages in this setting.
Manuel M. T. Chakravarty, Gabriele Keller
J. Funct. Program.1
2001 Nepal - Nested Data Parallelism in Haskell
Manuel M. T. Chakravarty, Gabriele Keller, Roman Lechtchinsky, Wolf Pfannenstiel
Euro-Par1
2001 Functional Array Fusion
abstract
This paper introduces a new approach to optimizing array algorithms in functional languages. We are specifically aiming at an efficient implementation of irregular array algorithms that are hard to implement in conventional array languages such as Fortran. We optimize the storage layout of arrays containing complex data structures and reduce the running time of functions operating on these arrays by means of equational program transformations. In particular, this paper discusses a novel form of combinator loop fusion, which by removing intermediate structures optimizes the use of the memory hierarchy. We identify a combinator named loop P that provides a general scheme for iterating over an array and that in conjunction with an array constructor replicate P is sufficient to express a wide range of array algorithms. On this basis, we define equational transformation rules that combine traversals of loop P and replicate P as well as sequences of applications of loop P into a single loop P traversal. Our approach naturally generalizes to a parallel implementation and includes facilities for optimizing load balancing and communication. A prototype implementation based on the rewrite rule pragma of the Glasgow Haskell Compiler is significantly faster than standard Haskell arrays and approaches the speed of hand coded C for simple examples.
Manuel M. T. Chakravarty, Gabriele Keller
ICFP1
2000 More types for nested data parallel programming
abstract
This paper generalises the flattening transformation - a technique for the efficient implementation of nested data parallelism - and reconciles it with main stream functional programming. Nested data parallelism is significantly more expressive and convenient to use than the flat data parallelism typically used in conventional parallel languages like High Performance Fortran and C*. The flattening transformation of Blelloch and Sabot is a key technique for the efficient implementation of nested parallelism via flat parallelism, but originally it was severely restricted, as it did not permit general sum types, recursive types, higher-order functions, and separate compilation. Subsequent work, including some of our own, generalised the transformation and allowed higher-order functions and recursive types. In this paper, we take the final step of generalising flattening to cover the full range of types available in modern languages like Haskell and ML; furthermore, we enable the use of separate compilation. In addition, we present a completely new formulation of the transformation, which is based on the standard lambda calculus notation, and replace a previously ad-hoc transformation step by a systematic generic programming technique. First experiments demonstrate the efficiency of our approach.
Manuel M. T. Chakravarty, Gabriele Keller
ICFP1
1998 Flattening Trees
Gabriele Keller, Manuel M. T. Chakravarty
Euro-Par2
1998 GOFFIN: Higher-Order Functions Meet Concurrent Constraints
Manuel M. T. Chakravarty, Yike Guo, Hendrik C. R. Lock
Sci. Comput. Program.1
1997 Towards the Uniform Implementation of Declarative Languages
Manuel M. T. Chakravarty, Hendrik C. R. Lock
Comput. Lang.1