Abstract
It is well-known that the simply typed lambda-calculus is modeled by any cartesian closed category (CCC). This correspondence suggests giving typed functional programs a variety of interpretations, each corresponding to a different category. A convenient way to realize this idea is as a collection of meaning-preserving transformations added to an existing compiler, such as GHC for Haskell. This paper describes such an implementation and demonstrates its use for a variety of interpretations including hardware circuits, automatic differentiation, incremental computation, and interval analysis. Each such interpretation is a category easily defined in Haskell (outside of the compiler). The general technique appears to provide a compelling alternative to deeply embedded domain-specific languages.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference63 articles.
1. Umut Acar. Self-adjusting computation . PhD thesis School of Computer Science Carnegie Mellon University May 2005. Umut Acar. Self-adjusting computation . PhD thesis School of Computer Science Carnegie Mellon University May 2005.
2. Steve
Awodey
.
Category theory volume
49
of
Oxford Logic Guides
.
Oxford University Press 2006
. Steve Awodey. Category theory volume 49 of Oxford Logic Guides. Oxford University Press 2006.
3. Lecture Notes in Computer Science;Baaij Christiaan,2014
4. Can programming be liberated from the von Neumann style?
Cited by
31 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Decapodes: A diagrammatic tool for representing, composing, and computing spatialized partial differential equations;Journal of Computational Science;2024-09
2. Calculating Compilers Effectively (Functional Pearl);Proceedings of the 17th ACM SIGPLAN International Haskell Symposium;2024-08-28
3. Algebraic Dynamical Systems in Machine Learning;Applied Categorical Structures;2024-01-18
4. The Essence of Reactivity;Proceedings of the 16th ACM SIGPLAN International Haskell Symposium;2023-08-30
5. Timely Computation;Proceedings of the ACM on Programming Languages;2023-08-30