1. Introduction
Multi-adjoint logic programming (MALP) was introduced in [
1] in order to generalize different non-classical logic programming approaches [
2,
3]. A multi-adjoint logic program is characterized by the use of different implications in its rules and general operators in the body of its rules. These features make multi-adjoint logic programming a flexible framework with potential applications. Since its introduction, multi-adjoint logic programming has broadly been studied in order to, for example, improve the computation of the least model with either an efficient unfolding process [
4,
5] or with the computation of reductants [
6,
7]; consider propositional symbols of different sorts and termination theorems [
8,
9]; analyze incoherence and contradiction measures [
10,
11]; and extend it to a first order logic [
12,
13]. Later, multi-adjoint normal logic programming (MANLP) was presented as an extension of multi-adjoint logic programming, where the use of a negation operator is allowed in the body of the rules [
14]. A complete study on the syntax and semantics of multi-adjoint normal logic programs, containing important results about the existence and the unicity of stable models, was carried out in [
14]. Recently, extended multi-adjoint logic programming (EMALP) has been proposed with the purpose of increasing the versatility and the expressive power of the multi-adjoint approach, by means of the inclusion of different negation operators in the body of the rules and the consideration of constraint rules [
15]. Besides presenting the syntax and the semantics of extended multi-adjoint logic programs, which is also based on stable models, a procedure to translate extended multi-adjoint logic programs into semantically equivalent multi-adjoint normal logic programs was provided in [
15].
Core fuzzy answer set programming (CFASP) was introduced in [
16] as a logic programming framework, endowed with a compact simple language, which is capable of accommodating different fuzzy logic programming formalisms proposed in the literature, such as fuzzy logic programming [
3], normal residuated logic programming [
17], and fuzzy answer set programming [
18]. Specifically, this framework provides a bridge between rich and expressive answer set logic languages, and a small core language that is easy to implement and reason about.
This paper is focused on relating multi-adjoint normal logic programs to core fuzzy answer set programs from a semantical perspective. This relation is carried out in both directions, from MANLP to CFASP and from CFASP to MANLP, and it pursues two main objectives. On the one hand, we aim to combine the great expressivity of EMALPs with the simplicity and compactness of CFASPs. In other words, we aspire to handle a flexible powerful language with a significant potential for modelling problems, such as EMALP, and at the same time work in a framework with high computational efficiency, easier to implement and reason about, as CFASP. That ambition is achieved presenting a method which transforms a MANLP into a CFASP such that the stable models of the former coincide with the answer sets of the later, that is, both programs are semantically equivalent. As a result, the task initiated in [
15] will be completed, giving rise to a procedure to translate an EMALP into a semantically equivalent CFASP.
On the other hand, this paper also illustrates how results related to the semantics of a logic programming framework can be applied in other logic programming settings concerning its canonical models. In particular, we focus on MANLP and CFASP. For this purpose, a method for translating an arbitrary CFASP into a semantically equivalent MANLP has been shown. Among others, this method entails the possibility of using current theorems in MALP and MANLP in CFASP, such as the existence theorem for stable models given in the multi-adjoint framework [
14], to provide a sufficient condition for the existence of answer sets.
The paper is organized as follows.
Section 2 includes preliminary notions associated with the logic programming frameworks considered in this study, multi-adjoint normal logic programming and core fuzzy answer set programming.
Section 3 presents a procedure to translate multi-adjoint normal logic programs into semantically equivalent core fuzzy answer set programs.
Section 4 carries out a reciprocal study to the one given in the previous section, that is, a method to translate core fuzzy answer set programs into semantically equivalent multi-adjoint normal logic programs is shown. Technical properties and results relating stable models to answer sets of the corresponding logic programming frameworks are proven.
Section 5 provides some conclusions and prospects for future work.
3. From MANLP to CFASP
The translation procedures and results presented in this section will show that it is possible to translate a multi-adjoint normal logic program into a semantically equivalent core fuzzy answer set program.
Notice that, apart from composition of negations in CFASPs, the syntax of MANLPs and CFASPs differ in the presence or absence of weights in the rules and the effective consideration of different residuated implications in the rules. Indeed, to convert a MANLP into a CFASP, an alternative consists of including the weight of each rule in its body by means of the conductor residuated to the implication which defines the rule. This procedure is formalized as follows.
Definition 13. Let be a MANLP on . The corresponding CFASP
of
is defined as the following set of rules:where ← is any fixed implication of the set . Notice that, for each rule
, taking into account the syntax of multi-adjoint normal logic programs, the operators
and @ are order-preserving. As a consequence, the mapping
defined as
is order-preserving, being
core literals. Thus, the CFASP
is well-defined.
According to Definition 13, Algorithm 1 details stepwise the translation of a MANLP into its corresponding CFASP, where a residuated implication ← in
is fixed.
Algorithm 1: Corresponding CFASP of a MANLP |
|
As shown next, the corresponding CFASP of a MANLP, given by Definition 13, is semantically equivalent to the original program. In other words, the answer sets of the former coincide with the stable models of the latter.
Theorem 2. Let be a MANLP. An interpretation I is a stable model of if and only if I is an answer set of the corresponding CFASP of .
Proof. Let I be an interpretation. According to the definitions of stable model and answer set, we need to prove that I is the least model of the reduct if and only if I is an answer set of the reduct . Notice that, to prove the previous statement, it is sufficient to demonstrate that any interpretation J is a model of if and only if J is a model of , since this fact implies that the models of coincide with the models of .
By definition, for each rule in
of the form
there exists a rule in the reduct
given by
with
, and a rule in the reduct
of the form
that is
Furthermore, all rules in
and
are of that form. Notice that, an interpretation
J satisfies a rule in
of the form
if and only if
Equivalently, according to the definition of
,
Since
forms an adjoint pair, the previous inequality can be rewritten as
which is equivalent by Remark 1 to
In other words,
J satisfies the rule
if and only if it satisfies the rule
As a consequence, an interpretation I is the least model of the reduct if and only if I is an answer set of the reduct . □
Recently, extended multi-adjoint logic programs (EMALPs) were presented in [
15] as an extension of multi-adjoint normal logic programs. In this setting, a special type of aggregator operator, called extended aggregator, is considered in the body of the rules and a new kind of rules, called constraints, have been included in the programs.
As shown in [
15], extended aggregators can be used to simulate multiple negation operators or, in general, any kind of order-reversing behaviour for a propositional symbol. Additionally, the consideration of constraints enables a user to impose upper bounds to certain formulae. This shed lights on the flexibility and the expressive power of the extended multi-adjoint logic programming framework. Besides presenting the syntax and the semantics of extended multi-adjoint logic programs, a procedure to translate an EMALP into a semantically equivalent MANLP was provided in [
15].
As a result, we can assert that Definition 13 together with Theorem 2 completes the labour initiated in [
15]. Namely, we can make use of extended multi-adjoint logic programs in order to model real-world problems, and then translate them into CFASPs to handle compact simple programs with the same meaning. This finished translation provides certain advantageous properties. For instance, from a computational point of view, CFASPs are easier to implement and to reason about, as highlighted in [
16].
The next example illustrates how Definition 13 is employed to translate a MANLP into a CFASP, taking into account Algorithm 1. Specifically, we conclude the transformation started in Examples 16, 21 and 26 in [
15].
Example 9. Let be the multi-adjoint lattice where , and are Gödel, product and Łukasiewicz adjoint pairs, respectively, and the negation operators defined as and , for all . Consider the MANLP given bywhere is defined, for each , as Applying Algorithm 1, consider fixed the implication and let . For the rule , that is, the rulewe include in the rule Similarly, the rule is transformed into the rule Following this process for the rest of rules of , we conclude that its corresponding CFASP is defined as the set of rules: Notice that, the CFASP is clearly simpler than the MANLP , from a syntactical point of view.
Applying Theorem 2, we can assert that is semantically equivalent to . For instance, as shown in Example 26 in [15], is a stable model of the MANLP , from which we conclude that N is also an answer set of . 4. From Core Fuzzy Answer Set Programs to Multi-Adjoint Normal Logic Programs
The semantics of core fuzzy answer set programs is defined in terms of answer sets. Sufficient conditions to ensure the existence of answer sets are then instrumental in order to define the semantics of a CFASP. In this section, we provide a method to transform a CFASP into a semantically equivalent MANLP. One of the consequences of that procedure is the possibility of applying different results given in MALP and MANLP, such as the termination results introduced in [
8,
9] or Theorem 1 to guarantee the existence of answer sets.
Notice that, there are two requirements to translate a CFASP into a MANLP:
- (i)
The mappings in the body of the rules must be aggregator and/or negation operators. However, this is straightforwardly verified, according to the syntax of CFASPs.
- (ii)
Composition of negations, that is, literals of the form , are not allowed in MANLPs. In order to deal with this, in what follows, we devise a procedure to transform composited negations into a single negation.
Consider a rule r of the form with . The idea of the proposed method is introducing three new atoms (or propositional symbols) , and in order to represent the information given by :
is equivalent to
is equivalent to , and thus to
is equivalent to , and thus to
Notice that, the three previous statements can be modelled by the rules
respectively. Hence, the rule
r could be replaced by the rule
together with rules
,
and
.
In order to formalize the preceding approach, we will fix some notation. First and foremost, notice that we can assume without loss of generality that, for each rule in a CFASP and , is either an atom or a negated literal. Otherwise, if , then we consider the rule where .
Now, given a CFASP and , we say that the degree of b is the highest non-negative integer k such that appears in the body of some rule of , being the k-th composition of the operator ¬. From now on, the set of atoms of with degree will be denoted as .
Once the required notation has been introduced, the corresponding MANLP of a CFASP can formally be defined.
Definition 14. Let be a CFASP defined with a residuated implication ←. The corresponding MANLP
of
is defined on the multi-adjoint lattice with negation , being an adjoint pair, as the following set of rules:where the operator coincides with f andfor each . It is important to highlight that, given a rule , since f is an aggregator operator, the corresponding operator is also an aggregator. Furthermore, according to the syntax of CFASPs, ← is a residuated implication, and thus there exists an operator & such that is an adjoint pair. Hence, the program is well-defined, that is, is a MANLP. Notice that, when a CFASP is simple (Definition 7), then the obtained multi-adjoint program is a MALP.
Algorithm 2 shows how Definition 14 is applied in order to compute the corresponding MANLP of a CFASP.
Algorithm 2: Corresponding MANLP of a CFASP |
|
Example 10. Consider the CFASP given in Example 6, consisting of the rules In what follows, we compute the corresponding MANLP of by means of Algorithm 2. Notice that, the degree of p and t is 0, the degree of q and u is 1 and the degree of s is 2. Hence, by definition, and .
Let . According to lines 3 and 4, the rule is included in as In what regards the rule , it is included in as Similarly, the rules are adapted to be added to .
Concerning lines 5 and 6, as and , the next rules are added to : Finally, applying lines 7 and 8, we conclude adding into the rule Therefore, the corresponding MANLP of is defined on the multi-adjoint lattice with negation , and consists of the following rules: Now, we will present a technical result which will be useful in order to show the relationship between the answer sets of a CFASP and the stable models of its corresponding MANLP .
Lemma 1. Let be a CFASP, the corresponding MANLP of , , two interpretations and we define as if and for each . Then, is a model of the reduct if and only if is a model of the reduct , where M denotes the interpretation .
Proof. Taking into account that forms an adjoint pair, the following statements hold:
- (i)
satisfies the rule in the reduct if and only if .
- (ii)
satisfies a rule of the form in the reduct if and only if .
Notice that, the equalities and are satisfied. As a consequence, by definition of and M, we obtain that straightforwardly satisfies all rules in with head , with .
Now, note that a rule
belongs to
if and only if the rule
belongs to
. Since every
is a “positive” propositional symbol, with
, we can assert that the rule
given by
is in the reduct
if and only if the rule
r defined as
belongs to
. In what follows, we show that
satisfies the rule
if and only if
satisfies the rule
r. Clearly,
satisfies
if and only if
, or equivalently
On the other hand,
satisfies
r if and only if
, i.e.,
We will see that Equations (
6) and (
7) are identical. Indeed, as
for each
, the right-hand side of both inequalities coincide.
Now, given
, suppose that
. Then
and
, from which
. On the contrary, assume that
with
and
. In that case,
and
. Hence, the following chain of equalities hold:
Note that
, and thus
.
As a result, we conclude that
, for each
. Since
, Equations (
6) and (
7) coincide, as we want to demonstrate. Hence, we obtain then that
is a model of
if and only if
is a model of
□.
The following result shows that the answer sets of a CFASP are associated with a family of stable models of its corresponding MANLP .
Theorem 3. Let be a CFASP, the corresponding MANLP of , an interpretation and given by if and for each . Then, is an answer set of if and only if M is a stable model of .
Proof. By Lemma 1, we straightforwardly obtain that is a model of if and only if M is a model of . It remains to demonstrate that is the least model of if and only if M is the least model of . We will proceed by reductio ad absurdum. Suppose that M is the least model of but there exists a model of such that , that is, for each and there exists such that . According to Statement (1), the interpretation is then a model of . By definition of and M, we obtain , for each , and , for each . Furthermore, . Therefore , in contradiction with the hypothesis, since M is the least model of .
Suppose now that is the least model of but there exists a model of such that . Hence, we can consider the interpretation defined as , for each . Clearly, if , for some , then N does not satisfy the rule in the reduct . Therefore, we can assert that there exists such that and so, . Now, we consider the interpretation defined as , for each and , for all . Since N is a model of , then satisfies all rules in and so, is also a model of . Thus, by Lemma 1, we obtain that is a model of , contradicting the fact that is the least model of . □
The subsequent theorem completes the foundations of the equivalence between the semantics of a CFASP and its corresponding MANLP . Specifically, it states that the evaluation of under any stable model M of is equal to . As a result, we conclude that Theorem 3 covers all stable models of , and thus and are equivalent, from a semantical point of view.
Theorem 4. Let be a CFASP and the corresponding MANLP of . Any stable model M of satisfies , for each .
Proof. Let M be a stable model of , i.e., the least model of the reduct . We will proceed by induction on h.
Base case: We show that , for each .
Since M is a model of the reduct , M satisfies the rule in , and therefore . Furthermore, since M is actually the least model of and is the unique rule with head in , we conclude that , for each .
Inductive step: We assume is satisfied, for some , and we show that holds.
By an analogous reasoning to the base case,
M satisfies the rule
in
, from which
. Again, as
M is the least model of
and
is the unique rule with head
in
, we obtain that
must be equal to
. Now, taking into account the induction hypothesis, we deduce the required equality:
which finishes the proof. □
As a consequence of Theorems 3 and 4, given a CFASP and its corresponding MANLP , the number of answer sets of coincides with the number of stable models of .
Corollary 1. Let be a CFASP and its corresponding MANLP. Then, there exists an answer set of if and only if there exists a stable model of .
Proof. It straightforwardly follows from Theorems 3 and 4. □
Corollary 1 leads us to assert that, if one guarantees the existence of a stable model of , then the existence of an answer set of is ensured. As a result, Theorem 1 can be used to provide a sufficient condition for the existence of answer sets of a CFASP. In particular, the following result is obtained.
Corollary 2. Let be a CFASP. If the order-preserving mappings and the negation operator involved in the rules of are continuous operators, then there exists at least an answer set of .
Proof. Assume that the operators in the rules of are continuous. Taking into account the definition of the corresponding MANLP of and Theorem 1, we deduce that has at least a stable model. By Corollary 1, we conclude that has at least an answer set. □
This section concludes with an example in order to illustrate Corollary 2 and Theorems 3 and 4. More precisely, we retrieve the CFASP introduced in Example 6 and we ensure the existence of at least an answer set of . Then, we construct a stable model of its corresponding MANLP and we translate it into an answer set of .
Example 11. In Examples 6 and 10, the negation operator ¬ in the CFASP is clearly continuous. Furthermore, , , and are continuous mappings as well. Hence, Corollary 2 leads us to conclude that there exists at least an answer set of . For instance, consider the interpretation Since the corresponding MANLP of was already shown in Example 10, the reduct of with respect to I, denoted as , is given by the following rules: As there are no rules in with head u, we can assert that the least model M of satisfies . Moreover, as q, s, t, , , and appear in the head of only one rule, specifically in the head of , , , , , and , respectively, then: Finally, the value assigned to p by M is computed as follows: As I coincides with M, we conclude that I is the least model of . In other words, I is a stable model of . Hence, applying Theorem 3, I is an answer set of .