Author:
CARETTE JACQUES,KISELYOV OLEG,SHAN CHUNG-CHIEH
Abstract
AbstractWe have built the first family of tagless interpretations for a higher-order typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically type-preserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and call-by-name and call-by-value continuation-passing style (CPS) transformers. Our principal technique is to encode de Bruijn or higher-order abstract syntax using combinator functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the λ-calculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts uniformly over the family of ways to interpret it, yet statically assures that the interpreters never get stuck. This family of interpreters thus demonstrates again that it is useful to abstract over higher-kinded types.
Publisher
Cambridge University Press (CUP)
Cited by
183 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Generating C: Heterogeneous metaprogramming system description;Science of Computer Programming;2024-01
2. Program generation meets program verification: A case study on number-theoretic transform;Science of Computer Programming;2024-01
3. Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library;Logical Methods in Computer Science;2023-10-23
4. Strongly-Typed Multi-View Stack-Based Computations;International Symposium on Principles and Practice of Declarative Programming;2023-10-22
5. The Essence of Reactivity;Proceedings of the 16th ACM SIGPLAN International Haskell Symposium;2023-08-30