Scientific Programming
Volume 2018 (2018), Article ID 4157030, 10 pages
https://doi.org/10.1155/2018/4157030

Research Article

Extending Well-Founded Semantics with Clark’s Completion for Disjunctive Logic Programs

Juan Carlos Nieves¹ and Mauricio Osorio²

¹Department of Computing Science, Umeå University, 901 87 Umeå, Sweden
²Departamento de Actuaría, Física y Matemáticas, Universidad de las Américas Puebla, Sta. Catarina Mártir, 72820 Cholula, PUE, Mexico

Correspondence should be addressed to Juan Carlos Nieves; jcnieves@cs.umu.se

Received 28 June 2017; Revised 9 October 2017; Accepted 24 October 2017; Published 1 March 2018

Academic Editor: Fabrizio Riguzzi

Copyright © 2018 Juan Carlos Nieves and Mauricio Osorio. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

In this paper, we introduce new semantics (that we call D3-WFS-DCOMP) and compare it with the stable semantics (STABLE). For normal programs, this semantics is based on suitable integration of the well-founded semantics (WFS) and the Clark’s completion. D3-WFS-DCOM has the following appealing properties: First, it agrees with STABLE in the sense that it never defines a nonminimal model or a nonminimal supported model. Second, for normal programs it extends WFS. Third, every stable model of a disjunctive program is a D3-WFS-DCOM model of . Fourth, it is constructed using transformation rules accepted by STABLE. We also introduce second semantics that we call D2-WFS-DCOMP. We show that D2-WFS-DCOMP is equivalent to D3-WFS-DCOMP for normal programs but this is not the case for disjunctive programs. We also introduce third new semantics that supports the use of implicit disjunctions. We illustrate how these semantics can be extended to programs including explicit negation, default negation in the head of a clause, and a operator, which is a generalization of the aggregation operator setof over arbitrary complete lattices.

1. Introduction

One of the most well-known semantics for logic programming is the stable semantics (STABLE) [1, 2]. However, it is well known that very often STABLE is too strong, namely, that there are programs that do not possess stable models [3–5]. Let us consider the following example.

Example 1. Let be a disjunctive logic program:

 . . . . .

In this program there are not stable models; however if we use our D3-WFS-DCOMP semantics there is a model of the program , that is, ,. We can argue that this intended model makes sense as follows: since a tautology such as should not matter (in our point of view, what makes the given tautology to be specially harmless is that does not occur in the head of any other clause), we can delete it getting a semantically equivalent program that we call . Then, since does not appear in the head of any clause of , we can derive and so we can delete in the last clause to get a semantically equivalent program . (Note that what we have done so far in this example is accepted by the STABLE semantics.) Then, since we have that

are clauses in and by reasoning by cases, we derive . (Reasoning by cases is not accepted in STABLE.) Then, we derive by simple modus ponens. Finally, and can be considered false since is true.

It has been even argued that STABLE does not define the intended models of a program [6]. It is also possible that there is not best semantics [7]:

“The fact each approach to semantics of negation has its own strength and weakness suggests that there is probably not a best semantics for logic programs.”

Nevertheless, STABLE satisfies interesting logic properties as it is shown in [1, 8]. In this paper we study the stable semantics and exhibit some properties that it satisfies. Also we point out some problems with this semantics. With this base, we study some variations to the semantics proposed by [9, 10]. The obtained semantics, that we call D3-WFS-DCOMP, satisfies the following main properties: First, it agrees with STABLE in the sense that it never defines a nonminimal model or a nonminimal supported model. Second, for normal programs it extends the well-founded semantics (WFS) [11]. Third, every stable model of a disjunctive program is a D3-WFS-DCOM model of . Fourth, it is constructed using logic program transformations accepted by STABLE.

We also introduce two more logic programming semantics and prove some properties of them. Moreover, we show that our three proposed semantics are equivalent within the class of normal programs. In the last part of our paper, we highlight that the introduced logic programming semantics are suitable for modeling the setof operator of PROLOG using negation as failure.

The rest of the paper is structured as follows: In Section 2, basic definitions on logic programming are presented. In Section 3, we prove some properties of stable model semantics and define our new semantics. In Section 4, we introduce an approach for modeling the setof operator of PROLOG with our semantics using negation as failure; moreover, we present how to reduce programs with explicit negation to programs without it. Finally, in Section 5, we outline our conclusions and future work.

2. Background

In order to have a self-contained document, basic concepts on logic programming are introduced in this section. This section does not aim to be a tutorial. The interested reader can see [1] for a deep presentation of the concepts introduced in this section.

A signature is a finite set of elements that we call atoms. A literal is an atom or the negation of an atom that we denote as . Given a set of atoms , we write to denote the set

A logic theory is built up using the logical constants , and . We may denote a (general) clause as

where represents the formula , each is a propositional atom, and each is a propositional literal. When the clause is considered as   (or the simple formula .), where is a constant atom with its intended interpretation.

Sometimes, a clause is denoted by , where contains all the head atoms, contains all the positive body atoms, and contains all the negative body atoms. We also use to denote . When is a singleton-set, the clause reduces to a normal clause. A definite clause ([12]) is a normal clause lacking of negative literals; that is, . A pure disjunction is a disjunction consisting solely of positive or solely of negative literals. A (general) program is a finite set of clauses. We use to denote the set of atoms occurring in the heads of the clauses of . Given a signature , we write to denote the set of all programs defined over .

We use to denote the consequence relation for classical first-order logic. We will also consider interpretations and models as usual in classical logic.

Given two theories , we denote to say that these theories are intuitionistically equivalent; that is, , then proves (using intuitionistic logic) and vice versa [13].

It will be useful to map a program into a normal program. Given a clause

we write dis-nor to denote the set of normal clauses:

We extend this definition to programs as follows. If is a program, let dis-nor denote the normal program: . Given a normal program , we write to denote the definite program that we obtain from just by removing every negative literal in . Given a definite program, by we mean the unique minimal model of (that always exists for definite programs, see [12]). We assume working with disjunctive programs, unless otherwise stated.

We use an example to illustrate the above definitions. Let be the program:

Then , and dis-nor consists of the clauses:

   .

consists of the clauses:

 . . .

.

Since we are interested in disjunctive logic programs, the following question arise:

 What are the minimal requirements we want to impose on semantics for disjunctive programs?

Certainly, we want that disjunctive facts, that is, clauses in the program with empty bodies, to be true. Dually, if an atom does not occur in any head, then its negation should be true. These ideas are straightforward generalizations of the case on normal programs. Following the ideas of [14], we propose the following definition.

Definition 2 (semantics). (i) Scenario semantics over a given signature is a function such that for every program over it associates a set of models.
(ii) The sceptical semantics induced by scenario semantics is the set of pure disjunctions true in every model of the scenario semantics. (The sceptical semantics derives every literal when its associated scenario semantics has no models.) For any program we define

Given two theories , , we denote whenever the set of models of with respect to the scenario semantics is equal to the set of models of with respect to the scenario semantics .

We introduce some well-accepted logic programming semantics from the state of the art. The first one is the logic programming semantics based on supported models.

Definition 3 (supported model, [14]). A two-valued model of a (disjunctive) logic program is supported iff for every ground atom with there is a rule in with , , and .

Supported models are related to the so-called Clark’s completion [15]. In order to define the Clark’s completion of a logic program, let us introduce the following notation.

Definition 4 (, ). Let be a normal program. Let be an atom in a given signature by the definition of in ; we mean the set of clauses that we denote by . We define

where .

Considering the previous notation, the Clark’s completion with respect to a normal program is presented in the following definition. An extension of the Clark’s completion for capturing disjunctive logic programs is also presented in the following definition.

Definition 5 (Clark’s completion: ([15]), ). (i) For any normal program , we define over a given signature as the classical theory .
(ii) Let be a disjunctive logic program. Let .

Let us observe that given a normal logic program , . As was mentioned, there is a strong relation between supported models and the Clark’s completion. will play a key role in the definition of the logic programming semantics introduced in this paper. In particular, it will be used it for extending the well-founded semantics.

Now the well-accepted STABLE semantics is presented.

Definition 6 (stable, [2]). The Gelfond-Lifschitz transformation (GL-transformation) of a logic program with respect to an interpretation is obtained from by deleting

(i)each rule that has a negative literal in its body with ,(ii)all negative literals in the bodies of the remaining rules.

Clearly the program resulting from applying the GL-transformation is negation-free, so has at least one model. is a stable model iff is a minimal model of .

It is worth mentioning that Pearce [8] generalized the stable semantics to any propositional theory based on intuitionistic logic. Pearce made the following statement [8]:

“A formula is entailed by a program in the stable model semantics if and only if it belongs to every intuitionistically complete and consistent extension of the program formed by adding only negated atoms.”

From this characterization of the stable semantics, the generalization of STABLE to arbitrary theories is immediate. From now on, we will assume this definition whenever we mention the stable semantics of some given theory.

We introduce a set of transformation rules that will help to define different extension of the well-founded semantics. In particular, the following transformations are defined in [14] and generalize the corresponding definitions for normal programs.

Definition 7 (basic transformation rules). A transformation rule is a binary relation on . The following transformation rules are called basic. Let a program be given.

 : replace a rule by . : delete a clause if there is a clause such that . : delete a clause if there is another clause such that , , .

The transformation rules introduced by Definition 7 are illustrated in the following example:

Example 8 (transformation). Let and let be the program:

 . . . .

Then , and . We can apply to get the program :

 . . . .

If we apply again, we get program :

 . . . .

Now, we can apply SUB to get program :

 . . .

A second set of transformations was defined by [14]. These transformations are as follows.
GPPE (Generalized Principle of Partial Evaluation). Suppose contains and we fix an occurrence of an atom . Then we replace by the clauses ()

where (for ) are all clauses with . If no such clauses exist, we simply delete the former clause.
TAUT (Tautology). Suppose contains a clause of the form: and , then we delete the given clause.

Let be the rewriting system which contains, besides the basic transformation rules, the rules GPPE and TAUT. This system was introduced in [14] and is confluent and terminating as shown in [16]. We write to denote the residual program of with respect to the transformations rules .

Considering , we define the following logic programming semantics.

Definition 9 (-WFS). Given a program , we define

We note that our definition of D′-WFS(P) is very similar to the definition of the D-WFS semantics [17]. The difference is that D-WFS defines pure disjunctions while D′-WFS(P) defines literals. (The paper could be worked out without defining D′-WFS but using instead D-WFS.)

Let us note that although the system has the nice property of confluence (and termination), its computational properties are not so efficient. In fact, computing the residual form of a program is exponential (even for normal programs, whereas it is known that the WFS ([11]) can be computed in quadratic time).

In order to define a second rewriting system, two more transformation rules are introduced. The first one is Dloop which is defined as follows.

Definition 10 (Dloop [9]). For a program , let . The transformation Dloop(dp) reduces a program to . We assume that the given transformation takes place only if . We write to denote that transforms to by a dp transformation, where .

The last transformation, which will be introduced, is Dsuc.

Definition 11 (Dsuc [9]). Suppose that is a program that includes a fact and a clause such that . Then we replace this clause by the clause .

Considering Dloop and Dsuc, the rewriting system is introduced.

Definition 12 ( [9]). Let be the rewriting system based on the transformations SUB, , , Dloop, and Dsuc.

We can observe that is confluent and terminating.

Lemma 13 (confl. and termination of ). The system is confluent and terminating.

Proof. (i) is terminating since all its transformation rules reduce the size of the given program. The reduction of the size of a given program is done by either the elimination of literals of the body of a clause or the elimination of clauses.
(ii) Let . Hence, is confluent in the class of normal logic programs [18]. (In [18], the rewriting system, which proved to be confluent, includes the so-called failure transformation rule. However, failure is redundant if the given rewriting system includes loop [4]. Loop is the version of Dloop for normal logic programs [4, 9].) Let us prove that is confluent in the class of disjunctive logic programs by contradiction. Let us suppose that is not confluent. Hence, there exists a disjunctive logic program such that , , and . Hence, , and , but this is a contradiction since is confluent in the class of normal logic programs. Now, we only need to see that is confluent. The only issue is to see the interaction between and the transformation rules of . Since only removes clauses that are biggest in size than a given one that is kept by SUB at the given program, does not affect the confluence of . Hence, is confluent.

It is known that characterizes an extension of WFS, which captures the class of disjunctive logic programs. This extension of WFS considering is called D1-WFS and is defined as follows.

Definition 14 (D1-WFS). Given a program , we define

The relationship between D1-WFS and WFS is stayed by the following theorem.

Theorem 15 (see [9]). Let be a normal logic program. The following equivalence holds:

Proof. For the class of normal logic programs, the transformation rules , , , , and Dloop are equivalent to , , N-, Suc, and loop, which have been defined for normal programs [9]. (In [9], the transformation rules , , N- were named as , , , respectively. In this paper, we added the prefix “N-” in order to denote these transformation rules in the settings of normal logic programs.) Since the rewriting system characterizes WFS, also characterizes WFS.

It is worth mentioning that D1-WFS generalizes a system introduced in [18] from normal to disjunctive programs.

Let us consider again Example 8. As we noticed before, program reduces to . However, still reduces (by ) to , which is as but the third clause is removed. From we can apply a Dloop reduction to get : the single clause . is the residual form of the system.

For this example, it turns out that D′-WFS is equivalent to D1-WFS, but this is not true in general. Take, for instance, the following example.

Example 16. Let be a disjunctive logic program:

We can see that has only two clauses: and . This means that the atoms and are considered true and the rest of atoms are considered false; hence, D′-WFS(P) = . On the other hand, . This means that we cannot apply any transformation rule from to . Since all the atoms in the language of appear in at least one head of the clauses, there are not atoms that can be considered false. Moreover, there are not facts that suggest that there are atoms that can be considered true. Hence, D1-WFS suggests that all the atoms are undefined. In other words, D1-WFS(P) = .

From Example 16, we can observe that D′-WFS and D′-WFS are different in the class of disjunctive logic programs. However for normal programs both semantics are equivalent since they define WFS, but note that the residual programs with respect to and are not necessarily the same. An advantage of over is that the residual program with respect to is polynomial-time computable.

3. Logic Programming Semantics

This section introduces the main results of this paper. We start by stating and proving some useful properties. Some of these properties can be already proved by other authors or intuitively expected; however, since we did not find explicit references to these properties, the properties are formalized and proved.

We start presenting a relationship between and supported models.

Lemma 17. Let be a logic program. is a supported model of iff is a model of

Proof. is a model of iff is a model of (see Definition 5) iff is a supported model of [1] iff is a supported model of (by definition of supported model, see Definition 3).

Let us highlight that Lemma 17 is introducing an extension of the well-known relationship between the Clark’s competition and supported models [15], which was introduced for the class of normal programs, to a relationship between and supported models of disjunctive logic programs.

In order to avoid misunderstanding, let us now define explicitly the concept of minimal supported model of a logic program .

Definition 18. Let be a program. is a minimal supported model of if is a model of and it is minimal (with respect to set inclusion) among the models of .

We can observe a relationship between minimal supported model and supported models, which are minimal.

Lemma 19. Let be a program. If is a minimal model of and a supported model of , then is a minimal supported model of .

Proof. Our proof is by contradiction. Let be a minimal model of , be a supported model of , and be not a minimal supported model of . Then, there exists a proper subset of such that is a supported model of . Thus is a model of . But since is a proper subset of , is not a minimal model of , obtaining a contradiction.

Let us observe that the converse of Lemma 19 is false as the following example shows.

Example 20. Let be the following set of clauses:

  . .

We can see that is

  .

Moreover, one can see that is a minimal supported model of , but, is not a minimal model of .

Now let us introduce two properties regarding the transformation rule .

Lemma 21. If is a disjunctive program, , then implies that for every clause such that , then .

Proof. It is a straightforward generalization for the case in normal programs [18].

Lemma 22. If , then .

Proof. By contradiction, suppose ; therefore, there exists . Then, there is a rule of the form Hence, As , then there exists (by Lemma 21). Thus , by the construction of This leads to a contradiction.

Considering the results introduced by Pearce [8], we highlight the following properties in the settings of STABLE.

Lemma 23. Let and be two theories; then implies .

Proof. It follows immediately by Theorem in [8].

Lemma 24. If is a theory, a set of atoms, and any stable model of , then .

Proof. It follows immediately by Theorem in [8].

The following relationship between stable models and supported models is well known in the state of the art.

Lemma 25 (see [14]). Let be program; if M is a stable model of , then is a supported model of .

We show a property of regarding minimal models.

Lemma 26. Let be a disjunctive program. If is minimal model of and , then .

Proof. Suppose ; then and , so is not in every minimal model of ); then , so . Therefore for all minimal model of dis-nor, thereafter for all model of , and then is not minimal model.

Osorio et al. in [19] proved that stable semantics is closed under Dloop.

Theorem 27 (Dloop preserve stable, [19]). Let be a disjunctive program. If , then and are equivalent under the stable semantics.

The following result was presented in [19].

Lemma 28 (STABLE is closed under transformations, [19]). Let and be two programs related by any transformation in . Then and have the same STABLE models.

Considering the style of GL-transformation, the following reduction is introduced.

Definition 29. Let be a set of literals and be a program. We define as follows:

where is the complement of the literal .

In the following lemma, an interesting property of the system regarding the reduction introduced by Definition 29 is proved.

Lemma 30. Let be a normal program and . Then .

Proof. First note that if is obtained from by a single transformation , then , so, by a direct induction, we can verify that . However, , so, by transitivity, we get the desired result.

is an interesting rewriting system in the settings of supported models as shown in the following lemma.

Lemma 31. If and are two programs such that is obtained from by any transformation in , then is a supported model of implies is supported model of .

Proof. Straightforward by checking each case of .

So far, we have highlighted relevant properties of the rewriting system , minimal models and supported models. Now we are ready for introducing our first logic programming semantics, which will be based on the aforementioned terms.

Definition 32 (D3-WFS-DCOMP). Let be a program. We define a D3-WFS-DCOMP model as a minimal model of that is also a supported model of .

It is immediate to see that D3-WFS-DCOMP is more powerful than D1-WFS (see Theorem 15). Note that sometimes STABLE is inconsistent, when D3-WFS-DCOMP is not.

Example 33. For instance, let us consider again the logic program that was introduced by Example 1:

 . . . . .

We know that STABLE is inconsistent. In order to infer a D3-WFS-DCOMP model, we need to infer . One can see that Dloop can be applied to . Dloop will remove the clause . Hence, such that . In , we can apply . After applying , no transformation rule of can be applied. Hence, is

 . . . .

Let us observe that is a minimal model of ; moreover, is a supported model of . Hence, is a D3-WFS-DCOMP model.

We can also observe that every model inferred by D3-WFS-DCOMP is a supported model.

Lemma 34. Let be a program. If is D3-WFS-DCOMP model of , then is a supported model of .

Proof. Let be a D3-WFS-DCOMP model of , so, is a supported model of . Thus, by Lemma 31 and a direct induction, is a supported model of .

Due to its construction, we see that D3-WFS-DCOMP is similar to STABLE. However, STABLE is inconsistent more often than D3-WFS-DCOMP. This comment is formalized in the following theorem, which is one of the main results of this paper.

Theorem 35. Let be a normal program.

(1)If is a D3-WFS-DCOMP model of , then extends the WFS semantics (i.e., agrees in the true/false assignments with WFS).(2)If is a D3-WFS-DCOMP model of , then is a minimal model of as well as a minimal model of .(3) is a STABLE model of implies is a D3-WFS-DCOMP model of .

Proof. It follows by construction and Theorem 15. It follows by construction and Lemmas 19 and 34. Let be a stable model of . Hence (by Lemma 28) is a stable model of . Hence by [14], is a supported model of . On the other hand, since is stable model of , it is well known that is a minimal model of . Hence, is a minimal model of as well as a supported model of . Finally (by definition) is a D3-WFS-DCOMP model of .

D3-WFS-DCOMP is the first logic programming semantics that we aim to introduce in this paper. D3-WFS-DCOMP is based on minimal models and supported models; moreover, it considers the normal form (residual program) of the given logic program with respect to . However, if we consider the reduction introduced by Definition 29 and D′-WFS instead of the normal form of the given logic program with respect to , we get a new logic programming semantics. Formally, this new logic programming semantics is defined as follows.

Definition 36. Let be a program. We define a D2-WFS-DCOMP model as a minimal model of that is also a supported model of .

Although both D3-WFS-DCOMP and D2-WFS-DCOMP are based on minimal models and supported models, these logic programming semantics are different.

Lemma 37. The semantics D3-WFS-DCOMP is not equivalent to D2-WFS-DCOMP.

Proof. Consider again Example 16. With D3-WFS-DCOMP, we obtain two models: and . However, with D2-WFS-DCOMP we only obtain the model .

We conjecture the following: for every program , every D2-WFS-DCOMP model of is a D3-WFS-DCOMP model of .

As part of our study of logic programming semantics for disjunctive logic programs, we also suggest studying a logic programming semantics that enforces the interpretation of as inclusive disjunction. The interpretation of as inclusive disjunction has been explored by other authors. For instance, in [20], the authors also define semantics based on this notion.

In order to interpret as inclusive disjunction, the concept of w-supported model is defined as follows.

Definition 38. Let be a program, a w-supported model of is a model of such that for every , there is a clause such that and the is true in .

Unlike supported models (see Definition 3), which allow semantics to infer models with only one true atom in each head of each disjunctive clause, w-supported models allow semantics to infer models with more than one true atom in each head of each disjunctive clause. This subtle difference between supported and w-supported models allows us to define different behaviours of the semantics for disjunctive logic programs.

Considering similar constructions to D3-WFS-DCOMP and D2-WFS-DCOMP, the logic programming semantics D3-WFS1-DCOMP is defined as follows.

Definition 39. Let be a program. We define a D3-WFS1-DCOMP model as a minimal model of that is also a w-supported model of .

An interesting property, which shares the three logic programming semantics introduced in this paper, is that these semantics coincide in the class of normal logic programs.

Theorem 40. Let be any normal program; then D3-WFS-DCOMP(P) = D2-WFS-DCOMP(P) = D3-WFS1-DCOMP(P).

Proof. Since D1-WFS(P) = D′-WFS(P) (for normal programs) and by Lemma 30, then it is immediate that D3-WFS-DCOMP(P) = D2-WFS-DCOMP(P). Since supported models are the same as w-supported models (for normal programs), then D3-WFS-DCOMP(P) = D3-WFS1-DCOMP(P).

Note that, however, for disjunctive programs D3-WFS-DCOMP is (in general) different from D1-WFS1-DCOMP. Take for instance, Example in [20].

4. Applications

In this section, we present an application of the logic programming semantics introduced in Section 3. In particular, we sketch how to extend our semantics to consider programs with clauses allowing an empty head, explicit negation, datalog programs, and finally a operator.

(i)With respect to datalog programs, we first obtain the ground instantiation of the program and then we proceed as with propositional programs. This is a well-known approach and we do not discuss it any more.(ii)With respect to programs with explicit negation, it is possible to reduce programs with explicit negation to programs without it. The idea is originally considered in [21].(iii)With respect to programs that include clauses with empty head we proceed as follows: Say that we have the clause , then simply translate it as , , where is a new atom. Clearly, is false in every D3-WFS-DCOMP model of the program.

4.1. Semantics of lub-Programs

A very interesting issue consists in modeling the setof operator of PROLOG. In a meeting, whose aim was to get a picture of the activities in logic programming and its role in the coming years, Gelfond pointed out the following:

“We need to find elegant ways for accomplishing simple tasks, e.g. counting the numbers of elements in the database satisfying some property P. At the moment we have neither clear semantics nor efficient implementation of setof of other aggregates used for this type of problems” [22].

Some time has passed since Gelfond has pointed the aforementioned quote; however, his views still hold these days.

Let us consider the following example.

 s(S) setof(X,p(X),S),

where the intended meaning is as follows: s(S) is true when S = X:p(X).

Several authors have suggested translating the above expression using negation as failure more or less as follows:

 s(S) setof-s(S), setof-s(S) try-s(S),bad-s(S), try-s(S) p(X), singleton-set(X,S), try-s(S) try-s(S1), try-s(S2), union(S1,S2,S), try-s(X) emptyset(X), bad-s(S) p(X), member(X,S),

where union, member, and singleton-set have their intended meaning. For instance, singleton-set(X,S) is true if . Given any normal program extended with setof, if the translation is a stratified program, then the stratified model of the program captures the “intended” semantics of the original program [23]. However, when the program is not stratified, then we can consider using stable models. Several times the stable models still captures the intended meaning, but sometimes it becomes undefined.

Let us consider the following simple, but yet interesting, example about setof. Consider the definite program:

represented as:

 rule([a]) rule([b,a,c]).

That is, rule([X∣Y]) represents the clause . Think that we want to write a program that computes the minimal model. Bearing in mind the fix-point semantics, we could write

 mm(S) setof(X, t-p(X), S). t-p(X) rule(X,Y), mm(S), subset(Y,S).

That is, mm(S) is true (in the intended semantics) iff is the minimal model of the program represented by the EDB (extensional database) .  (It is however questionable if the above program should be considered legal.) Note that and t-p are mutually dependent. If we use the translation of setof to NF given above, then STABLE has no models at all, while any of our proposed semantics, in Section 3, defines the intended model.

Following the approach from [23], but adapted to the more familiar environment of PROLOG, a LUB operator is a generalization of setof over any complete lattice. The intuitive reading is that (X,p(X),S) is true if is the least upper bound of each such that p(X).

Let be a logic program:

Now translate the program above as follows:

 . 

In addition, we need to add axioms that relate the predicate symbols with for each functional symbol . Let us consider again our example. The axioms for in this case are as follows:

(1)(2)(3)(4).(5).

We understand that means that and . And interprets that is the least upper bound of and . The first two clauses are the same (modulo notation) as in Definition in [24]. Clause (5) is not useful for total-order domains.

Now we need to instantiate the translated program. In this paper we restrict our attention to finite ground programs. By adding simple type declarations, we can ensure to get a finite ground program. In this case, we borrow the declaration style of Relationlog; see [23]. Considering any semantics introduced by Section 3, the intended model of is inferred.

5. Conclusion and Future Work

The well-founded semantics (WFS) has been regarded as an approximation of the stable semantics STABLE. Moreover, supported model in the settings of the Clark’s complication is other well-established semantics for data management. In this paper, we explored the integration of WFS and the Clark’s complication for defining three logic programming semantics: D3-WFS-DCOMP, D2-WFS-DCOMP, D3-WFS1-DCOMP. Each of these semantics suggests different interpretations of disjunctive logic programs; however, they suggest a common interpretation in the class of normal logic programs (Theorem 40).

Considering the properties of D3-WFS-DCOMP, D2-WFS-DCOMP, D3-WFS1-DCOMP, these semantics can be regarded as alternative options for STABLE. The aim of our proposals was to explore a misbehavior of disjunctive (and normal) stable semantics that becomes undefined (inconsistent) very often.

From our previous research, we have observed that STABLE has problems for capturing basic aggregation operators such as setof. We have sketched some applications of the introduced logic programming semantics for capturing a operator, a general form of setof. We noticed that STABLE could not define the intended meaning of a simple program that uses our operator.

It is well-accepted that STABLE is the state of the art in the nonmonotonic reasoning community. Indeed, there is a solid platform of STABLE solvers that has supported the use of STABLE in real applications [1, 25]. Nevertheless, different extensions of STABLE have been suggested in order to deal with some misbehaviors and extensions of STABLE [3, 26–29]. We consider that the particular semantics introduced by this paper suggest a feasible option for logic based specification languages that aim at semantics close to STABLE, WFS, and the Clark’s complication.

In [30], we use stable models semantics for capturing Dung’s argumentation approach [31]. Moreover, we have shown that any logic programming semantics can induce an argumentation semantics in the style of Dung’s argumentation approach [32]. Hence, in our future work, we will explore the application of the suggested semantics, in this paper, in abstract argumentation theory. For instance, in argumentation theory, there are a few works with respect to aggregation of arguments, and we believe that the axiomatization presented in Section 4.1 could be useful for handling aggregation between arguments and/or set of arguments.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

References

C. Baral, Knowledge Representation, Reasoning and Declarative Problem Solving, Cambridge University Press, Cambridge, Mass, USA, 2003.

M. Gelfond and V. Lifschitz, “The Stable Model Semantics for Logic Programming,” in Proceedings of the 5th Conference on Logic Programming, R. Kowalski and K. Bowen, Eds., pp. 1070–1080, MIT Press, 1988.

J. Dix, “A classification theory of semantics of normal logic programs. II. Weak properties,” Fundamenta Informaticae, vol. 22, no. 3, pp. 257–288, 1995.

J. Dix, M. Osorio, and C. Zepeda, “A general theory of confluent rewriting systems for logic programming and its applications,” Annals of Pure and Applied Logic, vol. 108, no. 1-3, pp. 153–188, 2001.

J.-H. You and L. Y. Yuan, “A three-valued semantics for deductive databases and logic programs,” Journal of Computer and System Sciences, vol. 49, no. 2, pp. 334–361, 1994.

T. C. Przymusinski, “Well-founded completions of logic programs,” in Proceedings of the 8th International Conference Logic Programming, pp. 726–741, June 1991.

P. M. Dung, “On the relations between stable and well-founded semantics of logic programs,” Theoretical Computer Science, vol. 105, no. 1, pp. 7–25, 1992.

D. Pearce, “Stable inference as intuitionistic validity,” Journal of Logic Programming, vol. 38, no. 1, pp. 79–91, 1999.

J. Arrazola, J. Dix, and M. Osorio, “Confluent rewriting systems in non-monotonic reasoning,” Computación y Sistemas, vol. 2, pp. 104–123, 1999.

M. Osorio and F. Zacarias, “High-Level Logic Programming,” in Foundations of Information and Knowledge Systems, Lecture Notes in Computer Science, pp. 226–240, Springer Berlin Heidelberg, Berlin, Germany, 2000.

A. V. Gelder, K. A. Ross, and J. S. Schlipf, “The well-founded semantics for general logic programs,” Journal of the ACM, vol. 38, no. 3, pp. 620–650, 1991.

J. W. Lloyd, Foundations of Logic Programming, Springer, Berlin, Germany, 1987.

D. van Dalen, Logic and Structure, Springer-Verlag, Berlin, Germany, 3rd edition, 1994.

S. Brass and J. Dix, “Characterizations of the disjunctive stable semantics by partial evaluation,” Journal of Logic Programming, vol. 32, no. 3, pp. 207–228, 1997.

K. L. Clark, “Logic and Databases,” in chapter Negation as Failure, pp. 293–322, Plenum Press, 1978.

S. Brass and J. Dix, “Characterizations of the disjunctive well-founded semantics: confluent calculi and iterated gcwa,” Journal of Automated Reasoning, vol. 20, no. 1, pp. 143–165, 1998.

G. Brewka, J. Dix, and K. Konolige, Nonmonotonic Reasoning: An overview, CSLI Lectures Notes 73, CSLI Publications, Stanford, CA, USA, 1997.

S. Brass, U. Zukowski, and B. Freitag, “Transformation-based bottom-up computation of the well-founded model,” in Non-Monotonic Extensions of Logic Programming, NMELP '96, T. C. P. Jürgen Dix and L. M. Pereira, Eds., vol. 1216 of Lecture Notes in Computer Science, pp. 171–201, Springer, Berlin, Germany, 1997.

M. Osorio, J. A. Navarro, and J. Arrazola, “Equivalence in answer set programming,” in Logic Based Program Synthesis and Transformation, 11th International Workshop, LOPSTR 2001, pp. 57–75, Springer, Berlin, Germany, 2001.

S. Greco, “Minimal founded semantics for disjunctive logic programming,” LPNMR, pp. 221–235, 1999.

C. Baral and M. Gelfond, “Logic programming and knowledge representation,” The Journal of Logic Programming, vol. 19-20, no. 1, pp. 73–148, 1994.

J. Dix, “The logic programming paradigm,” AI Communications, vol. 11, no. 2, pp. 123–131, 1998.

M. Osorio and B. Jayaraman, “Aggregation and negation-as-failure,” New Generation Computing, vol. 17, no. 3, pp. 255–284, 1999.

A. V. Gelder, “The well-founded semantics of aggregation,” PODS, pp. 127–138, 1992.

M. Osorio, J. Diaz, and A. Santoyo, “0-1 integer programming for computing semi-stable semantics of argumentation frameworks,” Computación y Sistemas, vol. 21, no. 3, pp. 457–471, 2017.

J. Dix, “A classification theory of semantics of normal logic programs. I. Strong properties,” Fundamenta Informaticae, vol. 22, no. 3, pp. 227–255, 1995.

M. Osorio, J. A. Navarro, J. R. Arrazola, and V. Borja, “Logics with Common Weak Completions,” Journal of Logic and Computation, vol. 16, no. 6, pp. 867–890, 2006.

M. Osorio, J. C. Nieves, and C. Giannella, “Useful Transformations in Answer Set Programming,” in Answer Set Programming: Towards Efficient and Scalable Knowledge Representation and Reasoning (AAAI Spring 2001 Symposium), A. Provetti and S. T. Cao, Eds., Stanford, USA, March 2001.

J. C. Nieves, M. Osorio, and U. Cortés, “Semantics for possibilistic disjunctive programs,” Theory and Practice of Logic Programming, vol. 13, no. 1, pp. 33–70, 2013.

J. C. Nieves, U. Cortés, and M. Osorio, “Preferred extensions as stable models,” Theory and Practice of Logic Programming, vol. 8, no. 4, pp. 527–543, July 2008.

P. M. Dung, “On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games,” Artificial Intelligence, vol. 77, no. 2, pp. 321–357, 1995.

J. C. Nieves, M. Osorio, and C. Zepeda, “A schema for generating relevant logic programming semantics and its applications in argumentation theory,” Fundamenta Informaticae, vol. 106, no. 2-4, pp. 295–319, 2011.