Repository logo
 

Partially-Static Data as Free Extension of Algebras

Published version
Peer-reviewed

Type

Conference Object

Change log

Authors

Yallop, JD 
Von Glehn, Tamara 
Kammar, Ohad 

Abstract

Partially-static data structures are a well-known technique for improving binding times. However, they are often defined in an ad-hoc manner, without a unifying framework to ensure full use of the equations associated with each operation. We present a foundational view of partially-static data structures as free extensions of algebras for suitable equational theories, i.e. the coproduct of an algebra and a free algebra in the category of algebras and their homomorphisms. By precalculating these free extensions, we construct a high-level library of partially-static data representations for common algebraic structures. We demonstrate our library with common use-cases from the literature: string and list manipulation, linear algebra, and numerical simplification.

Description

Keywords

multi-stage compilation, metaprogramming, partial evaluation, partially-static data, universal algebra

Journal Title

Proceedings of the ACM on Programming Languages archive Volume 2 Issue ICFP, September 2018 Article No. 100

Conference Name

Proceedings of the ACM on Programming Languages

Journal ISSN

2475-1421
2475-1421

Volume Title

Publisher

ACM
Sponsorship
Supported by the European Research Council grant ‘events causality and symmetry Ð the next- generation semantics’; the Engineering and Physical Sciences Research Council grant EP/N007387/1 ‘Quantum computation as a programming language’, and a Balliol College Oxford Career Development Fellowship