-
Runtime verification and validation of functional reactive systems J. Funct. Program. (IF 0.595) Pub Date : 2020-08-26 IVAN PEREZ; HENRIK NILSSON
Many types of interactive applications, including reactive systems implemented in hardware, interactive physics simulations and games, raise particular challenges when it comes to testing and debugging. Reasons include de facto lack of reproducibility and difficulties of automatically generating suitable test data. This paper demonstrates that certain variants of functional reactive programming (FRP)
-
Typed dataspace actors J. Funct. Program. (IF 0.595) Pub Date : 2020-08-24 SAM CALDWELL; TONY GARNOCK-JONES; MATTHIAS FELLEISEN
Actors collaborate via message exchanges to reach a common goal. Experience has shown, however, that pure message-based communication is limiting and forces developers to use design patterns. The recently introduced dataspace actor model borrows ideas from the tuple space realm. It offers a tightly controlled, shared storage facility for groups of actors. In this model, actors assert facts that they
-
Elastic sheet-defined functions: Generalising spreadsheet functions to variable-size input arrays J. Funct. Program. (IF 0.595) Pub Date : 2020-08-21 MATT MCCUTCHEN; JUDITH BORGHOUTS; ANDREW D. GORDON; SIMON PEYTON JONES; ADVAIT SARKAR
Sheet-defined functions (SDFs) bring modularity and abstraction to the world of spreadsheets. Alas, end users naturally write SDFs that work over fixed-size arrays, which limits their reusability. To help end user programmers write more reusable SDFs, we describe a principled approach to generalising such functions to become elastic SDFs that work over inputs of arbitrary size. We prove that under
-
Calculating correct compilers II: Return of the register machines J. Funct. Program. (IF 0.595) Pub Date : 2020-08-20 PATRICK BAHR; GRAHAM HUTTON
In ‘Calculating Correct Compilers’ (Bahr & Hutton, 2015), we developed a new approach to calculating compilers directly from specifications of their correctness. Our approach only required elementary reasoning techniques and has been used to calculate compilers for a wide range of language features and their combination. However, the methodology was focused on stack-based target machines, whereas real
-
A focused solution to the avoidance problem J. Funct. Program. (IF 0.595) Pub Date : 2020-08-06 KARL CRARY
In ML-style module type theory, sealing often leads to situations in which type variables must leave scope, and this creates a need for signatures that avoid such variables. Unfortunately, in general, there is no best signature that avoids a variable, so modules do not always enjoy principal signatures. This observation is called the avoidance problem. In the past, the problem has been circumvented
-
Faster coroutine pipelines: A reconstruction J. Funct. Program. (IF 0.595) Pub Date : 2020-08-03 RUBEN P PIETERS; TOM SCHRIJVERS
The three-continuation approach to coroutine pipelines efficiently represents a large number of connected components. Previous work in this area introduces this alternative encoding but does not shed much light on the underlying principles for deriving this encoding from its specification. This paper gives this missing insight by deriving the three-continuation encoding based on eliminating the mutual
-
Generalized monoidal effects and handlers J. Funct. Program. (IF 0.595) Pub Date : 2020-07-28 RUBEN P. PIETERS; EXEQUIEL RIVAS; TOM SCHRIJVERS
Algebraic effects and handlers are a convenient method for structuring monadic effects with primitive effectful operations and separating the syntax from the interpretation of these operations. However, the scope of conventional handlers is limited as not all side effects are monadic in nature. This paper generalizes the notion of algebraic effects and handlers from monads to generalized monoids, which
-
PhD Abstracts J. Funct. Program. (IF 0.595) Pub Date : 2020-06-29 GRAHAM HUTTON
Many students complete PhDs in functional programming each year. As a service to the community, twice per year the Journal of Functional Programming publishes the abstracts from PhD dissertations completed during the previous year.
-
Leibniz equality is isomorphic to Martin-Löf identity, parametrically J. Funct. Program. (IF 0.595) Pub Date : 2020-06-17 ANDREAS ABEL; JESPER COCKX; DOMINIQUE DEVRIESE; AMIN TIMANY; PHILIP WADLER
Consider two widely used definitions of equality. That of Leibniz: one value equals another if any predicate that holds of the first holds of the second. And that of Martin-Löf: the type identifying one value with another is occupied if the two values are identical. The former dates back several centuries, while the latter is widely used in proof systems such as Agda and Coq. Here we show that the
-
Explicit effect subtyping J. Funct. Program. (IF 0.595) Pub Date : 2020-06-08 GEORGIOS KARACHALIAS; MATIJA PRETNAR; AMR HANY SALEH; STIEN VANDERHALLEN; TOM SCHRIJVERS
As popularity of algebraic effects and handlers increases, so does a demand for their efficient execution. Eff, an ML-like language with native support for handlers, has a subtyping-based effect system on which an effect-aware optimising compiler could be built. Unfortunately, in our experience, implementing optimisations for Eff is overly error-prone because its core language is implicitly typed,
-
Tight typings and split bounds, fully developed J. Funct. Program. (IF 0.595) Pub Date : 2020-05-19 BENIAMINO ACCATTOLI; STÉPHANE GRAHAM-LENGRAND; DELIA KESNER
Multi types – aka non-idempotent intersection types – have been used. to obtain quantitative bounds on higher-order programs, as pioneered by de Carvalho. Notably, they bound at the same time the number of evaluation steps and the size of the result. Recent results show that the number of steps can be taken as a reasonable time complexity measure. At the same time, however, these results suggest that
-
Local algebraic effect theories J. Funct. Program. (IF 0.595) Pub Date : 2020-05-11 ŽIGA LUKŠIČ; MATIJA PRETNAR
Algebraic effects are computational effects that can be described with a set of basic operations and equations between them. As many interesting effect handlers do not respect these equations, most approaches assume a trivial theory, sacrificing both reasoning power and safety. We present an alternative approach where the type system tracks equations that are observed in subparts of the program, yielding
-
Fault-tolerant functional reactive programming (extended version) J. Funct. Program. (IF 0.595) Pub Date : 2020-05-07 IVAN PEREZ; ALWYN E. GOODLOE
Highly critical application domains, like medicine and aerospace, require the use of strict design, implementation, and validation techniques. Functional languages have been used in these domains to develop synchronous dataflow programming languages for reactive systems. Causal stream functions and functional reactive programming (FRP) capture the essence of those languages in a way that is both elegant
-
Build systems à la carte: Theory and practice J. Funct. Program. (IF 0.595) Pub Date : 2020-04-21 ANDREY MOKHOV; NEIL MITCHELL; SIMON PEYTON JONES
Build systems are awesome, terrifying – and unloved. They are used by every developer around the world, but are rarely the object of study. In this paper, we offer a systematic, and executable, framework for developing and comparing build systems, viewing them as related points in a landscape rather than as isolated phenomena. By teasing apart existing build systems, we can recombine their components
-
Effekt: Capability-passing style for type- and effect-safe, extensible effect handlers in Scala J. Funct. Program. (IF 0.595) Pub Date : 2020-03-31 JONATHAN IMMANUEL BRACHTHÄUSER; PHILIPP SCHUSTER; KLAUS OSTERMANN
Effect handlers are a promising way to structure effectful programs in a modular way. We present the Scala library Effekt, which is centered around capability passing and implemented in terms of a monad for multi-prompt delimited continuations. Effekt is the first library implementation of effect handlers that supports effect safety and effect polymorphism without resorting to type-level programming
-
Doo bee doo bee doo J. Funct. Program. (IF 0.595) Pub Date : 2020-03-31 LUKAS CONVENT; SAM LINDLEY; CONOR MCBRIDE; CRAIG MCLAUGHLIN
We explore the design and implementation of Frank, a strict functional programming language with a bidirectional effect type system designed from the ground up around a novel variant of Plotkin and Pretnar’s effect handler abstraction. Effect handlers provide an abstraction for modular effectful programming: a handler acts as an interpreter for a collection of commands whose interfaces are statically
-
Many more predecessors: A representation workout J. Funct. Program. (IF 0.595) Pub Date : 2020-03-30 OLEG KISELYOV
From the outset, lambda calculus represented natural numbers through iterated application. The successor hence adds one more application, and the predecessor removes. In effect, the predecessor un-applies a term—which seemed impossible, even to Church. It took Kleene a rather oblique glance to sight a related representation of numbers, with an easier predecessor. Let us see what we can do if we look
-
Effect handlers via generalised continuations J. Funct. Program. (IF 0.595) Pub Date : 2020-03-16 DANIEL HILLERSTRÖM; SAM LINDLEY; ROBERT ATKEY
Plotkin and Pretnar’s effect handlers offer a versatile abstraction for modular programming with user-defined effects. This paper focuses on foundations for implementing effect handlers, for the three different kinds of effect handlers that have been proposed in the literature: deep, shallow, and parameterised. Traditional deep handlers are defined by folds over computation trees and are the original
-
Elaborating dependent (co)pattern matching: No pattern left behind J. Funct. Program. (IF 0.595) Pub Date : 2020-01-21 JESPER COCKX; ANDREAS ABEL
In a dependently typed language, we can guarantee correctness of our programmes by providing formal proofs. To check them, the typechecker elaborates these programs and proofs into a low-level core language. However, this core language is by nature hard to understand by mere humans, so how can we know we proved the right thing? This question occurs in particular for dependent copattern matching, a
Contents have been reproduced by permission of the publishers.