首页> 外文期刊>Journal of Functional Programming >Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages
【24h】

Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages

机译:最终无标签,部分评估:无标签的阶段性解释器,用于更简单的类型化语言

获取原文
获取原文并翻译 | 示例

摘要

We 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.
机译:我们已经建立了第一个无标签解释族,用于无金属类型语言(Haskell或ML)中的高阶类型目标语言,该语言不需要依赖类型,广义代数数据类型或后处理来消除标签。静态保留类型的解释包括一个评估器,一个编译器(或分级评估器),一个部分评估器以及按名称调用和按值调用连续传递样式(CPS)转换器。我们的主要技术是使用组合函数而非数据构造函数对de Bruijn或更高阶抽象语法进行编码。换句话说,我们不是用初始代数来表示对象项,而是使用λ微积分的结代结构。我们的表示法还模拟了类型之间的归纳映射,这是类型化部分评估和CPS转换所必需的。我们对对象术语的编码在解释它的方式上统一了抽象,但从静态上确保了解释者永远不会陷入困境。因此,这个解释器族再次证明了对更高种类的类型进行抽象很有用。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号