首页> 外文期刊>ACM transactions on computational logic >Inferring Non-Suspension Conditions for Logic Programs with Dynamic Scheduling
【24h】

Inferring Non-Suspension Conditions for Logic Programs with Dynamic Scheduling

机译:使用动态调度推断逻辑程序的非暂停条件

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

摘要

A logic program consists of a logic component and a control component. The former is a specification in predicate logic whereas the latter defines the order of subgoal selection. The order of subgoal selection is often controlled with delay declarations that specify that a subgoal is to suspend until some condition on its arguments is satisfied. Reasoning about delay declarations is notoriously difficult for the programmer and it is not unusual for a program and a goal to reduce to a state that contains a subgoal that suspends indefinitely. Suspending subgoals are usually unintended and often indicate an error in the logic or the control. A number of abstract interpretation schemes have therefore been proposed for checking that a given program and goal cannot reduce to such a state. This article considers a reversal of this problem, advocating an analysis that for a given program infers a class of goals that do not lead to suspension. This article shows that this more general approach can have computational, implementational and user-interface advantages. In terms of user-interface, this approach leads to a lightweight point-and-click mode of operation in which, after directing the analyser at a file, the user merely has to inspect the results inferred by the analysis. In terms of implementation, the analysis can be straightforwardly realized as two simple fixpoint computations. In terms of computation, by modeling re! different schedulings of re subgoals with a single Boolean function, it is possible to reason about the suspension behavior of large programs. In particular, the analysis is fast enough to be applied repeatedly within the program development cycle. The article also demonstrates that the method is precise enough to locate bugs in existing programs.
机译:逻辑程序由逻辑组件和控制组件组成。前者是谓词逻辑的规范,而后者则定义了子目标选择的顺序。子目标选择的顺序通常由延迟声明控制,这些声明指定子目标将挂起,直到满足其自变量的某些条件为止。众所周知,延迟声明的推理对程序员来说是困难的,并且对于程序和目标而言,减少到包含无限期暂停的子目标的状态并不罕见。暂停的子目标通常是意外的,并且通常指示逻辑或控件中的错误。因此,已经提出了许多抽象解释方案,以检查给定的程序和目标不能降低到这种状态。本文考虑了此问题的逆转,主张进行分析,即对于给定的程序可以推断出不会导致暂停的目标。本文表明,这种更通用的方法可以具有计算,实现和用户界面方面的优势。在用户界面方面,这种方法导致了轻量级的点击式操作模式,在该模式下,将分析仪指向文件后,用户仅需检查分析得出的结果即可。就实现而言,该分析可以直接实现为两个简单的定点计算。在计算方面,通过建模重新!使用单个布尔函数对re子目标进行不同的调度,就有可能推断出大型程序的中止行为。特别是,分析速度足够快,可以在程序开发周期内重复应用。本文还演示了该方法足够精确,可以找到现有程序中的错误。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号