首页> 外文会议>International Symposium on Logic Based Program Synthesis and Transformation >Non-leftmost Unfolding in Partial Evaluation of Logic Programs with Impure Predicates
【24h】

Non-leftmost Unfolding in Partial Evaluation of Logic Programs with Impure Predicates

机译:诸如纯度谓词的逻辑程序部分评估中的非遗物展开

获取原文

摘要

Partial evaluation of logic programs which contain impure predicates poses non-trivial challenges. Impure predicates include those which produce side-effects, raise errors (or exceptions), and those whose truth value varies according to the degree of instantiation of arguments1. In particular, non-leftmost unfolding steps can produce incorrect results since the independence of the computation rule no longer holds in the presence of impure predicates. Existing proposals allow non-leftmost unfolding steps, but at the cost of accuracy: bindings and failure are not propagated backwards to predicates which are potentially impure. In this work we propose a partial evaluation scheme which substantially reduces the situations in which such backpropagation has to be avoided. With this aim, our partial evaluator takes into account the information about purity of predicates expressed in terms of assertions. This allows some optimizations which are not feasible using existing partial evaluation techniques. We argue that our proposal goes beyond existing ones in that it is a) accurate, since the classification of pure vs impure is done at the level of atoms instead of predicates, b) extensible, as the information about purity can be added to programs using assertions without having to modify the partial evaluator itself, and c) automatic, since (backwards) analysis can be used to automatically infer the required assertions. Our approach has been implemented in the context of , the abstract interpretation-based preprocessor of the logic programming system.
机译:逻辑程序的部分评估包含不纯谓词的逻辑程序构成了非琐碎的挑战。不纯的谓词包括产生副作用的那些,突出误差(或例外),以及那些根据Arguments1的实例化程度变化的那些。特别地,由于计算规则的独立性不再存在于不纯谓词,因此,非左左展开步骤可以产生不正确的结果。现有的提案允许非遗留的展开步骤,但在准确性的成本下:绑定和失败不是向后传播到可能纯度的谓词。在这项工作中,我们提出了一种部分评估方案,其基本上减少了必须避免这种背部化的情况。通过这种目标,我们的部分评估员考虑了关于在断言方面表达的近谓词的信息。这允许一些使用现有部分评估技术不可行的优化。我们认为我们的提议超出了现有的,因为它是a)准确的,因为纯Vs纯度的分类在原子级代替谓词,b)可扩展,因为可以使用有关纯度的信息,因为可以使用关于纯度的信息不必修改部分评估器本身的断言和C)自动,因为(向后)分析可用于自动推断所需的断言。我们的方法已经在逻辑编程系统的抽象解释的预处理器的上下文中实现。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号