Rebound: Efficient, Expressive, and Well-Scoped Binding

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: De Santo, Noé, Weirich, Stephanie
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909791420416000
author De Santo, Noé
Weirich, Stephanie
author_facet De Santo, Noé
Weirich, Stephanie
contents We introduce the Rebound library that supports well-scoped term representations in Haskell and automates the definition of substitution, alpha-equivalence, and other operations that work with binding structures. The key idea of our design is the use of first-class environments that map variables to expressions in some new scope. By statically tracking scopes, users of this library gain confidence that they have correctly maintained the subtle invariants that stem from using de Bruijn indices. Behind the scenes, Rebound uses environments to optimize the application of substitutions, while providing explicit access to these data structures when desired. We demonstrate that this library is expressive by using it to implement a wide range of language features with sophisticated uses of binding and several different operations that use this abstract syntax. Our examples include pi-forall, a tutorial implementation of a type checker for a dependently-typed programming language. Finally, we benchmark Rebound to understand its performance characteristics and find that it produces faster code than competing libraries.
format Preprint
id arxiv_https___arxiv_org_abs_2509_13261
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Rebound: Efficient, Expressive, and Well-Scoped Binding
De Santo, Noé
Weirich, Stephanie
Programming Languages
D.3.4
We introduce the Rebound library that supports well-scoped term representations in Haskell and automates the definition of substitution, alpha-equivalence, and other operations that work with binding structures. The key idea of our design is the use of first-class environments that map variables to expressions in some new scope. By statically tracking scopes, users of this library gain confidence that they have correctly maintained the subtle invariants that stem from using de Bruijn indices. Behind the scenes, Rebound uses environments to optimize the application of substitutions, while providing explicit access to these data structures when desired. We demonstrate that this library is expressive by using it to implement a wide range of language features with sophisticated uses of binding and several different operations that use this abstract syntax. Our examples include pi-forall, a tutorial implementation of a type checker for a dependently-typed programming language. Finally, we benchmark Rebound to understand its performance characteristics and find that it produces faster code than competing libraries.
title Rebound: Efficient, Expressive, and Well-Scoped Binding
topic Programming Languages
D.3.4
url https://arxiv.org/abs/2509.13261