{"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 -semantics), the -semantics, and the -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.