首页> 外文期刊>Theory and Practice of Logic Programming >Stepwise debugging of answer-set programs
【24h】

Stepwise debugging of answer-set programs

机译:逐步调试答案集程序

获取原文

摘要

We introduce a stepping methodology for answer-set programming (ASP) that allows for debugging answer-set programs and is based on the stepwise application of rules. Similar to debugging in imperative languages, where the behaviour of a program is observed during a step-by-step execution, stepping for ASP allows for observing the effects that rule applications have in the computation of an answer set. While the approach is inspired from debugging in imperative programming, it is conceptually different to stepping in other paradigms due to non-determinism and declarativity that are inherent to ASP. In particular, unlike statements in an imperative program that are executed following a strict control flow, there is no predetermined order in which to consider rules in ASP during a computation. In our approach, the user is free to decide which rule to consider active in the next step following his or her intuition. This way, one can focus on interesting parts of the debugging search space. Bugs are detected during stepping by revealing differences between the actual semantics of the program and the expectations of the user. As a solid formal basis for stepping, we develop a framework of computations for answer-set programs. For fully supporting different solver languages, we build our framework on an abstract ASP language that is sufficiently general to capture different solver languages. To this end, we make use of abstract constraints as an established abstraction for popular language constructs such as aggregates. Stepping has been implemented in SeaLion, an integrated development environment for ASP. We illustrate stepping using an example scenario and discuss the stepping plugin of SeaLion. Moreover, we elaborate on methodological aspects and the embedding of stepping in the ASP development process.
机译:我们介绍一种用于答案集编程(ASP)的步进方法,该方法可以调试答案集程序,并且基于规则的逐步应用。与命令式语言中的调试类似,在命令式语言中逐步执行过程中观察程序的行为,对于ASP的逐步执行允许观察规则应用程序在答案集计算中的作用。尽管该方法是从命令式编程中的调试中获得启发的,但由于ASP固有的不确定性和声明性,它在概念上与其他范式有所不同。特别是,与命令程序中遵循严格控制流执行的语句不同,在计算过程中没有预定顺序可以考虑ASP中的规则。在我们的方法中,用户可以根据自己的直觉自由决定在下一步中考虑使用哪个规则。这样,您可以专注于调试搜索空间中有趣的部分。通过揭示程序的实际语义与用户期望之间的差异,可以在步进过程中检测到错误。作为逐步完善的正式基础,我们开发了答案集程序的计算框架。为了完全支持不同的求解器语言,我们在抽象的ASP语言上构建了框架,该语言足够通用以捕获不同的求解器语言。为此,我们利用抽象约束作为流行语言结构(例如聚合)的既定抽象。在ASP的集成开发环境SeaLion中已实现了步进。我们使用示例场景说明了步进,并讨论了SeaLion的步进插件。此外,我们详细介绍了方法论方面以及ASP开发过程中步骤的嵌入。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号