首页> 外文会议>Practical aspects of declarative languages >Tabling in Mercury: Design and Implementation
【24h】

Tabling in Mercury: Design and Implementation

机译:水星制表:设计与实现

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

摘要

For any LP system, tabling can be quite handy in a variety of tasks, especially if it is efficiently implemented and fully integrated in the language. Implementing tabling in Mercury poses special challenges for several reasons. First, Mercury is both semantically and culturally quite different from Prolog. While decreeing that tabled predicates must not include cuts is acceptable in a Prolog system, it is not acceptable in Mercury, since if-then-elses and existential quantification have sound semantics for stratified programs and are used very frequently both by programmers and by the compiler. The Mercury implementation thus has no option but to handle interactions of tabling with Mercury's language features safely. Second, the Mercury implementation is vastly different from the WAM, and many of the differences (e.g. the absence of a trail) have significant impact on the implementation of tabling. In this paper, we describe how we adapted the copying approach to tabling to implement tabling in Mercury.
机译:对于任何LP系统,制表在各种任务中都非常方便,尤其是如果它有效地实现并完全集成在语言中时。由于多种原因,在Mercury中实现制表带来了特殊的挑战。首先,水星在语义和文化上都与Prolog完全不同。尽管在Prolog系统中可以断言表述谓词必须不包含割断,但在Mercury中则不能接受,因为if-then-elses和存在量化对于分层程序具有合理的语义,并且程序员和编译器都经常使用。因此,Mercury实现别无选择,只能安全地处理制表与Mercury语言功能的交互。其次,Mercury的实现与WAM有很大的不同,许多差异(例如,没有踪迹)对制表的实现有重大影响。在本文中,我们描述了我们如何将复制方法应用于制表以在Mercury中实现制表。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号