Affiliation:
1. University of Cambridge, UK
2. University of Oxford, UK
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
8 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Staged Compilation with Module Functors;Proceedings of the ACM on Programming Languages;2024-08-15
2. Normalization for fitch-style modal calculi;Proceedings of the ACM on Programming Languages;2022-08-29
3. Staged compilation with two-level type theory;Proceedings of the ACM on Programming Languages;2022-08-29
4. Staging with class: a specification for typed template Haskell;Proceedings of the ACM on Programming Languages;2022-01-12
5. Practical normalization by evaluation for EDSLs;Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell;2021-08-18