【24h】

Bimonadic Semantics for Basic Pattern Matching Calculi

机译:基本模式匹配计算的二元语义

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

The pattern matching calculi introduced by the first author are a refinement of the λ-calculus that integrates mechanisms appropriate for fine-grained modelling of non-strict pattern matching. While related work in the literature only uses a single monad, typically Maybe, for matchings, we present an axiomatic approach to semantics of these pattern matching calculi using two monads, one for expressions and one for matchings. Although these two monads only need to be relatively lightly coupled, this semantics implies soundness of all core PMC rules, and is a useful tool for exploration of the design space for pattern matching calculi. Using lifting and Maybe monads, we obtain standard Haskell semantics, and by adding another level of Maybe to both, we obtain a de-notational semantics of the "matching failure as exceptions" approach of Erwig and Peyton Jones. Using list-like monads opens up interesting extensions in the direction of functional-logic programming.
机译:第一作者介绍的模式匹配演算是对λ演算的改进,它集成了适用于非严格模式匹配的细粒度建模的机制。尽管文献中的相关工作仅使用单个monad(通常可能是Mayad)进行匹配,但我们使用两种monad(一种用于表达式,一种用于匹配)为这些模式匹配演算的语义提供了一种公理的方法。尽管这两个单子仅需要相对较轻地耦合,但是这种语义暗示着所有核心PMC规则的健全性,并且是探索用于模式匹配计算的设计空间的有用工具。使用lifting和Maybe monad,我们获得标准的Haskell语义,并通过将二者附加另一个级别的Maybe,获得Erwig和Peyton Jones的“将匹配失败作为例外”方法的表示法语义。使用类似列表的monad在功能逻辑编程方面开辟了有趣的扩展。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号