Decidability of logic program semantics and applications to testing

Salvatore Ruggieri
{"title":"Decidability of logic program semantics and applications to testing","authors":"Salvatore Ruggieri","doi":"10.1016/S0743-1066(99)00067-9","DOIUrl":null,"url":null,"abstract":"<div><p>In this paper, we investigate the decidability problem of logic program semantics and observables, focusing in particular on the least Herbrand model (or <span><math><mtext>M</mtext></math></span>-semantics), the <span><math><mtext>C</mtext></math></span>-semantics, and the <span><math><mtext>S</mtext></math></span>-semantics. We introduce <em>bounded logic programs</em>, and show that they coincide with programs such that every ground query has finitely many SLD-refutations via any selection rule. In particular, bounded programs strictly include the well-studied class of acceptable logic programs. We show that the mentioned declarative semantics are decidable when considering acceptable programs and programs bounded by recursive level mappings. Interestingly, the decision procedures have direct implementations in the logic programming paradigm itself as Prolog meta-programs. We relate semantics decidability to program testing. In our terminology, the testing problem consists of checking whether or not the formal semantics of a program includes a given <em>finite</em> set of atoms. With this definition, semantics decidability and the testing problem are equivalent. The decision procedures are then recognized to be automatic tools for testing logic programs. The meta-programming approach reveals to be successful in modeling extensions such as arithmetic built-in's, negation, modular programming and some other declarative semantics. Also, we present some preliminary experimental results and an efficient compilation-oriented approach that overcome the overhead due to meta-programming.</p></div>","PeriodicalId":101236,"journal":{"name":"The Journal of Logic Programming","volume":"46 1","pages":"Pages 103-137"},"PeriodicalIF":0.0000,"publicationDate":"2000-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0743-1066(99)00067-9","citationCount":"17","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The Journal of Logic Programming","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0743106699000679","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 17

Abstract

In this paper, we investigate the decidability problem of logic program semantics and observables, focusing in particular on the least Herbrand model (or M-semantics), the C-semantics, and the S-semantics. We introduce bounded logic programs, and show that they coincide with programs such that every ground query has finitely many SLD-refutations via any selection rule. In particular, bounded programs strictly include the well-studied class of acceptable logic programs. We show that the mentioned declarative semantics are decidable when considering acceptable programs and programs bounded by recursive level mappings. Interestingly, the decision procedures have direct implementations in the logic programming paradigm itself as Prolog meta-programs. We relate semantics decidability to program testing. In our terminology, the testing problem consists of checking whether or not the formal semantics of a program includes a given finite set of atoms. With this definition, semantics decidability and the testing problem are equivalent. The decision procedures are then recognized to be automatic tools for testing logic programs. The meta-programming approach reveals to be successful in modeling extensions such as arithmetic built-in's, negation, modular programming and some other declarative semantics. Also, we present some preliminary experimental results and an efficient compilation-oriented approach that overcome the overhead due to meta-programming.

逻辑程序语义的可判定性及其在测试中的应用
本文研究了逻辑程序语义和可观察对象的可判定性问题,重点研究了最小Herbrand模型(或m -语义)、c -语义和s -语义。我们引入有界逻辑程序,并证明它们与程序重合,使得每个根据查询通过任何选择规则都有有限多个sld反驳。特别地,有界规划严格地包括被充分研究过的一类可接受逻辑规划。我们表明,当考虑可接受程序和由递归级别映射限定的程序时,上述声明性语义是可决定的。有趣的是,决策过程在逻辑编程范例本身中作为Prolog元程序直接实现。我们将语义可判定性与程序测试联系起来。在我们的术语中,测试问题包括检查程序的形式语义是否包含给定的有限原子集。有了这个定义,语义可判定性和测试问题是等价的。决策过程被认为是测试逻辑程序的自动工具。元编程方法可以成功地建模扩展,如算术内置、否定、模块化编程和其他一些声明性语义。此外,我们还介绍了一些初步的实验结果和一种有效的面向编译的方法,该方法克服了元编程带来的开销。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信