样式: 排序: IF: - GO 导出 标记为已读
-
Asymptotic speedup via effect handlers J. Funct. Program. (IF 1.1) Pub Date : 2024-04-05 DANIEL HILLERSTRÖM, SAM LINDLEY, JOHN LONGLEY
We study a fundamental efficiency benefit afforded by delimited control, showing that for certain higher-order functions, a language with advanced control features offers an asymptotic improvement in runtime over a language without them. Specifically, we consider the generic count problem in the context of a pure functional base language ${\lambda_{\textrm{b}}}$ and an extension ${\lambda_{\textrm{h}}}$
-
Static Blame for gradual typing J. Funct. Program. (IF 1.1) Pub Date : 2024-03-25 CHENGHAO SU, LIN CHEN, LI YANHUI, YUMING ZHOU
Gradual typing integrates static and dynamic typing by introducing a dynamic type and a consistency relation. A problem of gradual type systems is that dynamic types can easily hide erroneous data flows since consistency relations are not transitive. Therefore, a more rigorous static check is required to reveal these hidden data flows statically. However, in order to preserve the expressiveness of
-
Knuth–Morris–Pratt illustrated J. Funct. Program. (IF 1.1) Pub Date : 2024-01-30 CAMERON MOY
The Knuth–Morris–Pratt (KMP) algorithm for string search is notoriously difficult to understand. Lost in a sea of index arithmetic, most explanations of KMP obscure its essence. This paper constructs KMP incrementally, using pictures to illustrate each step. The end result is easier to comprehend. Additionally, the derivation uses only elementary functional programming techniques.
-
Sparcl: A language for partially invertible computation J. Funct. Program. (IF 1.1) Pub Date : 2024-01-26 KAZUTAKA MATSUDA, MENG WANG
Invertibility is a fundamental concept in computer science, with various manifestations in software development (serializer/deserializer, parser/printer, redo/undo, compressor/decompressor, and so on). Full invertibility necessarily requires bijectivity, but the direct approach of composing bijective functions to develop invertible programs is too restrictive to be useful. In this paper, we take a
-
Alice or Bob?: Process polymorphism in choreographies J. Funct. Program. (IF 1.1) Pub Date : 2024-01-23 EVA GRAVERSEN, ANDREW K. HIRSCH, FABRIZIO MONTESI
We present PolyChor $\lambda$ , a language for higher-order functional choreographic programming—an emerging paradigm for concurrent programming. In choreographic programming, programmers write the desired cooperative behaviour of a system of processes and then compile it into an implementation for each process, a translation called endpoint projection. Unlike its predecessor, Chor $\lambda$ , PolyChor
-
Trace contracts J. Funct. Program. (IF 1.1) Pub Date : 2023-12-13 CAMERON MOY, MATTHIAS FELLEISEN
Behavioral software contracts allow programmers to strengthen the obligations and promises that they express with conventional types. They lack expressive power, though, when it comes to invariants that hold across several function calls. Trace contracts narrow this expressiveness gap. A trace contract is a predicate over the sequence of values that flow through function calls and returns. This paper
-
Level-p-complexity of Boolean functions using thinning, memoization, and polynomials J. Funct. Program. (IF 1.1) Pub Date : 2023-12-12 JULIA JANSSON, PATRIK JANSSON
This paper describes a purely functional library for computing level-p-complexity of Boolean functions and applies it to two-level iterated majority. Boolean functions are simply functions from n bits to one bit, and they can describe digital circuits, voting systems, etc. An example of a Boolean function is majority, which returns the value that has majority among the n input bits for odd n. The complexity
-
Certified, total serialisers with an application to Huffman encoding J. Funct. Program. (IF 1.1) Pub Date : 2023-12-12 RALF HINZE
The other day, I was assembling lecture material for a course on Agda. Pursuing an application-driven approach, I was looking for correctness proofs of popular algorithms. One of my all-time favourites is Huffman data compression (Huffman, 1952). Even though it is probably safe to assume that you are familiar with this algorithmic gem, a brief reminder of the essential idea may not be amiss.
-
A correct-by-construction conversion from lambda calculus to combinatory logic J. Funct. Program. (IF 1.1) Pub Date : 2023-11-22 WOUTER SWIERSTRA
This pearl defines a translation from well-typed lambda terms to combinatory logic, where both the preservation of types and the correctness of the translation are enforced statically.
-
Contract lenses: Reasoning about bidirectional programs via calculation J. Funct. Program. (IF 1.1) Pub Date : 2023-11-06 HANLIANG ZHANG, WENHAO TANG, RUIFENG XIE, MENG WANG, ZHENJIANG HU
Bidirectional transformations (BXs) are a mechanism for maintaining consistency between multiple representations of related data. The lens framework, which usually constructs BXs from lens combinators, has become the mainstream approach to BX programming because of its modularity and correctness by construction. However, the involved bidirectional behaviors of lenses make the equational reasoning and
-
Programming language semantics: It’s easy as 1,2,3 J. Funct. Program. (IF 1.1) Pub Date : 2023-10-26 GRAHAM HUTTON
Programming language semantics is an important topic in theoretical computer science, but one that beginners often find challenging. This article provides a tutorial introduction to the subject, in which the language of integers and addition is used as a minimal setting in which to present a range of semantic concepts in simple manner. In this setting, it is easy as 1,2,3.
-
A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go J. Funct. Program. (IF 1.1) Pub Date : 2023-10-09 MARTIN SULZMANN, STEFAN WEHR
Featherweight Generic Go (FGG) is a minimal core calculus modeling the essential features of the programming language Go. It includes support for overloaded methods, interface types, structural subtyping, and generics. The most straightforward semantic description of the dynamic behavior of FGG programs is to resolve method calls based on runtime type information of the receiver. This article shows
-
Normalization by evaluation for modal dependent type theory J. Funct. Program. (IF 1.1) Pub Date : 2023-10-02 JASON Z. S. HU, JUNYOUNG JANG, BRIGITTE PIENTKA
We present the Kripke-style modal type theory, Mint, which combines dependent types and the necessity modality. It extends the Kripke-style modal lambda-calculus by Pfenning and Davies to the full Martin-Löf type theory. As such it encompasses dependently typed variants of system K, T, K4, and S4. Further, Mint seamlessly supports a full universe hierarchy, usual inductive types, and large eliminations
-
Read/write factorizable programs J. Funct. Program. (IF 1.1) Pub Date : 2023-06-08 SIDDHARTH BHASKAR, JAKOB GRUE SIMONSEN
In the cons-free programming paradigm, we eschew constructors and program using only destructors. Cons-free programs in a simple first-order language with string data capture exactly P, the class of polynomial-time relations. By varying the underlying language and considering other data types, we can capture several other complexity classes. However, no cons-free programming language captures any functional
-
Classical (co)recursion: Mechanics J. Funct. Program. (IF 1.1) Pub Date : 2023-04-04 PAUL DOWNEN, ZENA M. ARIOLA
Recursion is a mature, well-understood topic in the theory and practice of programming. Yet its dual, corecursion is underappreciated and still seen as exotic. We aim to put them both on equal footing by giving a foundation for primitive corecursion based on computation, giving a terminating calculus analogous to the original computational foundation of recursion. We show how the implementation details
-
Folding left and right matters: Direct style, accumulators, and continuations J. Funct. Program. (IF 1.1) Pub Date : 2023-02-14 OLIVIER DANVY
The equivalence of folding left and right over Peano numbers and lists makes it possible to minimalistically inter-derive (1) structurally recursive functions in direct style, (2) structurally tail-recursive functions that use an accumulator, and (3) structurally tail-recursive functions in delimited continuation-passing style, using Ohori and Sasano’s lightweight fusion by fixed-point promotion. When
-
Is sized typing for Coq practical? J. Funct. Program. (IF 1.1) Pub Date : 2023-01-24 JONATHAN CHAN, YUFENG LI, WILLIAM J. BOWMAN
Contemporary proof assistants such as Coq require that recursive functions be terminating and corecursive functions be productive to maintain logical consistency of their type theories, and some ensure these properties using syntactic checks. However, being syntactic, they are inherently delicate and restrictive, preventing users from easily writing obviously terminating or productive functions at
-
Modal FRP for all: Functional reactive programming without space leaks in Haskell J. Funct. Program. (IF 1.1) Pub Date : 2022-12-26 PATRICK BAHR
Functional reactive programming (FRP) provides a high-level interface for implementing reactive systems in a declarative manner. However, this high-level interface has to be carefully reigned in to ensure that programs can in fact be executed in practice. Specifically, one must ensure that FRP programs are causal and can be implemented without introducing space leaks. In recent years, modal types have
-
Send to me first: Priority in synchronous message-passing J. Funct. Program. (IF 1.1) Pub Date : 2022-12-22 CHENG-EN CHUANG, GRANT IRACI, LUKASZ ZIAREK
In this paper, we introduce a tiered-priority scheme for a synchronous message-passing language with support for selective communication and first-class communication protocols. Crucially, our scheme allows higher priority threads to communicate with lower priority threads, providing the ability to express programs that would be rejected by classic priority mechanisms that disallow any (potentially)
-
Migrating gradual types J. Funct. Program. (IF 1.1) Pub Date : 2022-10-06 JOHN PETER CAMPORA, SHENG CHEN, MARTIN ERWIG, ERIC WALKINGSHAW
Gradual typing allows programs to enjoy the benefits of both static typing and dynamic typing. While it is often desirable to migrate a program from more dynamically typed to more statically typed or vice versa, gradual typing itself does not provide a way to facilitate this migration. This places the burden on programmers who have to manually add or remove type annotations. Besides the general challenge
-
Fold–unfold lemmas for reasoning about recursive programs using the Coq proof assistant J. Funct. Program. (IF 1.1) Pub Date : 2022-09-29 OLIVIER DANVY
Fold–unfold lemmas complement the rewrite tactic in the Coq Proof Assistant to reason about recursive functions, be they defined locally or globally. Each of the structural cases gives rise to a fold–unfold lemma that equates a call to this function in that case with the corresponding case branch. As such, they are “boilerplate” and can be generated mechanically, though stating them by hand is a learning
-
ANF preserves dependent types up to extensional equality J. Funct. Program. (IF 1.1) Pub Date : 2022-09-16 PAULETTE KORONKEVICH, RAMON RAKOW, AMAL AHMED, WILLIAM J. BOWMAN
Many programmers use dependently typed languages such as Coq to machine-verify high-assurance software. However, existing compilers for these languages provide no guarantees after compiling, nor when linking after compilation. Type-preserving compilers preserve guarantees encoded in types and then use type checking to verify compiled code and ensure safe linking with external code. Unfortunately, standard
-
Extracting functional programs from Coq, in Coq J. Funct. Program. (IF 1.1) Pub Date : 2022-08-22 DANIL ANNENKOV, MIKKEL MILO, JAKOB BOTSCH NIELSEN, BAS SPITTERS
We implement extraction of Coq programs to functional languages based on MetaCoq’s certified erasure. We extend the MetaCoq erasure output language with typing information and use it as an intermediate representation, which we call ${\lambda^T_\square}$ . We complement the extraction functionality with a full pipeline that includes several standard transformations (e.g. eta-expansion and inlining)
-
A well-known representation of monoids and its application to the function ‘vector reverse’ J. Funct. Program. (IF 1.1) Pub Date : 2022-08-08 WOUTER SWIERSTRA
Vectors—or length-indexed lists—are classic example of a dependent type. Yet, most tutorials stay clear of any function on vectors whose definition requires non-trivial equalities between natural numbers to type check. This pearl shows how to write functions, such as vector reverse, that rely on monoidal equalities to be type correct without having to write any additional proofs. These techniques can
-
Iterating on multiple collections in synchrony J. Funct. Program. (IF 1.1) Pub Date : 2022-07-05 STEFANO PERNA, VAL TANNEN, LIMSOON WONG
Modern programming languages typically provide some form of comprehension syntax which renders programs manipulating collection types more readable and understandable. However, comprehension syntax corresponds to nested loops in general. There is no simple way of using it to express efficient general synchronized iterations on multiple ordered collections, such as linear-time algorithms for low-selectivity
-
Denotational semantics as a foundation for cost recurrence extraction for functional languages J. Funct. Program. (IF 1.1) Pub Date : 2022-07-05 NORMAN DANNER, DANIEL R. LICATA
A standard informal method for analyzing the asymptotic complexity of a program is to extract a recurrence that describes its cost in terms of the size of its input and then to compute a closed-form upper bound on that recurrence. We give a formal account of that method for functional programs in a higher order language with $\mathtt{let}$-polymorphism. The method consists of two phases. In the first
-
Back to futures J. Funct. Program. (IF 1.1) Pub Date : 2022-02-28 KLAAS PRUIKSMA, FRANK PFENNING
Common approaches to concurrent programming begin with languages whose semantics are naturally sequential and add new constructs that provide limited access to concurrency, as exemplified by futures. This approach has been quite successful, but often does not provide a satisfactory theoretical backing for the concurrency constructs, and it can be difficult to give a good semantics that allows a programmer
-
Fregel: a functional domain-specific language for vertex-centric large-scale graph processing J. Funct. Program. (IF 1.1) Pub Date : 2022-01-20 HIDEYA IWASAKI, KENTO EMOTO, AKIMASA MORIHATA, KIMINORI MATSUZAKI, ZHENJIANG HU
The vertex-centric programming model is now widely used for processing large graphs. User-defined vertex programs are executed in parallel over every vertex of a graph, but the imperative and explicit message-passing style of existing systems makes defining a vertex program unintuitive and difficult. This article presents Fregel, a purely functional domain-specific language for processing large graphs
-
PhD Abstracts J. Funct. Program. (IF 1.1) Pub Date : 2022-01-06 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. The abstracts are made freely available on the JFP website, i.e. not behind any paywall. They do not require any transfer of copyright, merely a license from the author
-
On being a PhD student of Robert Harper J. Funct. Program. (IF 1.1) Pub Date : 2022-01-05 DEREK DREYER, BENJAMIN C. PIERCE
The Robert Harper Festschrift includes articles by three of Bob’s students and colleagues—Karl Crary, Andrzej Filinski, and Jonathan Sterling. Each of these articles touches on themes that are central to Bob’s research: module system design, proof-directed program development, and (to use Bob’s term) “computational trinitarianism”. In this foreword to the Festschrift, we have additionally compiled
-
Super-naturals J. Funct. Program. (IF 1.1) Pub Date : 2022-01-01 RALF HINZE,COLIN RUNCIMAN
© The Author(s), 2022. Published by Cambridge University Press. This is an Open 1 Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives licence (https://creativecommons.org/licenses/by-nc-nd/4.0/), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the original work is unaltered and is properly cited. The
-
-
Longest segment of balanced parentheses: an exercise in program inversion in a segment problem J. Funct. Program. (IF 1.1) Pub Date : 2021-11-25 SHIN-CHENG MU, TSUNG-JU CHIANG
Given a string of parentheses, the task is to find the longest consecutive segment that is balanced, in linear time. We find this problem interesting because it involves a combination of techniques: the usual approach for solving segment problems and a theorem for constructing the inverse of a function—through which we derive an instance of shift-reduce parsing.
-
Parameterized cast calculi and reusable meta-theory for gradually typed lambda calculi J. Funct. Program. (IF 1.1) Pub Date : 2021-11-11 JEREMY G. SIEK, TIANYU CHEN
The research on gradual typing has led to many variations on the Gradually Typed Lambda Calculus (GTLC) of Siek & Taha (2006) and its underlying cast calculus. For example, Wadler and Findler (2009) added blame tracking, Siek et al. (2009) investigated alternate cast evaluation strategies, and Herman et al. (2010) replaced casts with coercions for space efficiency. The meta-theory for the GTLC has
-
A greedy algorithm for dropping digits J. Funct. Program. (IF 1.1) Pub Date : 2021-11-04 RICHARD BIRD, SHIN-CHENG MU
Consider the following puzzle: given a number, remove k digits such that the resulting number is as large as possible. Various techniques are employed to derive a linear-time solution to the puzzle: we justify the structure of a greedy algorithm by predicate logic, give a constructive proof of the greedy condition using a dependently typed proof assistant and calculate the greedy step as well as the
-
Taming the Merge Operator J. Funct. Program. (IF 1.1) Pub Date : 2021-11-02 XUEJING HUANG, JINXU ZHAO, BRUNO C. D. S. OLIVEIRA
Calculi with disjoint intersection types support a symmetric merge operator with subtyping. The merge operator generalizes record concatenation to any type, enabling expressive forms of object composition, and simple solutions to hard modularity problems. Unfortunately, recent calculi with disjoint intersection types and the merge operator lack a (direct) operational semantics with expected properties
-
Relational cost analysis in a functional-imperative setting J. Funct. Program. (IF 1.1) Pub Date : 2021-11-02 WEIHAO QU, MARCO GABOARDI, DEEPAK GARG
Relational cost analysis aims at formally establishing bounds on the difference in the evaluation costs of two programs. As a particular case, one can also use relational cost analysis to establish bounds on the difference in the evaluation cost of the same program on two different inputs. One way to perform relational cost analysis is to use a relational type-and-effect system that supports reasoning
-
On the correctness of monadic backward induction J. Funct. Program. (IF 1.1) Pub Date : 2021-10-29 NURIA BREDE, NICOLA BOTTA
In control theory, to solve a finite-horizon sequential decision problem (SDP) commonly means to find a list of decision rules that result in an optimal expected total reward (or cost) when taking a given number of decision steps. SDPs are routinely solved using Bellman’s backward induction. Textbook authors (e.g. Bertsekas or Puterman) typically give more or less formal proofs to show that the backward
-
Cogent: uniqueness types and certifying compilation J. Funct. Program. (IF 1.1) Pub Date : 2021-10-27 LIAM O’CONNOR, ZILIN CHEN, CHRISTINE RIZKALLAH, VINCENT JACKSON, SIDNEY AMANI, GERWIN KLEIN, TOBY MURRAY, THOMAS SEWELL, GABRIELE KELLER
This paper presents a framework aimed at significantly reducing the cost of proving functional correctness for low-level operating systems components. The framework is designed around a new functional programming language, Cogent. A central aspect of the language is its uniqueness type system, which eliminates the need for a trusted runtime or garbage collector while still guaranteeing memory safety
-
Extensional equality preservation and verified generic programming J. Funct. Program. (IF 1.1) Pub Date : 2021-10-21 NICOLA BOTTA, NURIA BREDE, PATRIK JANSSON, TIM RICHTER
In verified generic programming, one cannot exploit the structure of concrete data types but has to rely on well chosen sets of specifications or abstract data types (ADTs). Functors and monads are at the core of many applications of functional programming. This raises the question of what useful ADTs for verified functors and monads could look like. The functorial map of many important monads preserves
-
Segments: An alternative rainfall problem J. Funct. Program. (IF 1.1) Pub Date : 2021-10-19 PETER ACHTEN
Elliot Soloway’s Rainfall problem is a well-known and well-studied problem to investigate the problem-solving strategies of programmers. Kathi Fisler investigated this programming challenge from the point of view of functional programmers. She showed that this particular challenge gives rise to five different high-level solution strategies, of which three are predominant and cover over 80% of all chosen
-
A type- and scope-safe universe of syntaxes with binding: their semantics and proofs J. Funct. Program. (IF 1.1) Pub Date : 2021-10-19 GUILLAUME ALLAIS, ROBERT ATKEY, JAMES CHAPMAN, CONOR MCBRIDE, JAMES MCKINNA
The syntax of almost every programming language includes a notion of binder and corresponding bound occurrences, along with the accompanying notions of α-equivalence, capture-avoiding substitution, typing contexts, runtime environments, and so on. In the past, implementing and reasoning about programming languages required careful handling to maintain the correct behaviour of bound variables. Modern
-
Gradual type theory J. Funct. Program. (IF 1.1) Pub Date : 2021-10-14 MAX S. NEW, DANIEL R. LICATA, AMAL AHMED
Gradually typed languages are designed to support both dynamically typed and statically typed programming styles while preserving the benefits of each. Sound gradually typed languages dynamically check types at runtime at the boundary between statically typed and dynamically typed modules. However, there is much disagreement in the gradual typing literature over how to enforce complex types such as
-
Blame and coercion: Together again for the first time J. Funct. Program. (IF 1.1) Pub Date : 2021-10-13 JEREMY G. SIEK, PETER THIEMANN, PHILIP WADLER
C#, Dart, Pyret, Racket, TypeScript, VB: many recent languages integrate dynamic and static types via gradual typing. We systematically develop four calculi for gradual typing and the relations between them, building on and strengthening previous work. The calculi are as follows: $\lambda{B}$ , based on the blame calculus of Wadler and Findler (2009); $\lambda{C}$ , inspired by the coercion calculus
-
Real-time MLton: A Standard ML runtime for real-time functional programs J. Funct. Program. (IF 1.1) Pub Date : 2021-08-31 BHARGAV SHIVKUMAR, JEFFREY MURPHY, LUKASZ ZIAREK
There is a growing interest in leveraging functional programming languages in real-time and embedded contexts. Functional languages are appealing as many are strictly typed, amenable to formal methods, have limited mutation, and have simple but powerful concurrency control mechanisms. Although there have been many recent proposals for specialized domain-specific languages for embedded and real-time
-
Verified secure compilation for mixed-sensitivity concurrent programs J. Funct. Program. (IF 1.1) Pub Date : 2021-07-28 ROBERT SISON, TOBY MURRAY
Proving only over source code that programs do not leak sensitive data leaves a gap between reasoning and reality that can only be filled by accounting for the behaviour of the compiler. Furthermore, software does not always have the luxury of limiting itself to single-threaded computation with resources statically dedicated to each user to ensure the confidentiality of their data. This results in
-
A trustful monad for axiomatic reasoning with probability and nondeterminism J. Funct. Program. (IF 1.1) Pub Date : 2021-07-15 REYNALD AFFELDT, JACQUES GARRIGUE, DAVID NOWAK, TAKAFUMI SAIKAWA
The algebraic properties of the combination of probabilistic choice and nondeterministic choice have long been a research topic in program semantics. This paper explains a formalization in the Coq proof assistant of a monad equipped with both choices: the geometrically convex monad. This formalization has an immediate application: it provides a model for a monad that implements a nontrivial interface
-
What is an education paper? J. Funct. Program. (IF 1.1) Pub Date : 2021-07-12 SHRIRAM KRISHNAMURTHI
We recently renamed our “education” track’s papers from Education Pearl to Education Matters. This would be a good time to explain our vision for the track as a whole, as well as this specific renaming.
-
PhD Abstracts J. Funct. Program. (IF 1.1) Pub Date : 2021-07-02 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. The abstracts are made freely available on the JFP website, i.e. not behind any paywall. They do not require any transfer of copyright, merely a license from the author
-
How to design co-programs J. Funct. Program. (IF 1.1) Pub Date : 2021-07-02 JEREMY GIBBONS
The observation that program structure follows data structure is a key lesson in introductory programming: good hints for possible program designs can be found by considering the structure of the data concerned. In particular, this lesson is a core message of the influential textbook “How to Design Programs” by Felleisen, Findler, Flatt, and Krishnamurthi. However, that book discusses using only the
-
Composable data visualizations J. Funct. Program. (IF 1.1) Pub Date : 2021-06-17 TOMAS PETRICEK
Let’s say we want to create the two charts in Figure 1. The chart on the left is a bar chart that shows two different values for each bar. The chart on the right consists of two line charts that share the x axis with parts of the timeline highlighted using two different colors.
-
Proof-directed program transformation: A functional account of efficient regular expression matching J. Funct. Program. (IF 1.1) Pub Date : 2021-05-24 ANDRZEJ FILINSKI
We show how to systematically derive an efficient regular expression (regex) matcher using a variety of program transformation techniques, but very little specialized formal language and automata theory. Starting from the standard specification of the set-theoretic semantics of regular expressions, we proceed via a continuation-based backtracking matcher, to a classical, table-driven state machine
-
Higher order functions and Brouwer’s thesis J. Funct. Program. (IF 1.1) Pub Date : 2021-05-19 JONATHAN STERLING
Extending Martín Escardó’s effectful forcing technique, we give a new proof of a well-known result: Brouwer’s monotone bar theorem holds for any bar that can be realized by a functional of type (ℕ→ℕ)→ℕ in Gödel’s System T. Effectful forcing is an elementary alternative to standard sheaf-theoretic forcing arguments, using ideas from programming languages, including computational effects, monads, the
-
Explainable dynamic programming J. Funct. Program. (IF 1.1) Pub Date : 2021-05-18 MARTIN ERWIG, PRASHANT KUMAR
In this paper, we present a method for explaining the results produced by dynamic programming (DP) algorithms. Our approach is based on retaining a granular representation of values that are aggregated during program execution. The explanations that are created from the granular representations can answer questions of why one result was obtained instead of another and therefore can increase the confidence
-
StkTokens: Enforcing well-bracketed control flow and stack encapsulation using linear capabilities J. Funct. Program. (IF 1.1) Pub Date : 2021-04-15 LAU SKORSTENGAARD, DOMINIQUE DEVRIESE, LARS BIRKEDAL
We propose and study StkTokens: a new calling convention that provably enforces well-bracketed control flow and local state encapsulation on a capability machine. The calling convention is based on linear capabilities: a type of capabilities that are prevented from being duplicated by the hardware. In addition to designing and formalizing this new calling convention, we also contribute a new way to
-
Cubical Agda: A dependently typed programming language with univalence and higher inductive types J. Funct. Program. (IF 1.1) Pub Date : 2021-04-06 ANDREA VEZZOSI, ANDERS MÖRTBERG, ANDREAS ABEL
Proof assistants based on dependent type theory provide expressive languages for both programming and proving within the same system. However, all of the major implementations lack powerful extensionality principles for reasoning about equality, such as function and propositional extensionality. These principles are typically added axiomatically which disrupts the constructive properties of these systems
-
Lambda calculus with algebraic simplification for reduction parallelisation: Extended study J. Funct. Program. (IF 1.1) Pub Date : 2021-04-05 AKIMASA MORIHATA
Parallel reduction is a major component of parallel programming and widely used for summarisation and aggregation. It is not well understood, however, what sorts of non-trivial summarisations can be implemented as parallel reductions. This paper develops a calculus named λAS, a simply typed lambda calculus with algebraic simplification. This calculus provides a foundation for studying a parallelisation
-
Linear capabilities for fully abstract compilation of separation-logic-verified code J. Funct. Program. (IF 1.1) Pub Date : 2021-03-30 THOMAS VAN STRYDONCK, FRANK PIESSENS, DOMINIQUE DEVRIESE
Separation logic is a powerful program logic for the static modular verification of imperative programs. However, dynamic checking of separation logic contracts on the boundaries between verified and untrusted modules is hard because it requires one to enforce (among other things) that outcalls from a verified to an untrusted module do not access memory resources currently owned by the verified module
-
Ready, Set, Verify! Applying hs-to-coq to real-world Haskell code J. Funct. Program. (IF 1.1) Pub Date : 2021-02-26 JOACHIM BREITNER, ANTAL SPECTOR-ZABUSKY, YAO LI, CHRISTINE RIZKALLAH, JOHN WIEGLEY, JOSHUA COHEN, STEPHANIE WEIRICH
Good tools can bring mechanical verification to programs written in mainstream functional languages. We use hs-to-coq to translate significant portions of Haskell’s containers library into Coq, and verify it against specifications that we derive from a variety of sources including type class laws, the library’s test suite, and interfaces from Coq’s standard library. Our work shows that it is feasible
-
Integrating region memory management and tag-free generational garbage collection J. Funct. Program. (IF 1.1) Pub Date : 2021-02-22 MARTIN ELSMAN, NIELS HALLENBERG
We present a region-based memory management scheme with support for generational garbage collection. The scheme features a compile-time region inference algorithm, which associates values with logical regions, and builds on a region type system that deploys region types at runtime to avoid the overhead of write barriers and to support partly tag-free garbage collection. The scheme is implemented in