La regola r a sostituisce le regole da r 1 a r 4 , la regola r b sostituisce le regole da r 5 a r 7 , ed il predicato bool nonè necessario. In fine, la regola r d sostituisce le regole da r 8 ad r 10. Le regole r 11 , r 12 e r 13 esistono in entrambe le codifiche. Si noti che nel linguaggio NFN riusciamo a rappresentare il problema con un programma molto più succinto ed inoltre non abbiamo bisogno del predicato intermedio bool. Contributi I principali contributi della tesi possono essere riassunti come segue. V • La trasformazione preserva la safety. • La taglia del programma trasformatoè polinomiale nella taglia del programma NFN. • Esiste una corrispondenza biunivoca tra gli answer set del programma NFN e quelli del programma riscritto. In questo modo si possono ottenere gli answer set del programma NFN , da quelli del programma trasformato, con una semplice proiezione. 4. Abbiamo realizzato un sistema, nfn2dlp, che implementa l'algoritmo di riscrittura. Inoltre abbiamo implementato anche un sistema che calcola gli answer set di un programma NFN : nfnsolve. Entrambi i tool sono disponibili al sito http://www.mat.unical.it/software/nfn2dlp/.
Disjunctive logic programming under the answer set semantics (DLP , ASP ) has been acknowledged as a versatile formalism for knowledge representation and reasoning during the last decades. Lifschitz, Tang, and Turner have introduced an extended language of DLP , called Nested Logic Programming (NLP ), in 1999 [12]. It often allows for more concise representations by permitting a richer syntax in rule heads and bodies. However, that language is propositional and thus does not allow for variables, one of the strengths of DLP .In this paper, we introduce a language similar to NLP , called Normal Form Nested (NFN ) programs, which does allow for variables, and present the syntax and semantics. However, with the introduction of variables an important issue arises: domain independence, the question of whether the semantics of a program is independent of the considered domain (given that it is sufficiently rich). Domain independence, originally studied for logic-based database query languages, is desirable because it guarantees that the semantics remains equal if unrelated information is added and also ensures finiteness of intended models even if infinite domains are considered. With the presence of variables, NFN programs in general are not domain independent. We study this issue in depth and define the class of safe NFN programs, which are guaranteed to be domain independent.Moreover, we show that for those NFN programs, which are also NLP s, our semantics coincides with the one of [12], while keeping the standard meaning of answer sets on DLP programs with variables. We also show that our semantics coincides with Herbrand stable models as defined in [6] of formulas corresponding to NFN programs. Finally, we provide an algorithm which transforms NFN programs into DLP programs in a correct and efficient way. We have implemented this algorithm, which provides an effective implementation of the NFN language, using existing DLP systems as a back-end. * Address for correspondence: Via P. Bucci, cubo 30b, 87036 Rende (CS), Italy 272 A. Bria et al. / Normal Form Nested Programs
Abstract. Normal Form Nested (NFN ) programs have recently been introduced in order to allow for enriching the syntax of disjunctive logic programs under the answer sets semantics. In particular, heads of rules can be disjunctions of conjunctions, while bodies can be conjunctions of disjunctions. Different to many other proposals of this kind, NFN programs may contain variables, and a notion of safety has been defined for guaranteeing domain independence. Moreover, NFN programs can be efficiently translated to standard disjunctive logic programs (DLP ). In this paper we present the tool nfn2dlp, a compiler for NFN programs, which implements an efficient translation from safe NFN programs to safe DLP programs. The answer sets of the original NFN program can be obtained from the answer sets of the transformed program (which in turn can be obtained by using a DLP system) by a simple transformation. The system has been implemented using the object-oriented programming language Ruby and Treetop, a language for Parsing Expression Grammars (PEGs). It currently produces DLP programs in the format of DLV. The separate script nfnsolve uses DLV as a back-end to compute answer sets for NFN programs. Thus, combining the two tools we obtain a system which supports the powerful NFN language, and is available for experiments.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.