Hostname: page-component-78c5997874-fbnjt Total loading time: 0 Render date: 2024-11-10T16:59:09.677Z Has data issue: false hasContentIssue false

On Establishing Robust Consistency in Answer Set Programs

Published online by Cambridge University Press:  19 September 2022

ANDRE THEVAPALAN
Affiliation:
Technische Universität Dortmund, Dortmund, Germany (e-mails: andre.thevapalan@tu-dortmund.de, gabriele.kern-isberner@cs.uni-dortmund.de)
GABRIELE KERN-ISBERNER
Affiliation:
Technische Universität Dortmund, Dortmund, Germany (e-mails: andre.thevapalan@tu-dortmund.de, gabriele.kern-isberner@cs.uni-dortmund.de)
Rights & Permissions [Opens in a new window]

Abstract

Answer set programs used in real-world applications often require that the program is usable with different input data. This, however, can often lead to contradictory statements and consequently to an inconsistent program. Causes for potential contradictions in a program are conflicting rules. In this paper, we show how to ensure that a program $\mathcal{P}$ remains non-contradictory given any allowed set of such input data. For that, we introduce the notion of conflict-resolving ${\lambda}$-extensions. A conflict-resolving ${\lambda}$-extension for a conflicting rule r is a set ${\lambda}$ of (default) literals such that extending the body of r by ${\lambda}$ resolves all conflicts of r at once. We investigate the properties that suitable ${\lambda}$-extensions should possess and building on that, we develop a strategy to compute all such conflict-resolving ${\lambda}$-extensions for each conflicting rule in $\mathcal{P}$. We show that by implementing a conflict resolution process that successively resolves conflicts using ${\lambda}$-extensions eventually yields a program that remains non-contradictory given any allowed set of input data.

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press

1 Introduction

1.1 Motivation and context

Answer set programs can be used to implement real-world applications like decision support systems that aid knowledge experts whenever crucial decisions based on different rules and conditions have to be made. However, the knowledge bases of such applications are not static but rather very dynamic in the sense that they are adapted to each individual case and can also be prone to various updates. Especially in domains like the medical sector, knowledge bases are expected to yield suitable decisions for each patient where patients can show diverse symptoms (implemented by facts), and the knowledge base is to be updated very often, for example, every month. In addition, physicians are usually faced with some degree of uncertainty and for example have to rely on own experience when they have to reach important decisions (e.g. regarding the treatment of patients) (Ghosh Reference Ghosh2004). Imagine a system that outputs the possible treatment plans for a given patient based on a corresponding medical ruleset. For each patient, the application has to combine the general knowledge about possible treatment plans (problem encoding) with the data regarding the patient (problem instance) (Gebser et al. Reference Gebser, Kaminski, Kaufmann and Schaub2012). Furthermore, the knowledge base containing the encoding can grow over time, not only adding new knowledge but also revising or removing deprecated knowledge. Additionally, decision-making processes in this sector do not only consist of, for example, finding the right therapy for each patient, it is also important to assure that unfitting solutions are also reflected as such (e.g. what therapies must not be recommended to a patient). This emphasizes how the usage of an answer set program with both default and strong negation constitutes a highly valuable asset in assisting medical experts.

However, at any point where such an application is used, it has to be ensured that the respective knowledge base remains consistent when merged with the patient data. For a knowledge base that is frequently updated and that also has to be used with different instance data, maintaining consistency can become a quite cumbersome task as it requires not only a complete understanding of the whole problem encoding but also technical knowledge regarding logic programming. In previous approaches regarding the update of answer set programs (Eiter et al. Reference Eiter, Fink, Sabbatini and Tompits2002; Alferes et al. Reference Alferes, Leite, Pereira, Przymusinska and Przymusinski1998), every update required an automated adaptation of the updated program in order to prevent conflicts. Using these methods for a medical support system would mean that the changes that are made in the new program are not managed and approved by the knowledge expert. Naturally, these inconveniences can deter knowledge experts from using answer set programs for the implementation even though answer set programming itself is well suited for highly complex decision-making problems.

It is for this reason that we propose a general framework that allows the maintenance of a logic program by involving the expertise of knowledge experts more directly. Such maintenance tasks would include the detection of possible conflicting statements between the problem encoding and any possible instance data and the resolution of such conflicts. Note that the consistency of an answer set program crucially depends on its facts, in particular, its input data. Conflicts between rules may become apparent only if specific input data is provided, resulting in an unexpected failure in a specific (rare) case of an otherwise helpful and approved program. Our approach aims at anticipating such conflicts, ensuring that a program yields professionally adequate solutions for any (future) case. The resolution of such conflicts should be overseen by the knowledge expert and executed in an interactive fashion. To facilitate the conflict resolution, possible solutions for each conflict should be generated and presented to the expert on demand. They can then choose a most suitable solution. In this way it is guaranteed that every modification that is applied to the knowledge base is valid in a professional sense. Such an interactive exchange between the system and the expert during the resolution process can therefore eliminate the need for a deeper technical understanding of logic programming, giving the knowledge expert full control over the maintenance operations, guaranteeing that no changes are done blindly. Especially in fields like the medical sector, full expert control over the knowledge base is crucial as small mistakes can have serious consequences. The gap between a professional and a technical expert can be significant and make the automatic resolution of conflicts by suitable modifications of the program impossible. So, extensive communications between the two experts would be needed. The proposed framework constitutes a first step towards closing this gap as the conflict resolution process can be fully executed by the professional expert directly because all proposed modifications will be technically viable solutions of the conflict, and the expert can then choose from them according to professional standards. Being able to establish the consistency of the problem encoding for every possible instance data without actually requiring the explicit instance has the effect that, in practice, the program does not have to be validated for each instance, which makes it much more robust and reliable.

1.2 Main contributions

In order to facilitate the integration of answer set programming in real-world applications, in this paper, we show how to ensure that the problem encoding in a logic program remains consistent given any (allowed) set of consistent instance data. Inspired by Eiter et al. (Reference Eiter, Fink, Sabbatini and Tompits2002) and Alferes et al. (Reference Alferes, Leite, Pereira, Przymusinska and Przymusinski1998, Reference Alferes, Leite, Pereira, Przymusinska and Przymusinski2000) and their work on logic program updates, we develop a strategy to extend rules of a logic program such that the derivation of contradictory statements is no longer possible in any admissible case. The presented approach expands previous approaches in two major ways:

(1) Programs that are modified following our approach remain consistent for any given input data that do not contain atoms that appear in head literals of the program. For that, we extend the notion of literals and investigate the relationship between the different negated versions of a literal. This enables us to define the characteristics of conflicting and non-conficting rules, and in particular to determine how the body of a rule $r_i$ that is in conflict with several rules $r_j$ can be extended such that the modified rule $r'_i$ is no longer conflicting with any rule $r_j$ while the extension comprises only informative literals. By informative, we mean that these extensions should only be composed of literals whose atoms appear in the body of the rules involved in the conflict. For that reason, we also adapt the notion of hitting sets for (default) literals in logic program rules. As a result, the meaningfulness of the problem encoding is validated beforehand, eliminating the need for testing the encoding against all possible instances or other precautionary measures for each instance.

(2) Instead of using a technical device to prioritize one statement over another in case of a conflict like causal rejection ( Reference Eiter, Fink, Sabbatini and Tompits Eiter et al. 2002 ), we show how all informative extensions for a conflicting rule can be computed. As a consequence, a knowledge expert could then be included into the resolution process and choose the suggested rule modification that is most suitable such that the resulting modified program remains professionally adequate. Using informative extensions also maintains the readability of the rules in a program which in turn can simplify subsequent update operations.

(3) The final goal is the construction of a framework for the interactive maintenance of large ASP knowledge bases which can be used by knowledge experts without the need for technical knowledge and where each modification can be overseen by the expert. The approach presented in this paper is a basic building block for such a framework as the computation of all possible informative extensions can be used to resolve each conflict in cooperation with the knowledge expert which in turn guarantees that the resulting knowledge base still contains professionally adequate knowledge. We will also show that the approach follows a pragmatic paradigm which allows various extensions in order to facilitate the conflict resolution process for the expert.

1.3 Structure of the paper

The paper is organized as follows: We begin by providing the necessary preliminaries about extended logic programs in Section 2. In Section 3, we present our conflict resolution approach. We start in Section 3.1 by introducing the notion of uniformly non-contradictory program cores and examine the properties of conflicts and non-conflicting rules in Section 3.2 before we connect these results in Section 3.3 by defining the properties of a conflict resolution step. After describing a naÏve conflict resolution approach in Section 3.4 by using semi-normal completions (Caminada Reference Caminada2006), we present in Section 3.5 our strategy to compute all appropriate rule modifications of conflicting rules in order to obtain a uniformly non-contradictory program core. In Section 4, we present additional ways to use and extend the conflict resolution approach for the usage in real-world applications. Sections 4.1 and 4.2 show how the presented method can be used to resolve many-to-many conflicts and how inconsistency that can be caused by a specific type of constraints can be prevented. Sections 4.3 and 4.4 outline ways to enhance the handling of ${\lambda}$ -extensions in order to facilitate their usage in applications. The paper concludes with a summary and a discussion regarding future work.

2 Preliminaries

2.1 Extended Logic Programs

In this paper, we look at non-disjunctive extended logic programs (ELPs) (Gelfond and Lifschitz Reference Gelfond and Lifschitz1991). An ELP is a finite set of rules over a set $\mathcal{A}$ of propositional atoms. First, we discuss the different forms of negation in ELPs and introduce notations. A classical literal L is either an atom A (positive literal) or a negated atom $\neg A$ (negative literal). For a literal L, the strongly complementary literal $\overline{L}$ is $\neg A$ if ${L = A}$ and A otherwise. For a set S of classical literals, ${\overline{{S}} = \{\overline{L} \mid L \in {S}\}}$ is the set of corresponding strongly complementary literals. Then, ${Lit_{\mathcal{A}}}$ denotes the set ${\mathcal{A}} \cup \overline{{\mathcal{A}}}$ of all classical literals over ${\mathcal{A}}$ . A default-negated literal L, called default literal, is written as ${\thicksim} L$ . In logic programs, ${\thicksim}$ will be used as a prefix solely for classical literals, symbolyzing the default negation which is usually denoted by the prefix $\mathit{not}$ (Gelfond and Lifschitz Reference Gelfond and Lifschitz1991). Outside of logic programs, we will use ${\thicksim}$ as a unary junctor in order to describe the default complement of a (default) literal $({\thicksim})L$ , that is, the default complement of L is ${\thicksim} L$ and the default complement of ${\thicksim} L$ is ${\thicksim} {\thicksim} L = L$ . This reflects the binary characteristic of the default negation which is illustrated in Figure 1. For a set S of classical literals, we define ${\mathord{\thicksim}}$ accordingly, that is, ${{{\mathord{\thicksim}}{S}} = \{{{\mathord{\thicksim}}L} \mid L\in {S} \}}$ . Given a set S of (classical) literals, we say a (classical) literal L is true in S (symbolically ${{S} \vDash L}$ ) iff ${L \in {S}}$ and ${\thicksim} L$ is true in S (symbolically ${{S} \vDash {\thicksim} L}$ ) iff ${L \notin {S}}$ . By an extended literal ${L^*}$ , we either mean a (classical) literal L or a default-negated literal ${\thicksim} L$ . The set of all extended literals over a set of atoms ${\mathcal{A}}$ will be denoted by ${{Lit^\ast}_{\mathcal{A}}}$ , that is, ${{{Lit^\ast}_{\mathcal{A}}} = {Lit_{\mathcal{A}}} \cup {\thicksim} {Lit_{\mathcal{A}}}}$ . A set X of extended literals is true in S (symbolically ${S} \vDash {X}$ ) iff every extended literal ${{L^*} \in {X}}$ is true in S. With ${{atom({L^*})}}$ , we will associate the atom on which the extended literal L* is based on. The underlying atoms of a set X of extended literals is given by the set of atoms ${Atom(X)} = \{{atom({L^*})} \mid {L^*} \in X \}$ . Two extended literals ${L^*},{K^*}$ are atom-related if ${atom({L^*})} = {atom({K^*})}$ .

Fig. 1. Visualization of truth values of an atom A w.r.t. a set of literals S.

The following definition introduces handy terms to describe the relationships between literals.

Definition 1 Given a classical literal L, we say that

  • L and ${\thicksim} L$ are default complementary,

  • L and $ {\thicksim} \overline{L}$ are dual, and

  • ${\thicksim} L$ and ${\thicksim} \overline{L}$ are reconcilable.

Given two atom-related literals ${{L^*},{K^*}}$ with ${L^*} \neq {K^*}$ , we will say ${L^*}$ and ${K^*}$ are

  • complementary if ${L^*}, {K^*}$ are strongly or default complementary, and

  • compatible if ${L^*}, {K^*}$ are reconcilable or dual.

A set of classical literals is inconsistent if it contains strongly complementary literals. A set of extended literals is inconsistent if it contains complementary literals.

Figure 2 visualizes the different relationships that two atom-related literals ${L^*},{K^*}$ can have. The different negation types and the particular significance of reconcilable literals will be discussed in Section 3.3.

Fig. 2. Possible reationships between two atom-related literals.

We are now ready to specify the form of ELPs.

A rule r is of the form

(1) \begin{align} L_0 \leftarrow L_1, \dots, L_m, {\thicksim} L_{m+1}, \dots, {\thicksim} L_n.,\end{align}

with classical literals $L_0, \dots, L_n$ and $0 \leq m \leq n$ . The literal $L_0$ is the head of r, denoted by H(r), and $\{L_1, \dots L_m, {\thicksim} L_{m+1}, \dots {\thicksim} L_n\}$ is the body of r, denoted by B(r). Furthermore, $\{L_1, \dots, L_m\}$ is denoted by $B^{+}(r)$ and $\{L_{m+1}, \dots, L_n\}$ by $B^{-}(r)$ . Given a set of rules ${\mathcal{R}} \subseteq \mathcal{P}$ , we will denote the set of all extended literals occurring in the rule bodies of ${\mathcal{R}}$ by ${B^*(\mathcal{R})}$ , that is, ${B^*(\mathcal{R})} = \bigcup_{r \in {\mathcal{R}}} {B(r)}$ . A rule r with ${B(r)} = \emptyset$ is called a fact, and r is called a constraint if it has an empty head. For a fact L., we will call the corresponding literal L a fact literal. A set $\mathcal{F}$ of facts is consistent if the set of fact literals in $\mathcal{F}$ is consistent. A rule r will be called a complex rule if r is neither a fact nor a constraint. An extended logic program (ELP) is a set of rules of the form (1).

The program ${\mathcal{P}^{+}}$ will denote the reduction of $\mathcal{P}$ to a normal program (a logic program without classically negated literals) that is obtained by replacing every classically negated literal $\overline{A}$ in $\mathcal{P}$ by a new corresponding atom A’ (Gelfond and Lifschitz Reference Gelfond and Lifschitz1991).

A rule r is applicable iff there is a consistent set S of classical literals such that ${S} \vDash {B(r)}$ . For the rest of this paper, we will assume that every rule in a given logic program is applicable. Given a set S of classical literals, a (complex) rule r is true in S (symbolically ${{S} \vDash r}$ ) iff H(r) is true in S whenever B(r) is true in S. In case r is a constraint, r is true in S iff ${S} \not\vDash {B(r)}$ . Whenever a rule r is true in S we also say that S satisfies r. A rule body B(r) will be called satisfiable if there exists a consistent set S of classical literals such that ${S} \vDash {B(r)}$ . Correspondingly, given a set of rules ${\mathcal{R}} = \{r_1,\dots,r_n\}$ , the bodies of all rules in ${\mathcal{R}}$ are simultaneously satisfiable whenever there is a set S of classical literals such that ${S} \vDash {B(r)}$ for every rule $r \in {\mathcal{R}}$ . Given an ELP $\mathcal{P}$ without default negation, the answer set of $\mathcal{P}$ is either (a) the smallest set ${S} \subseteq {Lit_{\mathcal{A}}}$ such that S is consistent and ${S} \vDash r$ for every rule $r \in \mathcal{P}$ , or (b) the set ${Lit_{\mathcal{A}}}$ of classical literals. Note that similar to Horn logic programs, each such ELP has exactly one minimal model which might, however, be inconsistent.

In general, an answer set of an ELP $\mathcal{P}$ is determined by its reduct. The reduct $\mathcal{P}^{S}$ of a program $\mathcal{P}$ relative to a set S of classical literals is defined by

(2) \begin{align} \mathcal{P}^{S} = \{H(r) \leftarrow B^{+}(r). \mid r \in \mathcal{P}, B^{-}(r) \cap {S} = \emptyset \}.\end{align}

A set S of classical literals is an answer set of $\mathcal{P}$ if it is the answer set of $\mathcal{P}^{S}$ (Gelfond and Lifschitz Reference Gelfond and Lifschitz1991). The set of all answer sets of a program $\mathcal{P}$ will be denoted by $AS(\mathcal{P})$ . Note that since every inconsistent set of literals that satisfies all rules in $\mathcal{P}$ will be replaced by ${Lit_{\mathcal{A}}}$ , every reduct of $\mathcal{P}$ is formed relative to either a consistent set S or ${Lit_{\mathcal{A}}}$ . As a consequence, ${{AS(\mathcal{P})}}$ can either consist of only consistent sets of literals, only ${Lit_{\mathcal{A}}}$ , or no sets at all. We say a classical literal L is derivable in $\mathcal{P}$ iff ${L \in \bigcup AS(\mathcal{P})}$ . For a set T of classical literals, we say all literals in T are simultaneously derivable iff there exists an answer set ${S} \in AS(\mathcal{P})$ such that ${T} \subseteq {S}$ . Atoms that occur in the rule bodies of $\mathcal{P}$ but not in any rule head will be called external atoms and the set of external atoms will be denoted by ${\mathcal{E}_{\mathcal{P}}}$ . Atoms that occur in $\mathcal{P}$ that are not external will be called internal atoms. As stated in van Gelder et al. (Reference van Gelder, Ross and Schlipf1991), deductive databases are commonly viewed as logic programs as they consist of an external database, which is a set of facts, and the internal database, which is a set of rules. In software applications, often the same program is used with different input data. This can also be applied to extended logic programs. Similar to the division inside databases and the distinction between problem instance and encoding as mentioned before, we partition an ELP $\mathcal{P}$ into a set ${\mathcal{P}_{\mathcal{F}}}$ of facts which we will call input, and a set ${\mathcal{P}_{\mathcal{C}}}$ of rules which will be called program core. We define that any valid input ${\mathcal{P}_{\mathcal{F}}}$ for ${\mathcal{P}_{\mathcal{C}}}$ is a consistent set of facts over ${Lit{\mathcal{E}_{\mathcal{P}}}}$ and that ${\mathcal{P}_{\mathcal{C}}}$ can only comprise complex rules. The set of all valid inputs ${\mathcal{P}_{\mathcal{F}}}$ for a program core ${\mathcal{P}_{\mathcal{C}}}$ will be denoted by $I({\mathcal{P}_{\mathcal{C}}})$ . By $\Pi({\mathcal{P}_{\mathcal{C}}}) = \{{\mathcal{P}_{\mathcal{C}}} \cup {\mathcal{P}_{\mathcal{F}}} \mid {\mathcal{P}_{\mathcal{F}}} \in I({\mathcal{P}_{\mathcal{C}}})\}$ , we denote the set of all programs ${\mathcal{P}_{\mathcal{C}}}$ extended by a valid input ${\mathcal{P}_{\mathcal{F}}}$ for ${\mathcal{P}_{\mathcal{C}}}$ .

In Section 3.1, we will explain why it is necessary to restrict ${\mathcal{P}_{\mathcal{F}}}$ to literals in ${Lit{\mathcal{E}_{\mathcal{P}}}}$ . As mentioned above, default negation puts a classical literal L into a binary state w.r.t. a set S of classical literals. Either L is true in S while ${\thicksim} L$ is false in S or vice versa. With regard to strong negation however, this is not the case. In Figure 1, this distinction is illustrated by the gap between true and false on the level of A and $\overline{A}$ . Under three-valued semantics (Przymusinski Reference Przymusinski1991), this additional state is referred to as undefined. Atoms A and $\overline{A}$ are undefined in S if neither A nor $\overline{A}$ are derivable in S. Under answer set semantics, this undefinedness is covered by default literals, that is, both ${\thicksim} A$ and ${\thicksim} \overline{A}$ are simultaneously true whenever neither A nor $\overline{A}$ is derivable. It is for this reason that we introduced the notion of reconcilable literals. Even though for two reconcilable literals ${\thicksim} A, {\thicksim} \overline{A}$ , the atoms $A,\overline{A}$ “inside” the literals are strongly complementary, the default negation allows that both literals are true simultaneously in S, that is, $S \vDash \{{\thicksim} A,{\thicksim} \overline{A}\}$ whenever $A, \overline{A} \notin S$ .

2.2 Consistency

In Gelfond and Lifschitz (Reference Gelfond and Lifschitz1991), an answer set program $\mathcal{P}$ over $\mathcal{A}$ is inconsistent if $\mathcal{P}$ has no answer sets or its only answer set is ${Lit_{\mathcal{A}}}$ .

We will specify inconsistency in more detail by using the results in Schulz et al. (Reference Schulz, Satoh, Toni and Notes2015) where the authors define four different cases how and why an ELP can be inconsistent. There, in the first three cases 1, 2 and 3a, the inconsistency is essentially caused by classically complementary literals in the program, that is, by their simultaneous derivation. In the fourth case 3b, a so called negative dependency path exists that leads to the derivation of default-complementary literals. From a semantic viewpoint, in case 1 and 2, $\mathcal{P}$ has no well-founded models. In case 3a, $\mathcal{P}$ has a well-founded model, and the normal program ${\mathcal{P}^{+}}$ of $\mathcal{P}$ has one or more answer sets. In case 3b, $\mathcal{P}$ has a well-founded model but ${\mathcal{P}^{+}}$ has no answer sets. We will say that an inconsistent ELP $\mathcal{P}$ is contradictory if the inconsistency is caused by classically complementary literals (case 1, 2 or 3a). Otherwise, $\mathcal{P}$ will be called incoherent (case 3b). Footnote 1 In this work, we will only consider contradictory programs. The handling of incoherent programs is examined in Thevapalan et al. (Reference Thevapalan, Heyninck and Kern-Isberner2021) as well as in Costantini (Reference Costantini2006).

The presented method will guarantee that a modified ELP $\mathcal{P}$ is not contradictory with any valid input ${\mathcal{P}_{\mathcal{F}}}$ . For this reason, we introduce the notion of uniformly non-contradictory program cores.

Definition 2 (Uniformly Non-Contradictory Program Core) A program core ${\mathcal{P}_{\mathcal{C}}}$ of an ELP $\mathcal{P}$ over $\mathcal{A}$ is uniformly non-contradictory if for every valid input ${\mathcal{P}_{\mathcal{F}}}$ for ${\mathcal{P}_{\mathcal{C}}}$ , ${\mathcal{P}_{\mathcal{C}}} \cup {\mathcal{P}_{\mathcal{F}}}$ is not contradictory.

Corollary 1 Given a uniformly non-contradictory program core ${\mathcal{P}_{\mathcal{C}}}$ over ${\mathcal{A}}$ , for every $\mathcal{P} \in \Pi({\mathcal{P}_{\mathcal{C}}})$ the following holds: either $S \neq {Lit_{\mathcal{A}}}$ for every $S \in AS(\mathcal{P})$ , or $\mathcal{P}$ is incoherent. Naturally, given a program core ${\mathcal{P}_{\mathcal{C}}}$ , every program $\mathcal{P} \in \Pi({\mathcal{P}_{\mathcal{C}}})$ is uniformly non-contradictory whenever ${\mathcal{P}_{\mathcal{C}}}$ is.

As stated in Gelfond and Lifschitz (Reference Gelfond and Lifschitz1991) and implied by Corollary 1, non-contradictory program cores do not guarantee consistent programs since an ELP that is free of contradictions could potentially still be incoherent. Detecting incoherence and establishing coherence in an ELP, though, is a separate task (see Schulz et al. Reference Schulz, Satoh, Toni and Notes2015; Schulz Reference Schulz2017) and outside of the scope of this paper. We, therefore, assume that in the following, any given ELP is coherent if not stated otherwise.

3 Contradictions

The aim of this paper is to present a method that analyzes program cores and computes possible modifications such that the modified program core becomes uniformly non-contradictory. The presented method will, therefore, ensure that given a program core ${\mathcal{P}_{\mathcal{C}}}$ , there is no contradictory ELP $\mathcal{P} \in \Pi({\mathcal{P}_{\mathcal{C}}})$ . To that end, we first identify what may cause contradictions. We will then show how to find the causes (conflict detection) and remove them (conflict resolution). In this section, we will assume that any given program core ${\mathcal{P}_{\mathcal{C}}}$ does not contain constraints. The influence of constraints with respect to the consistency of the program will be examined in Section 4.2.

3.1 Conflicts

To find rules that could potentially lead to contradictions, one has to look at rules with strongly complementary head literals. We will call two rules with strongly complementary head literals conflicting if both rule bodies are simultaneously satisfiable by a consistent set of classical literals.

Definition 3 (Conflicting Rules, Conflict Thevapalan and Kern-Isberner Reference Thevapalan and Kern-Isberner2020) Suppose an ELP $\mathcal{P}$ . Two rules ${r,r'\in {\mathcal{P}_{\mathcal{C}}}}$ , $r \neq r'$ , are conflicting (written as $r \bowtie r'$ ) if H(r) and H(r’) are strongly complementary and there exists a consistent set of classical literals ${{S} \subseteq {Lit_{\mathcal{A}}}}$ such that B(r) and B(r’) are true in S. A conflict is a pair (r,r’) of rules such that r,r’ are conflicting. We will denote the set of all conflicts (r,r’) in an ELP $\mathcal{P}$ by ${\mathit{Conflicts}({\mathcal{P}})}$ , and correspondingly the set of all conflicts (r,r’) involving a rule r will be denoted by ${\mathit{conflicts}({r})}$ . Furthermore, we will refer to the set of rules $r' \in \mathcal{P}$ that are conflicting with r in $\mathcal{P}$ as adversarial rules of r, denoted by Adv(r), that is, ${{Adv(r)} = \{r' \mid r \bowtie r', r'\in \mathcal{P}\}}$ . We will call two rules r,rnon-conflicting (symbolically ) iff $r \bowtie r'$ does not hold.

Remark 1: (a) If ${r,r' \subseteq {\mathcal{P}_{\mathcal{C}}}}$ are conflicting rules, then there exists a consistent set S of classical literals such that ${{S} \vDash {B(r)},{B(r)}[r']}$ . Consequently, there is a set of facts $\mathcal{F}$ (obtained from S in a straighforward way) such that ${{\mathcal{P}_{\mathcal{C}}} \cup \mathcal{F}}$ is contradictory. (b) The identification of two rules as conflicting is done independently of the rest of the program core and especially independently of any set $\mathcal{F}$ of currently given facts.

Proposition 1 Given an ELP $\mathcal{P}$ over ${\mathcal{A}}$ , its program core ${\mathcal{P}_{\mathcal{C}}}$ is uniformly non-contradictory if ${\mathcal{P}_{\mathcal{C}}}$ does not contain any conflicts.

Proof. Assume an ELP $\mathcal{P}$ whose core ${\mathcal{P}_{\mathcal{C}}}$ is not uniformly non-contradictory. Then, by Definition 2, there exists a valid input ${\mathcal{P}_{\mathcal{F}}}$ such that $\mathcal{P}={\mathcal{P}_{\mathcal{C}}} \cup {\mathcal{P}_{\mathcal{F}}}$ is contradictory. This implies that there exist two complementary literals $L,\overline{L}$ that are simultaneously derivable in $\mathcal{P}$ . $L,\overline{L}$ are only simultaneously derivable if either (a) $\{L.,\overline{L}.\} \subseteq {\mathcal{P}_{\mathcal{F}}}$ , or (b) $L. \in {\mathcal{P}_{\mathcal{F}}}$ and there exists a rule $r \in {\mathcal{P}_{\mathcal{C}}}$ with ${H(r)}=\overline{L}$ such that B(r) is satisfied in $\mathcal{P}$ , or (c) there exist two rules $r,r'\in {\mathcal{P}_{\mathcal{C}}}$ with ${H(r)}=L,{H(r')}=\overline{L}$ such that B(r),B(r’) are satisfied in $\mathcal{P}$ . Regarding (a): ${\mathcal{P}_{\mathcal{F}}}$ cannot contain fact literals $L,\overline{L}$ because ${\mathcal{P}_{\mathcal{F}}}$ has to be consistent by definition. Regarding (b): ${\mathcal{P}_{\mathcal{F}}}$ does only contain facts over external atoms. Since, by definition, external atoms do not occur in rule heads of ${\mathcal{P}_{\mathcal{C}}}$ , L. cannot be in ${\mathcal{P}_{\mathcal{F}}}$ whenever there is a rule in ${\mathcal{P}_{\mathcal{C}}}$ with head literal $\overline{L}$ . Therefore, the only way how $L,\overline{L}$ could be derived simultaneously is if (c) holds, that is, if there exist two rules r,r’ in ${\mathcal{P}_{\mathcal{C}}}$ with complementary rule heads that are satisfiable in $\mathcal{P}$ . Consequently, if ${\mathcal{P}_{\mathcal{C}}}$ is not uniformly non-contradictory, then ${\mathcal{P}_{\mathcal{C}}}$ contains at least one conflict.

In nonmonotonic logics, the possible occurence of contradictions is often dealt with by restricting the syntax of knowledge representation languages. As mentioned before, restricting the set of possible facts in ${\mathcal{P}_{\mathcal{F}}}$ to facts over external atoms of the respective program core limits the expressibility in programs. But this limitation assures that contradictions via a rule in ${\mathcal{P}_{\mathcal{C}}}$ and a fact in ${\mathcal{P}_{\mathcal{F}}}$ cannot arise even if ${\mathcal{P}_{\mathcal{C}}}$ is conflict-free since those kinds of contradictions are not caused by conflicts between complex rules in ${\mathcal{P}_{\mathcal{C}}}$ . Therefore, in the following, ${\mathcal{P}_{\mathcal{F}}}$ will only consist of fact literals over ${\mathcal{E}_{\mathcal{P}}}$ .

3.2 Conflict detection

We will now analyze the properties of (non-)conflicting rules. For two rules with complementary heads to be conflicting, both their bodies have to be satisfiable by at least one consistent set of literals. Table 1 shows the different combinations in which an atom ${A \in {\mathcal{A}}}$ can appear as a classical literal L in an ELP $\mathcal{P}$ over ${\mathcal{A}}$ in the bodies of two rules r,r’ with complementary rule heads. For each case, the table states whether both rule bodies can hold simultaneously and consequently, whether L makes the two rules explicitly non-conflicting, or a conflict might be possible. It is easy to see that r,r’ are non-conflicting whenever the corresponding extended literals in B(r),B(r’) that are based on A are strongly or default complementary. These observations lead to the following conclusion:

Table 1. Relationship between two rules r,r’ with complementary head literals w.r.t. a literal ${L=A}$

Theorem 1 Let $\mathcal{P}$ be a program with rules ${r,r'\in {\mathcal{P}_{\mathcal{C}}}}$ . Two rules r,r’ are conflicting if and only if

  1. (CP1) H(r),H(r’) are strongly complementary, and

  2. (CP2) ${B^{+}(r_1) \cap B^{-}(r_2) = \emptyset}$ such that $r_1,r_2 \in \{r,r'\}, r_1 \neq r_2$ , and

  3. (CP3) ${B^{+}(r) \cup B^{+}(r')}$ is consistent.

Proof. Suppose an ELP $\mathcal{P}$ over ${\mathcal{A}}$ , and rules r,r’ in ${\mathcal{P}_{\mathcal{C}}}$ that satisfy (CP1), (CP2), and (CP3). For rules r,r’ to be conflicting according to Definition 3, their head literals have to be strongly complementary, that is, ${L = {H(r)}}$ and ${\overline{L} = {H(r)}[r']}$ . This is satisfied via (CP1). Definition 3 also requires that for r,r’ to be conflicting, there has to exist a consistent set ${S} \subseteq {Lit_{\mathcal{A}}}$ of classical literals for which the bodies B(r), B(r’) are true. We show that ${{S} = B^{+}(r) \cup B^{+}(r')}$ is such a set. By (CP3), S is consistent. In order for S to satisfy both rule bodies B(r), B(r’) simultaneously, S has to have the following properties by definition: (a) ${S} \cap (B^{-}(r) \cup B^{-}(r')) = \emptyset$ and (b) $B^{+}(r) \cup B^{+}(r') \subseteq {S}$ . (b) is trivially fulfilled. Regarding (a), we determine

(3)

Due to our assumption (see Remark 1), the first and the last intersection in (3) are empty, and due to (CP2), also the middle ones in (3) are empty. Altogether, we have ${S} \cap (B^{-}(r) \cup B^{-}(r')) = \emptyset$ which yields (a). So, (r,r’) is a conflict in $\mathcal{P}$ .

Conversely, let $\mathcal{P}$ be an ELP with conflicting rules $r,r' \in {\mathcal{P}_{\mathcal{C}}}$ . (CP1) holds, since by definition, the head literals of r and r’ are strongly complementary. Furthermore, there exists a consistent set S of classical literals such that B(r) and B(r’) are true in S. Since S cannot satisfy two classical literals L and ${\thicksim} L$ simultaneously, (CP2) holds. As S is consistent, its subset $B^{+}(r) \cup B^{+}(r')$ is also consistent. Therefore, (CP3) holds.

Given (CP2) and (CP3) in Theorem 1 and Table 1, we can see that r,r’ are not conflicting whenever B(r) contains a literal L such that B(r’) contains a literal that is either strongly or default-complementary to L.

Definition 4 (Conflict-Preventing Literals) Given an ELP $\mathcal{P}$ and two rules ${r,r' \in {\mathcal{P}_{\mathcal{C}}}}$ with complementary heads, two extended literals ${{L^*} \in {B(r)}}$ , ${{K^*} \in {B(r')}}$ are conflict-preventing if ${L^*}$ and ${K^*}$ are atom-related and complementary.

This leads us to the following observation:

Proposition 2 Let $\mathcal{P}$ be an ELP with two rules $r,r' \in \mathcal{P}$ with complementary heads. The rules r,r’ are non-conflicting iff there exist two extended literals ${L^*} \in {B(r)},{K^*} \in {B(r)}$ such that ${L^*},\;{K^*}$ are conflict-preventing.

Proof. Two conflict-preventing literals ${{L^*} \in {B(r)}}$ , ${{K^*} \in {B(r')}}$ are either (a) default-complementary or (b) strongly complementary. In case of (a), the rules r,r’ will not satisfy (CP2) in Definition 3, and in case of (b), (CP3) is not met. On the other hand, if two rules r,r’ with complementary head literals are non-conflicting, then by Definition 3 either condition (CP2) or (CP3) or both are not met. As shown before, (CP2) (resp. (CP3)) can only be not satisfied by r,r’ if their bodies contain default-complementary (resp. strongly complementary) literals ${L^*},{K^*}$ . In both cases, ${L^*},{K^*}$ are conflict-preventing literals.

Example 1 Consider the ELP $\mathcal{P}_{1}$ :

\begin{align*} {r_1{:}\ } & x \leftarrow a, {\thicksim} b.\\ {r_2{:}\ } & \overline{x} \leftarrow b, {\thicksim} c. \\ {r_3{:}\ } & \overline{x} \leftarrow \overline{a}, {\thicksim} b. \\ {r_4{:}\ } & \overline{x} \leftarrow a, \overline{b}. \\ {r_5{:}\ } & \overline{x} \leftarrow c, d. \end{align*}

$\mathcal{P}_{1}$ has two conflicts: $(r_1,r_4)$ and $(r_1,r_5)$ . The rules $r_1, r_2$ violate (CP2) and have the conflict-preventing literals $b,{\thicksim} b$ . The rules $r_1, r_3$ violate (CP3) and have the conflict-preventing literals $a,\overline{a}$ .

3.3 Conflict resolution

Next, we will show how to resolve conflicts in an ELP $\mathcal{P}$ . To resolve all conflicts in $\mathcal{P}$ , one or both rules of each conflict in ${\mathit{Conflicts}({\mathcal{P}})}$ have to be modified such that ${\mathcal{P}_{\mathcal{C}}}$ becomes uniformly non-contradictory. We will call the modification of $\mathcal{P}$ to $\mathcal{P}'$ a conflict resolution step whenever at least one conflict is resolved and a sequence of conflict resolution steps $\langle {\mathcal{P}^{(1)}}, {\mathcal{P}^{(2)}}, \dots, {\mathcal{P}^{(n)}} \rangle$ will be called conflict resolution process. We present an approach to compute possible solutions to resolve a conflict in $\mathcal{P}$ such that the following properties hold:

  1. (P1) The conflict resolution process is successful. By that, we mean that a conflict resolution process where in each step a computed resolution option is applied will eventually lead to a non-contradictory program core, that is, a finite sequence of conflict resolution steps $\langle {\mathcal{P}^{(1)}}, \dots, {\mathcal{P}^{(n)}} \rangle$ such that ${\mathit{Conflicts}({{\mathcal{P}^{(n)}}})} = \emptyset$ .

  2. (P2) Each conflict resolution step is minimally invasive as it only consists of extending the body of a conflicting rule. This means, for every rule $r \in {\mathcal{P}_{\mathcal{C}}}$ with ${\mathit{conflicts}({r})} \neq \emptyset$ , the corresponding modified rule $r' \in {\mathcal{P}_{\mathcal{C}}}'$ satisfies that ${H(r)}[r'] = {H(r)}$ and ${B(r)}[r'] \supseteq {B(r)}[r]$ , and for every other rule r, it holds that $r'=r$ .

  3. (P3) Each rule that is modified during the resolution process remains applicable.

Given an ELP $\mathcal{P}$ over a set of atoms ${\mathcal{A}}$ and a rule $r_i \in {\mathcal{P}_{\mathcal{C}}}$ with a non-empty set ${\mathit{conflicts}({r_i})}$ , we want to modify $r_i$ to a rule $r_i'$ such that every conflict in ${\mathit{conflicts}({r_i})}$ is resolved, that is, ${{\mathit{conflicts}({r'_i})} = \emptyset}$ . For that, our approach analyzes how the extended literals ${{Lit^\ast}_{\mathcal{A}}}$ of $\mathcal{P}$ jointly appear in the rules of ${Adv(r_i)}$ , and computes conflict-resolving extensions for $r_i$ .

Definition 5 Given an ELP $\mathcal{P}$ over ${\mathcal{A}}$ and a rule $r_i \in \mathcal{P}$ , a ${\lambda}$ -extension ${\lambda(r_i)}$ for $r_i$ is a set of extended literals ${{L^*} \in {Lit{\mathcal{E}_{\mathcal{P}}}}}$ such that ${Atom({\lambda(r_i)})} \cap {Atom({B(r)}[r_i])} = \emptyset$ . A rule $r'_i$ of the form

(4) \begin{align} {{r'_i}{:}\ } {H(r)}[r_i] \leftarrow {B(r)}[r_i], {\lambda(r_i)}. \end{align}

will be called a ${\lambda}$ -extended rule w.r.t. ${\lambda(r_i)}$ .

To resolve all conflicts $(r_i,r_j) \in {\mathit{conflicts}({r_i})}$ of a rule $r_i \in \mathcal{P}$ , we want to gather those ${\lambda}$ -extensions ${\lambda(r_i)}$ for $r_i$ such that the ${\lambda}$ -extended rule $r'_i$ w.r.t. ${\lambda(r_i)}$ and each $r_j$ are not conflicting, that is, ${\mathit{conflicts}({r'_i})} = \emptyset$ .

Definition 6 Given an ELP $\mathcal{P}$ over ${\mathcal{A}}$ and a rule $r_i \in \mathcal{P}$ with ${Adv(r_i)} \neq \emptyset$ , a ${\lambda}$ -extension ${\lambda(r_i)}$ for $r_i$ is conflict-resolving iff ${Adv(r'_i)} = \emptyset$ where $r'_i$ is the ${\lambda}$ -extended rule w.r.t. ${\lambda(r_i)}$ . We say a conflict-resolving ${\lambda}$ -extension for $r_i$ resolves all conflicts in ${\mathit{conflicts}({r_i})}$ simultaneously.

Hence, in order to obtain a uniformly non-contradictory program core ${\mathcal{P}_{\mathcal{C}}}$ , we resolve all conflicts in ${\mathcal{P}_{\mathcal{C}}}$ by extending the bodies of particular conflicting rules by a respective conflict-resolving ${\lambda}$ -extension.

We can show that extending a rule in $\mathcal{P}$ by a ${\lambda}$ -extension does not lead to additional conflicts.

Proposition 3 Let $\mathcal{P}_\tau = \mathcal{P} \backslash \{r_i\}$ be the set of all rules in $\mathcal{P}$ other than $r_i$ . Let furthermore $r'_i$ be the ${\lambda}$ -extended rule w.r.t. a ${\lambda}$ -extension ${\lambda(r_i)}$ and $\mathcal{P}' = \mathcal{P}_\tau \cup \{r'_i\}$ the program where $r_i$ is replaced by $r'_i$ . Then, ${\mathit{Conflicts}({\mathcal{P}'})} \subseteq {\mathit{Conflicts}({\mathcal{P}})}$ .

Proof. Suppose a rule $r_j \in \mathcal{P}$ such that $r'_i \bowtie r_j$ holds. Then by Proposition 2, ${B(r)}[r_j]$ and ${B(r)}[r'_i]$ do not contain conflict-preventing literals. Since ${B(r)}[r_i] \subseteq {B(r)}[r'_i]$ , this implies that ${B(r)}[r_j]$ and ${B(r)}[r_i]$ do not contain conflict-preventing literals either and, therefore, $r_j \bowtie r_i$ holds. Consequently, if a ${\lambda}$ -extended rule $r'_i$ w.r.t. a ${\lambda}$ -extension ${\lambda(r_i)}$ is in conflict with another rule $r_j \in \mathcal{P}$ , then $r_i$ and $r_j$ are already conflicting.

Note that Proposition 3 holds for general ${\lambda}$ -extensions and not exclusively for conflict-resolving ones.

Extending ${B(r_i)}$ with a subset-minimal ${\lambda}$ -extension ${\lambda(r_i)}$ , therefore, constitutes a cautious change in $\mathcal{P}$ . As a consequence, a uniformly non-contradictory program core ${\mathcal{P}_{\mathcal{C}}}$ is obtained by applying changes to ${\mathcal{P}_{\mathcal{C}}}$ that are justified in the technical and logical sense.

3.4 A Naïve approach: Semi-normal completion

Preventing the derivation of contradictions is a well-known problem. In default logic for example, normal default theories in Reiter (Reference Reiter1980) provide a solution to this problem by restricting the form of defaults. In normal default theory, every default has to be of the form $\frac{\alpha:\beta}{\beta}$ , meaning that $\beta$ can only be concluded if $\alpha$ is explicitly true and $\beta$ can be assumed to be true. This guarantees that the default theory has at least one extension. This idea was adapted for rules of logic programs by Caminada in Caminada (Reference Caminada2006), Caminada and Sakama (Reference Caminada and Sakama2006). In Caminada (Reference Caminada2006), semi-normal defeasible rules are introduced. These rules have the following form:

(5) \begin{align} {{r}{:}\ } L_0 \leftarrow L_1, \dots, L_m, {\thicksim} L_{m+1}, \dots, {\thicksim} L_n, {\thicksim} \overline{L}_0.\end{align}

Obviously, if a program core ${\mathcal{P}_{\mathcal{C}}}$ only consists of semi-normal defeasible rules, ${\mathcal{P}_{\mathcal{C}}}$ is also uniformly non-contradictory. The transformation of a program core ${\mathcal{P}_{\mathcal{C}}}$ to a uniformly non-contradictory core $SN({\mathcal{P}_{\mathcal{C}}})$ using semi-normal defeasible rules can, therefore, be defined in a straightforward way. The semi-normal completion $SN({\mathcal{P}_{\mathcal{C}}})$ of ${\mathcal{P}_{\mathcal{C}}}$ arises from the extension of the body of each rule $r \in {\mathcal{P}_{\mathcal{C}}}$ by the literal that is dual to the head literal of r.

Definition 7 Given a rule ${{r}{:}\ } L \leftarrow {B(r)}.$ , the semi-normal completion sn(r) of r is a rule of the following form:

\begin{equation*}{{sn(r)}{:}\ } L \leftarrow {B(r)}, {\thicksim} \overline{L}.\end{equation*}

Definition 8 Given a program core ${\mathcal{P}_{\mathcal{C}}}$ , the semi-normal completion $SN({\mathcal{P}_{\mathcal{C}}})$ of ${\mathcal{P}_{\mathcal{C}}}$ is the program core $SN({\mathcal{P}_{\mathcal{C}}}) = \{sn(r) \mid r \in {\mathcal{P}_{\mathcal{C}}} \}$ .

In case there is a conflict in the initial program core ${\mathcal{P}_{\mathcal{C}}}$ , this conflict is prevented by the additional literals in the rule bodies of the conflicting rules which are dual to the respective head literal.

It is easy to see that when using a semi-normal completed program core ${\mathcal{P}_{\mathcal{C}}}$ over ${\mathcal{A}}$ , the restriction that a valid input ${\mathcal{P}_{\mathcal{F}}}$ for ${\mathcal{P}_{\mathcal{C}}}$ can only consist of literals over ${\mathcal{E}_{\mathcal{P}}}$ becomes void. Instead, it would allow the input ${\mathcal{P}_{\mathcal{F}}}$ for ${\mathcal{P}_{\mathcal{C}}}$ to be over ${\mathcal{A}}$ . However, this type of automated conflict-prevention does not explicitly resolve the underlying problems, that is, the actual contradictions that are modelled by the rules of the initial ${\mathcal{P}_{\mathcal{C}}}$ .

Example 2 Consider the following program core:

\begin{align*} {{SN(\mathcal{P}_\mathcal{C,{2}})}{:}~~~} {r_1{:}\ } &{\overline{\mathit{allergicToPeanuts}}} \leftarrow {\thicksim} \mathit{allergicEvent}. \\ {r_2{:}\ } &\mathit{allergicToPeanuts} \leftarrow \mathit{testedPositivePA}. \\ {r_3{:}\ } &\mathit{canEatPeanuts} \leftarrow {\overline{\mathit{allergicToPeanuts}}}. \end{align*}

$\mathcal{P}_\mathcal{C,{2}}$ states that if someone never had an allergic event, they are not allergic to peanuts. If someone is tested positive for a peanut allergy, they are indeed allergic to it. If someone is explicitly not allergic to peanuts, they are allowed to eat peanuts. The semi-normal completion of $\mathcal{P}_{{2},\mathcal{C}}$ yields:

\begin{align*} {{SN(\mathcal{P}_\mathcal{C,{2}})}{:}~~~} {{sn(r_1)}{:}\ } &{\overline{\mathit{allergicToPeanuts}}} \leftarrow {\thicksim} \mathit{allergicEvent}, {\thicksim} \mathit{allergicToPeanuts}. \\ {{sn(r_2)}{:}\ } &\mathit{allergicToPeanuts} \leftarrow \mathit{testedPositivePA}, {\thicksim} {\overline{\mathit{allergicToPeanuts}}}. \\ {{sn(r_3)}{:}\ } &\mathit{canEatPeanuts} \leftarrow {\overline{\mathit{allergicToPeanuts}}}, {\thicksim} {\overline{\mathit{canEatPeanuts}}}. \end{align*}

Assume the input ${\mathcal{P}_{\mathcal{F}}} = \{\mathit{testedPositivePA}.\}$ for $SN(\mathcal{P}_\mathcal{C,{2}})$ . For ${\mathcal{P}_{\mathcal{F}}} \cup SN(\mathcal{P}_\mathcal{C,{2}})$ , we get the answer sets

\begin{align*} S_1 &= \{\mathit{testedPositivePA},\mathit{allergicToPeanuts}\}\text{, and}\\ S_2 &= \{\mathit{testedPositivePA},{\overline{\mathit{allergicToPeanuts}}}, \mathit{canEatPeanuts}\}. \end{align*}

Clearly, $S_2$ shows that $\mathcal{P}_\mathcal{C,{2}}$ contains wrong information or lacks crucial information. For example, in this case, $r_1$ only looks at allergic events without considering the possibility that one never consumed a peanut and therefore never had a reaction to begin with.

Semi-normal completions of conflicting rules rather “bypass” potential contradictions as the complementary statements are just considered separately instead of at the same time, which, of course, leads to contradictions. This, in turn, means that given a program core ${\mathcal{P}_{\mathcal{C}}}$ with conflicting rules, solving programs $\mathcal{P} \in \Pi(SN({\mathcal{P}_{\mathcal{C}}}))$ with the semi-normal completed program core will in fact yield answer sets that are not adequate in the professional sense as at least one of the answer sets will represent unintended conclusions as we have seen in Example 2. From a functional perspective, such an effect is not desirable whatsoever. Semi-normal completions can, therefore, be in fact regarded as quickfixes in order to assure consistent answer sets regardless of what the resulting answer sets actually represent. Example 2 illustrates that semi-normal program cores do not suffice if one wants to establish a knowledge base that represents adequate information and their relations in the professional sense. To incrementally repair the knowledge base, one has to analyze conflicting rules and explicitly add, remove, or modify rules in order to get rid of all conflicts.

3.5 Conflict resolution with informative extensions

In the following, we present an approach to obtain uniformly non-contradictory program cores by computing conflict-resolving ${\lambda}$ -extensions for rules $r_i$ . Since ${\lambda}$ -extensions only comprise literals whose atoms occur in the bodies of the adversaries $r_j \in {Adv(r_i)}$ and that do not contain literals that are atom-related to ${H(r)}[r_i]$ , the extensions are informative in the sense that they utilize the body literals of the rules that are involved in the conflicts of $r_i$ without introducing new atoms or using the head literal. Semi-normal completions are, in comparison, a purely technical device to prevent contradictions and thus not informative.

According to Theorem 1, for every rule ${r_j \in {Adv(r_i)}}$ , ${\lambda(r_i)}$ has to contain at least one conflict-preventing literal, that is, an extended literal ${L^*}$ such that there exists an extended literal ${{K^*} \in {B(r)}[r_j]}$ and ${L^*},{K^*}$ are complementary. This means that a conflict-resolving ${\lambda}$ -extension for $r_i$ can be obtained by finding a set ${\beta}$ of literals that contains at least one body literal of each rule $r_j \in {Adv(r_i)}$ and that does not contain any literals that occur in the body of $r_i$ . This set ${\beta}$ can then be transformed into a conflict-resolving ${\lambda}$ -extension ${\lambda(r_i)}$ by negating each literal in this set. It is easy to see that in order for the ${\lambda}$ -extended rule $r'_i$ to remain applicable, each computed conflict-resolving ${\lambda}$ -extension and therefore each such ${\beta}$ has to meet additional constraints which we will explore next.

In order to compute these sets ${\beta}$ , we will first adapt the notion of hitting sets (Berge Reference Berge1989) as follows: Let ${{\mathcal{AB}(r_i)} = \{{B(r)}[r_j] \mid r_j \in {Adv(r_i)}\}}$ be the collection of all rule bodies in ${\mathcal{P}_{\mathcal{C}}}$ whose rules are in conflict with ${r_i}$ . A hitting set of ${\mathcal{AB}(r_i)}$ is a subset ${h \subseteq {{Lit^\ast}_{\mathcal{A}}}}$ that meets every set in ${\mathcal{AB}(r_i)}$ , that is, ${{B(r)}[r_j] \cap h \neq \emptyset}$ for every ${{B(r)}[r_j] \in {\mathcal{AB}(r_i)}}$ . A hitting set h is minimal if there does not exist a proper subset of h that is also a hitting set. It is easy to see that minimal hitting sets of ${\mathcal{AB}(r_i)}$ provide a good starting point to attain suitable conflict-resolving extensions ${\lambda(r_i)}$ since every hitting set shares at least one extended literal with the body of every rule ${r_j \in {Adv(r_i)}}$ . One could assume that to compute a set of conflict-preventing literals, it suffices to just take any minimal hitting set of ${\mathcal{AB}(r_i)}$ and simply default- or strongly negate each extended literal of that hitting set. But as mentioned before, not every hitting set can be used to compute conflict-resolving extensions as there are some more conditions that have to be met. We have to ensure that a ${\lambda}$ -extended rule $r'_i$ of $r_i$ is still applicable. The applicability is not given if (a) the conflict-resolving extension itself is already inconsistent or (b) the extended rule body ${B(r'_i)}$ becomes inconsistent. Case (a) applies if a hitting set h contains complementary or reconcilable literals ${L^*},{K^*}$ as every combination of their strongly and default negated complement is also complementary. Footnote 2 To ensure that (b) does not apply, we only consider those hitting sets that do not comprise literals that are atom-related to literals in ${B(r_i)}$ . Hence, hitting sets that contain complementary or reconcilable literals and hitting sets that share common underlying atoms with ${B(r_i)}$ will not be used to compute conflict-resolving ${\lambda}$ -extensions.

Remark 2: The restriction emerging from (b) is a bit stricter than necessary as rules with atom-related literals in their bodies are still satisfiable if these atom-related literals are compatible. But in order to avoid unnecessary technicalities, we will omit this special case here.

All these restrictions lead us to the following extension of hitting sets called blankets which we will use to compute proper conflict-resolving ${\lambda}$ -extensions:

Definition 9 (Blanket) A blanket ${\beta}$ for ${Adv(r_i)}$ is a non-empty, $\subseteq$ -minimal, consistent set of extended literals ${{L^*} \in {{Lit^\ast}_{\mathcal{A}}}}$ without reconcilable literals such that ${{Atom({\beta})} \cap {Atom({B(r)}[r_i])} = \emptyset}$ and for each ${r_j \in {Adv(r_i)}}$ , there exists an extended literal ${{L^*} \in {\beta}}$ with ${{L^*} \in {B(r)}[r_j]}$ . We denote the set of all blankets for ${Adv(r_i)}$ by ${blankets({Adv(r_i)})}$ .

Example 3 Suppose the following rules:

\begin{align*} {r_1{:}\ } a &\leftarrow b,c,d. \\ {r_2{:}\ } \overline{a} &\leftarrow b, c. \\ {r_3{:}\ } \overline{a} &\leftarrow b, {\thicksim} e. \\ {r_4{:}\ } \overline{a} &\leftarrow b, {\thicksim} {\overline{e}}. \\ {r_5{:}\ } \overline{a} &\leftarrow b, e. \end{align*}

Consider the following ELP: $\mathcal{P}_{{3}} = \{r_1,r_2\}$ . For ${Adv(r_1)}$ in $\mathcal{P}_{{3}}$ , there does not exist a blanket since every body literal of $r_2$ also occurs in the body of $r_1$ .

Now, consider the ELP $\mathcal{P}'_{{3}} = \{r_1,r_3,r_4\}$ . The only body literals of $r_3,r_4$ that do not occur in $r_1$ are ${\thicksim} e,{\thicksim} {\overline{e}}$ . Since a blanket for ${Adv(r_1)}$ in $\mathcal{P}'_{{3}}$ must not contain reconcilable literals, there does not exist a blanket for ${Adv(r_1)}$ .

Likewise, for the ELP $\mathcal{P}''_{{3}} = \{r_1,r_3,r_5\}$ , we observe the following: The only body literals of $r_3,r_5$ that do not occur in $r_1$ are ${\thicksim} e, e$ . Since a blanket for ${Adv(r_1)}$ in $\mathcal{P}''_{{3}}$ must not contain complementary literals, there does not exist a blanket for ${Adv(r_1)}$ .

Example 4 Suppose an ELP $\mathcal{P}_{{4}}$ with the following rules:

\begin{align*} {r_1{:}\ } {\mathit{\mathit{eligX}}} &\leftarrow {\mathit{cond{A}}}{Adv}. \\ {r_2{:}\ } {\overline{{\mathit{\mathit{eligX}}}}} &\leftarrow {\thicksim} {\mathit{highLCount}}, {\thicksim} {\mathit{preTreated{N}}}. \\ {r_3{:}\ } {\overline{{\mathit{\mathit{eligX}}}}} &\leftarrow {\overline{{\mathit{highLCount}}}}, {\thicksim} {\mathit{ctrIndR}}. \\ {r_4{:}\ } {\overline{{\mathit{\mathit{eligX}}}}} &\leftarrow {\mathit{highLCount}}, {\thicksim} {\mathit{preTreated{M}}}. \end{align*}

Program $\mathcal{P}_{{4}}$ describes the following scenario: Suppose a therapy X that was developed for patients with condition A. Currently only patients with an advanced form of condition A are eligible ( $r_1$ ). Furthermore, imagine a specific laboratory value L in a patient’s body that can only be determined via an invasive test which is why such a test can only be done once every 6 months at most. Recently completed long-term studies now indicate that there are some exceptions where X must not be recommended to a patient with advanced A. The therapy should not be used on a patient if it is unknown whether they currently have a high or low L-count and if it is also unknown if they were treated with drug N sometime in the past ( $r_2$ ). If the usage of a substance R is not contraindicated andthe patient has a low L-count, treatment X must also not be recommended ( $r_3$ ). Finally, if patient has a high L-count, they should not receive treatment X if it cannot be concluded that the patient was treated with drug M in the past ( $r_4$ ).

Rule $r_1$ is in conflict with every other rule:

\begin{align*} {\mathit{conflicts}({r_1})} &= \{(r_1, r_2),(r_1,r_3),(r_1,r_4)\} \\ {Adv(r_1)} &= \{r_2, r_3, r_4\} \end{align*}

The literals of the rule bodies in ${Adv(r_1)}$ do not share any common underlying atoms with the literals in the body of $r_1$ . The set ${blankets({Adv(r_1)})}$ of all blankets for ${Adv(r_1)}$ consists of the sets ${\beta}_1, {\beta}_2, {\beta}_3, {\beta}_4, {\beta}_5$ where

\begin{align*} {\beta}_1 &= \{{\thicksim} {\mathit{highLCount}}, {\overline{{\mathit{highLCount}}}}, {\thicksim} {\mathit{preTreated{M}}}\}, \\ {\beta}_2 &= \{{\thicksim} {\mathit{highLCount}}, {\thicksim} {\mathit{ctrIndR}}, {\thicksim} {\mathit{preTreated{M}}}\}, \\ {\beta}_3 &= \{{\overline{{\mathit{highLCount}}}}, {\thicksim} {\mathit{preTreated{N}}}, {\thicksim} {\mathit{preTreated{M}}}\}, \\ {\beta}_4 &= \{{\thicksim} {\mathit{preTreated{N}}}, {\thicksim} {\mathit{ctrIndR}}, {\thicksim} {\mathit{preTreated{M}}}\}, \text{~and} \\ {\beta}_5 &= \{{\mathit{highLCount}}, {\thicksim} {\mathit{preTreated{N}}}, {\thicksim} {\mathit{ctrIndR}}\}. \end{align*}

For the remainder of this paper, we will assume that for any rule $r_i$ with ${Adv(r_i)} \neq \emptyset$ , there exists at least one blanket for ${Adv(r_i)}$ . This particularly implies that for any given conflict pair $(r_i,r_j)$ , ${Atom({B(r)}[r_j])} - {Atom({B(r)}[r_i])} \neq \emptyset$ has to hold. We will assume that $r_i$ will be chosen such that this condition is satisfied. If this is not possible in practice, one or both rules have to be modified more individually, for example, by introducing new atoms to $\mathcal{P}$ . Other solutions will be discussed in Section 3.6. Now, we will describe how to compute all possible conflict-resolving ${\lambda}$ -extensions ${\lambda(r_i)}$ given a blanket ${\beta}$ for ${Adv(r_i)}$ .

In order to use a blanket ${{\beta} \in {blankets({Adv(r_i)})}}$ to resolve all conflicts $(r_i,r_j)$ in ${\mathit{conflicts}({r_i})}$ , the literals in ${\beta}$ have to be negated such that for each conflict pair, the addition of the negated literals to the body of $r_i$ leads to the violation of either property (CP2) or (CP3) in Theorem 1. Due to the fact that default and strong negation cannot be used interchangeably as default literals cannot be strongly negated, we propose the following neg-operator, which for an extended literal ${L^*}$ with ${{atom({L^*})} = A}$ , outputs the set of literals that are complementary to ${L^*}$ :

(6) \begin{equation} {{neg}({L^*})} = \begin{cases} \{{\thicksim} A, \overline{A}\} & \text{if ${L^*} = A$}\\ \{{\thicksim}\overline{A}, A\} & \text{if ${L^*} = \overline{A}$}\\ \{A\} & \text{if ${L^*} = {\thicksim} A$}\\ \{\overline{A}\} & \text{if ${L^*} = {\thicksim}\overline{A}$}.\\ \end{cases}\end{equation}

Therefore, the neg-operator can be used to compute the proper conflict-preventing literals. In fact, we want to extend the neg-operator such that the application of the resulting operator on a blanket for $r_i$ will yield the set of all corresponding conflict-resolving ${\lambda}$ -extensions ${\lambda(r_i)}$ . For this purpose, we have to ensure that the negations of all literals in a blanket yield extended rules of the form (4) that are still applicable. Consequently a blanket must not contain complementary literals. Dual literals however are allowed in a blanket since their negation via the neg-operator leads to non-complementary literals.

Additionally, since we want minimal sets of conflict-resolving literals, given a blanket with dual literals ${L^*},{K^*}$ , we only want to consider those negated forms that both ${L^*},{K^*}$ have in common. Therefore, we extend our neg-operator such that the negation of atom-related literals only yields the negated form that both literals have in common, that is,

(7) \begin{align} {{neg}_{X}({L^*})} = \cap \{{{neg}(K^*)} \mid {atom(K^*)} = {atom(L^*)}, K^* \in X\},\end{align}

where X is a set of extended literals. Applied on a blanket and their literals, the resulting literals uphold a crucial property:

Corollary 2 Given a blanket ${\beta}$ , (a) for all atom-related literals ${{L^*},{K^*} \in {\beta}}$ , ${{neg}_{{\beta}}({L^*})} = {{neg}_{{\beta}}({K^*})}$ , and (b) for all other literals ${L^*},{K^*}$ , ${{neg}_{{\beta}}({L^*})} \cap {{neg}_{{\beta}}({K^*})} = \emptyset$ .

Example 5 Suppose the following sets $X_1 = \{a, \overline{b}, {\thicksim} b\}$ , $X_2 = \{a, b, \overline{b}\}$ , and $X_3 = \{a, b, {\thicksim} b\}$ . The negation of these sets via the neg-operator yields

\begin{align*} {{neg}_{X_1}(a)} & = {{neg}_{X_2}(a)} = {{neg}_{X_3}(a)} = \{\overline{a}, {\thicksim} a\}, \\ &\quad\; {{neg}_{X_1}(\overline{b})} = {{neg}_{X_1}({\thicksim} b)} = \{b, {\thicksim}\overline{b}\} \cap \{b\} = \{b\}, \\ &\quad\; {{neg}_{X_2}(b)} = {{neg}_{X_2}(\overline{b})} = \{{\thicksim} b, \overline{b}\} \cap \{{\thicksim} \overline{b}, b\} = \emptyset, \text{and}\\ &\quad\; {{neg}_{X_3}(b)} = {{neg}_{X_3}({\thicksim} b)} = \{\overline{b}, {\thicksim} b \} \cap \{b\} = \emptyset. \end{align*}

The negation of dual literals in $X_1$ leads to the output of the common literal b whereas complementary literals like in $X_2$ and $X_3$ do not share common negated forms.

Example 5 illustrates why blankets are allowed to contain dual literals since they share a common negated form, but must not have complementary literals. When looking at the negation of $X_2$ in Example 5, one can see that strongly negated literals still have negated forms that are not complementary, viz., the reconcilable literals ${\thicksim} b, {\thicksim} \overline{b}$ . In contrast to complementary literals, reconcilable literals in a rule body will not inhibit the satisfiability of the rule. The examples, therefore, demonstrate that by requesting common negated forms, our approach is prima facie stricter than necessary. But in order to keep this approach simple while guaranteeing that conflict-resolving ${\lambda}$ -extensions maintain the satisfiability of the extended rule, we will only allow combinations of atom-related literals whose negations are guaranteed to be non-complementary.

Lemma 1 Let an ELP $\mathcal{P}$ and a rule ${r \in \mathcal{P}}$ be given. For each extended literal ${L^*}$ in a blanket ${\beta}$ for Adv(r), ${{neg}_{{\beta}}({L^*})}$ is a non-empty set of extended literals which are complementary to ${L^*}$ .

Proof. Since the neg-operator as defined in (6) returns a non-empty set for any extended literal ${L^*}$ , ${{neg}_{{\beta}}({L^*})}$ can only be an empty set if ${\beta}$ contains some distinct atom-related literals ${K^*}_1,\dots,{K^*}_m$ such that ${{neg}({K^*}_1)} \cap \dots \cap {{neg}({K^*}_m)} = \emptyset$ . Suppose atom-related literals ${K^*}_1, {K^*}_2, {K^*}_3$ . By (6), ${{neg}({K^*}_1)} \cap {{neg}({K^*}_2)} \neq \emptyset$ iff ${K^*}_1,{K^*}_2$ are dual. In all other cases, ${{neg}({K^*}_1)} \cap {{neg}({K^*}_2)} = \emptyset$ . Let therefore ${K^*}_1, {K^*}_2$ be dual literals. For any ${K^*}_3$ , it is easy to see that by (6) either ${{neg}({K^*}_1)} \cap {{neg}({K^*}_3)} = \emptyset$ or ${{neg}({K^*}_2)} \cap {{neg}({K^*}_3)} = \emptyset$ holds. This is due to the fact that in every set of at least three different atom-related literals, there are at least two literals that are not dual. Consequently, ${{neg}_{{\beta}}({L^*})} = \emptyset$ if ${\beta}$ contains more than two atom-related literals or if there exist two atom-related literals ${K^*}_1,{K^*}_2 \in {\beta}$ such that ${K^*}_1,{K^*}_2$ are not dual. A blanket does not contain complementary or reconcilable literals by definition and only allows atom-related literals that are dual. This implies that for each extended literal ${K^*}_1$ in ${\beta}$ , there exists at most one other extended literal ${K^*}_2$ in ${\beta}$ such that ${K^*}_1,{K^*}_2$ are atom-related, and all atom-related literals in ${\beta}$ are dual. Thus, for each extended literal ${{L^*} \in {\beta}}$ , ${{neg}_{{\beta}}({L^*})}$ is not empty. More precisely, ${{neg}_{{\beta}}({L^*})}$ always contains either $\overline{L}$ or ${\thicksim} L$ or both. If ${\beta}$ does not contain literals that are atom-related to ${L^*}$ , then ${{neg}_{{\beta}}({L^*})}={{neg}({L^*})}$ holds.

For a set X of extended literals ${L^*}$ , we define Neg(X) as the set of all possible sets T where T contains every literal of X in a negated form, that is,

(8) \begin{align} \begin{aligned} {{Neg}(X)} = \{T \mid T \subseteq \mathcal{L^*({X})},~&T~\text{contains exactly one element of}\\ &\text{each non-empty set } {{neg}_{X}({L^*})}, {L^*} \in X\}, \end{aligned}\end{align}

where $\mathcal{L^*({X})} = \bigcup\limits_{{L^*} \in X} {{neg}_{X}({L^*})}$ . Due to Lemma 1, there always exists at least one such set T.

Example 6 (Example 5 continued) Continuing Example 5, we get ${{Neg}(X_2)}={{Neg}(X_3)} = \big\{\{\overline{a}\},\{{\thicksim} a\}\big\}$ since ${{neg}_{X_2}(a)}=$ ${{neg}_{X_3}(a)}=\{\overline{a}, {\thicksim} a\}$ , and the negation of all other literals yields an empty set. For $X_1$ , however, we get ${{Neg}(X_1)}=\big\{\{\overline{a},b\},\{{\thicksim} a,b\}\big\}$ because as for $X_2,X_3$ , the negation of a produces two different possible negations and additionally $\overline{b}$ and ${\thicksim} b$ have the common negated form b.

Example 7 (Example 4 continued) Continuing Example 4, the negation of each blanket in ${blankets({Adv(r_1)})}$ for rule $r_1$ in $\mathcal{P}_{{4}}$ yields sets ${\beta}_1,\dots,{\beta}_5$ as shown in Table 2. Blankets ${\beta}_2$ and ${\beta}_4$ only contain default literals and therefore, each of them has only one possible negation form. For ${\beta}_3$ and ${\beta}_5$ , the literals ${\mathit{highLCount}}$ , and ${\overline{{\mathit{highLCount}}}}$ , each have two possible negations which is why ${{Neg}({\beta}_3)}$ and ${{Neg}({\beta}_5)}$ contain two sets respectively. Regarding ${\beta}_1$ , we observe that the dual literals ${\overline{{\mathit{highLCount}}}},{\thicksim} {\mathit{highLCount}}$ , have the common negated form ${\mathit{highLCount}}$ , and the default literal ${\thicksim} {\mathit{preTreated{M}}}$ has only one negation form. Together, that results in the fact that ${{Neg}({\beta}_1)}$ contains only the one set $\{{\mathit{highLCount}},{\mathit{preTreated{M}}}\}$ .

Table 2. Results from Example 7

Lemma 2 Let an ELP $\mathcal{P}$ , a rule ${r \in \mathcal{P}}$ and a blanket ${\beta}$ for Adv(r) be given. Furthermore, let ${\lambda} \in {{Neg}({\beta})}$ . For each extended literal ${{L^*} \in {\beta}}$ , ${\lambda}$ contains exactly one extended literal ${K^*}$ such that ${L^*},{K^*}$ are complementary.

Proof. Lemma 1 states that for each ${{L^*} \in {\beta}}$ , ${{neg}_{{\beta}}({L^*})}$ consists of either one or two extended literals and each of them is complementary to ${L^*}$ . Consequently, it follows by (8) that each ${\lambda}$ contains a literal ${K^*}$ for each ${L^*}$ in ${\beta}$ such that ${L^*},{K^*}$ are complementary. With Corollary 2, there exists exactly one such extended literal ${K^*} \in {\lambda}$ for each ${L^*} \in {\beta}$ .

Due to the fact that ${blankets({Adv(r_i)})}$ is a set of sets, we will extend the Neg-operator to also consider sets $\mathcal{X = \{X_1, \dots, X_n\}}$ of sets ${X_1,\dots,X_n}$ of extended literals. For such a set $\mathcal{X}$ , ${{N}(\mathcal{X})}$ shall therefore output the set of all negated form variations in all sets ${X_1,\dots,X_n} \in \mathcal{X}$ , that is,

(9) \begin{align} {{N}(\mathcal{X})} = \{X^- \mid X^- \in {{Neg}(X)}, X \in \mathcal{X}\}.\end{align}

Lemma 3 Let an ELP $\mathcal{P}$ and a rule ${r \in \mathcal{P}}$ be given. Each ${{\lambda} \in {{N}({blankets({Adv(r)})})}}$ does not contain any complementary literals.

Proof. Since every ${\lambda}$ consists of a literal ${L^*} \in {{neg}_{{\beta}}({L^*})}$ for every literal ${L^*} \in {\beta}$ , ${\lambda}$ can only contain complementary literals if there are complementary literals between sets ${{neg}_{{\beta}}({L^*})}$ . By Corollary 2, this is not possible since ${\beta}$ itself does not contain complementary or reconcilable literals. Consequently, for each ${{\lambda} \in {{N}({blankets({Adv(r)})})}}$ , it holds that ${\lambda}$ does not contain complementary literals.

Example 8 (Example 2 continued) For ${blankets({Adv(r_1)})}$ in Example 4, we get

\begin{align*} {{N}({blankets({Adv(r_1)})})} &= \{{{Neg}({\beta}_1)}, {{Neg}({\beta}_2)}, {{Neg}({\beta}_3)}, {{Neg}({\beta}_4)}, {{Neg}({\beta}_5)}\} \\ &= \big\{\{{\mathit{highLCount}}, {\mathit{preTreated{M}}}\}, \\ &\quad\; \{{\mathit{highLCount}}, {\mathit{ctrIndR}}, {\mathit{preTreated{M}}}\}, \\ &\quad\; \{{\mathit{highLCount}}, {\mathit{preTreated{N}}}, {\mathit{preTreated{M}}}\}, \\ &\quad\; \{{\thicksim} {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{preTreated{M}}}\}, \\ &\quad\; \{{\mathit{preTreated{N}}}, {\mathit{ctrIndR}}, {\mathit{preTreated{M}}}\}, \\ &\quad\; \{{\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}, \\ &\quad\; \{{\thicksim} {\mathit{highLCount}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}\big\}. \end{align*}

Due to the properties of a blanket and their possible negations, it is also guaranteed that any rule extended by such a ${\lambda}$ remains applicable.

Proposition 4 Every ${\lambda}$ -extended rule $r'_i$ of the form

(10) \begin{align} r'_i \in \{ {H}(r_i) \leftarrow {B}(r_i), {\lambda(r_i)}. \mid {\lambda(r_i)} \in {{N}({blankets({Adv(r_i)})})}\} \end{align}

of a rule $r_i \in \mathcal{P}$ is applicable.

Proof. Suppose a ${\lambda}$ -extended rule $r'_i$ w.r.t. a ${\lambda}$ -extension ${\lambda(r_i)}$ . Rule $r'_i$ is not applicable if (a) $r_i$ is not applicable, (b) ${\lambda(r_i)}$ is not satisfiable, or (c) ${B(r)}[r_i] \cup {\lambda(r_i)}$ is not satisfiable. Case (a) is not possible due to our initial assumption that all rules in a given logic program are applicable. Case (b) can only hold if ${\lambda(r_i)}$ contains complementary literals. By Lemma 3, this is not possible for any conflict-resolving extension ${\lambda(r_i)}$ . Then, case (c) can only hold if there exist complementary literals between ${B(r)}[r_i]$ and ${\lambda(r_i)}$ . By Definition 9, a blanket for $r_i$ cannot contain literals that are atom-related to any literals in ${B(r_i)}$ . Consequently, any conflict-resolving extension ${\lambda(r_i)}$ for $r_i$ does also not contain any literals that are atom-related to a literal in ${B(r_i)}$ . Therefore, any ${\lambda}$ -extended rule of the form (10) is applicable.

We are now ready to relate conflict-resolving ${\lambda}$ -extensions to blankets.

Proposition 5 Every ${\lambda(r_i)} \in {{N}({blankets({Adv(r_i)})})}$ is a conflict-resolving ${\lambda}$ -extension for $r_i$ , that is, for every rule ${\lambda}$ -extended rule $r'_i$ w.r.t. ${\lambda(r_i)}$ , it holds that ${\mathit{conflicts}({r'_i})} = \emptyset$ in $\mathcal{P}' = \mathcal{P} \backslash \{r_i\} \cup \{r'_i\}$ .

Proof. Assume, by way of contradiction, that there exists a rule $r_j \in {Adv(r_i)}$ such that the ${\lambda}$ -extended rule $r'_i$ w.r.t. ${\lambda(r_i)}$ and $r_j$ are conflicting, that is, $r'_i \bowtie r_j$ . Then by Theorem 1, (CP2) and (CP3) hold, that is, $B^{+}(r'_1) \cap B^{-}(r_j) = B^{+}(r_j) \cap B^{-}(r'_i) = \emptyset$ , and $B^{+}(r'_1) \cup B^{-}(r_j)$ and $B^{-}(r'_i) \cup B^{+}(r_j)$ are consistent. Let ${\beta}$ be a blanket on which ${\lambda(r_i)}$ is based on, that is, ${\beta} \in {blankets({Adv(r_i)})}$ and ${\lambda(r_i)} \in {{Neg}({blankets({Adv(r_i)})})}$ . According to (9), this also means that ${\lambda(r_i)} \in {{Neg}({\beta})}$ holds. By Definition 9, there exists an extended literal ${L^*} \in {\beta}$ such that ${L^*} \in {B(r_j)}$ . If $L \in B^{+}(r_j)$ , then by Lemma 2 either $\overline{L} \in {\lambda(r_i)}$ or ${\thicksim} L \in {\lambda(r_i)}$ . This consequently means that if $L \in B^{+}(r_j)$ , then either $\overline{L} \in B^{+}(r'_1)$ , which means condition (CP3) cannot hold or $L \in B^{-}(r'_i)$ , which in turn means that (CP2) cannot hold. On the other hand, if $L \in B^{-}(r_j)$ , then by Lemma 2 and (4) $L \in B^{+}(r'_1)$ , and thus (CP2) cannot hold. In any case, ${\lambda(r_i)}$ adds an extended literal to the body of $r_i$ such that (CP2) or (CP3) cannot hold for rules $r'_i,r_j$ . Therefore, $r'_i$ and $r_j$ cannot be conflicting.

Example 9 (Example 8 continued) All conflicts in ${\mathit{Conflicts}({\mathcal{P}_{{4}}})}$ of Example 4 can be resolved by replacing $r_1$ with a ${\lambda}$ -extended rule

\begin{align*} {{r'_1}{:}\ } {\mathit{\mathit{eligX}}} \leftarrow {\mathit{cond{A}}}{Adv}, {\lambda(r_1)}. \end{align*}

w.r.t. ${\lambda(r_1)}$ , where

\begin{align*} {\lambda(r_1)} \in {{N}({blankets({Adv(r_1)})})} = \big\{&\{{\mathit{highLCount}}, {\mathit{preTreated{M}}}\}, \\ &\{{\mathit{highLCount}},{\mathit{ctrIndR}},{\mathit{preTreated{M}}}\}, \\ &\{{\mathit{highLCount}},{\mathit{preTreated{N}}},{\mathit{preTreated{M}}}\}, \\ &\{{\thicksim} {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{preTreated{M}}}\}, \\ &\{{\mathit{preTreated{N}}}, {\mathit{ctrIndR}}, {\mathit{preTreated{M}}}\}, \\ &\{{\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}, \\ &\{{\thicksim} {\mathit{highLCount}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}\big\}. \end{align*}

Every set in ${{N}({blankets({Adv(r_1)})})}$ contains at least one body literal of every rule $r_j \in {Adv(r_1)}$ in a negated form and therefore corresponds to a conflict-resolving ${\lambda}$ -extension for $r_1$ in the sense of (4).

Looking at the result in Example 8, it becomes apparent that the N-operator for sets of sets does not necessarily output $\subseteq$ -minimal sets, that is, ${{N}({blankets({Adv(r_1)})})}$ contains $\{{\mathit{highLCount}},{\mathit{preTreated{M}}}\}$ and two of its supersets $\{{\mathit{highLCount}}\,{\mathit{ctrIndR}},{\mathit{preTreated{M}}}\}$ and $\{{\mathit{highLCount}},{\mathit{preTreated{N}}},{\mathit{preTreated{M}}}\}$ . Since $\{{\mathit{highLCount}},{\mathit{preTreated{M}}}\}$ already contains literals of every adversarial rule of $r_1$ in a negated form, additional literals become obsolete. Consequently, any superset of a set in ${{N}({blankets({Adv(r_1)})})}$ can be safely omitted. Therefore, for an ELP $\mathcal{P}$ with a rule $r_i$ , we denote the set of all $\subseteq$ -minimal sets in ${{N}({blankets({Adv(r_i)})})}$ by ${{{N}_{\min}}({blankets({Adv(r_i)})})}$ .

Corollary 3 All conflicts in ${\mathit{conflicts}({r_i})}$ are resolved simultaneously if $r_i$ is replaced by

(11) \begin{align} r'_i \in \{ {H}(r_i) \leftarrow {B}(r_i), {\lambda(r_i)}. \mid {\lambda(r_i)} \in {{{N}_{\min}}({blankets({Adv(r_i)})})}\}. \end{align}

Every ${\lambda(r_i)} \in {{{N}_{\min}}({blankets({Adv(r_i)})})}$ is, therefore, a minimal conflict-resolving ${\lambda}$ -extension for $r_i$ .

Example 10 (Example 9 continued) For $r_1$ in $\mathcal{P}_{{4}}$ of Example, we get

\begin{align*} {{{N}_{\min}}({blankets({Adv(r_1)})})} \;=\; &\big\{\{{\mathit{highLCount}}, {\mathit{preTreated{M}}}\}, \\ &\{{\thicksim} {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{preTreated{M}}}\},\\ &\{{\mathit{preTreated{N}}}, {\mathit{ctrIndR}}, {\mathit{preTreated{M}}}\}, \\ &\{{\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}, \\ &\{{\thicksim} {\mathit{highLCount}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}\big\}. \end{align*}

Consequently, ${\lambda}_1 = \{{\mathit{highLCount}}, {\mathit{preTreated{M}}}\}$ is a possible ${\lambda}$ -extension for $r_1$ .

Note that if multiple conflicts are resolved simultaneously where the adversarial rules contain more than one literal, the inclusion of a knowledge expert can be crucial. In Example 10, any possible ${\lambda}$ -extension for $r_1$ proposes a restriction on the eligibility for therapy X that is slightly stricter than the requirements that are implictly imposed by the adversarial rules. That is, the extension by ${\lambda}_1$ leads indeed to the resolution of the conflict. Now however, for instance patients that have a low L-count while being allergic to substance R cannot receive the treatment which is not explicitly specified in the original program. One reason for these stricter suggestions is that ${\lambda}$ -extension are built to minimally cover the adversarial body literals in order to keep the approach simple and pragmatic. It is up to the knowledge expert to decide if the new knowledge that is represented in a ${\lambda}$ -extension is justifiable w.r.t. to its professional adequacy. If the knowledge expert wants to adapt $r_1$ according to all adversarial rules such that $r_1$ “mirrors” them, they can consider accepting more than one suggestion which in this case would result in replacing $r_1$ by multiple ${\lambda}$ -extended rules $r'_1$ that guarantee that specific literal combinations are not overlooked, viz., an additional ${\lambda}$ -extended rule of $r_1$ would have to be added where ${\lambda} = \{{\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}\}$ if the knowledge expert wants patients with a low L-count to receive treatment X where substance R is contraindicated.

Once all ${\lambda}$ -extensions for a conflict are computed, the corresponding ${\lambda}$ -extended rules are presented to the expert. They can analyze the suggestions and apply the most suitable solution. Due to their expertise, the presented suggestions can hint to the underlying cause which can make the decision on the solution straightforward.

Moreover, though it demands for some technical knowledge, the framework could also allow the expert to refine a suggestion and then apply it. Even though, as shown above, all computed solutions are minimal and guarantee the resolution of the considered conflict, refining a solution based on the expert’s knowledge can reinforce the robustness of the solution, that is, possible future conflicts after consecutive updates can be prevented.

Example 11 (Example 10 continued) Suppose the knowledge expert has to decide on the solution for the conflict of rule $r_1$ . They are presented with the following suggestions:

\begin{align*}{{r^{(1)}_1}{:}\ } & {\mathit{\mathit{eligX}}} \leftarrow {\mathit{highLCount}}, {\mathit{preTreated{M}}}.\\ {{r^{(2)}_1}{:}\ } & {\mathit{\mathit{eligX}}} \leftarrow {\thicksim} {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{preTreated{M}}}.\\ {{r^{(3)}_1}{:}\ } & {\mathit{\mathit{eligX}}} \leftarrow {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}, {\mathit{preTreated{M}}}. \\ {{r^{(4)}_1}{:}\ } & {\mathit{\mathit{eligX}}} \leftarrow {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}. \\ {{r^{(5)}_1}{:}\ } & {\mathit{\mathit{eligX}}} \leftarrow {\thicksim} {\mathit{highLCount}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}.\end{align*}

Presume the following scenario: Treatment X is applied when the therapy options for advanced condition A that were administered up to now has been exhausted. Contrary to treatment M, which is a more common therapy in this scenario, treatment N is a therapy that is recommended when the standard therapy options have not been effective since N is known to be more complicated and not without risks. Therefore, the knowledge expert decides that the solution for this conflict should include ${\mathit{preTreated{N}}}$ rather than ${\mathit{preTreated{M}}}$ to reflect that therapy X is only to be recommended if nothing else worked out. This leaves the expert with rules $r^{(4)}_1$ and $r^{(5)}_1$ as potential candidates. As therapy X itself is also not without risks, the expert wants to emphasize that any other requirements for this therapy should be defined as strictly as possible, for example, the physicians have to explicitly confirm that specific drugs are not contraindicated. Accordingly, before suggesting therapy X, it should be explicitly known whether the patient has indeed a low L-count. Therefore, rule $r^{(4)}_1$ as a solution is the most fitting candidate.

Example 11 highlights the fact that generally the suitability of a solution relies on knowledge that is not necessarily reflected in the program.

The following example illustrates that even in cases where a custom solution is required, the computed solutions can used as a basis for fitting solutions.

Example 12 (Example 11 continued) Now suppose that at the time of the conflict resolution, studies revealed that in order to prescribe treatment X, the patient must not have an allergy towards a substance S. As $r^{(4)}_1$ was found to be the most suitable suggestion, it suffices to add literal ${\overline{{\mathit{ctrIndS}}}}$ to ${B(r)}[r^{(4)}_1]$ in order to require that substance S is not contraindicated. Thus, the expert yields

\begin{equation*} {\mathit{\mathit{eligX}}} \leftarrow {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}, {\overline{{\mathit{ctrIndS}}}}.\end{equation*}

as the final solution to solve all conflicts of $r_1$ in $\mathcal{P}_{{4}}$ . This modification constitutes a refinement of a suggested ${\lambda}$ -extension.

In Sections 4.3 and 4.4, we will show that the problem of knowledge gaps will also pertain to other aspects of conflict resolution. We propose to alleviate these shortcomings by implementing suitable interaction mechanisms between the system and the expert.

In the following, we will illustrate a complete conflict resolution step with two more examples. Example 13 comprises both short and long conflict-resolving extensions. Example 14 shows how redundant extensions are removed via ${{N}_{\min}}$ .

Example 13 Suppose the following ELP $\mathcal{P}_{{13}}$ :

\begin{align*} {r_1{:}\ } & a \leftarrow x, y. \\ {r_2{:}\ } & \overline{a} \leftarrow b, d, {\thicksim} e. \\ {r_3{:}\ } & \overline{a} \leftarrow d, {\thicksim} c, {\thicksim} e. \\ {r_4{:}\ } & \overline{a} \leftarrow b, d, {\thicksim} c. \end{align*}

In $\mathcal{P}_{{13}}$ , rule $r_1$ is in conflict with every other rule:

\begin{align*} {\mathit{Conflicts}({\mathcal{P}_{{13}}})} = {\mathit{conflicts}({r_1})} &= \{(r_1, r_2),(r_1,r_3),(r_1,r_4)\} \\ {Adv(r_1)} &= \{r_2, r_3, r_4\}. \end{align*}

The set ${blankets({Adv(r_1)})}$ of blankets for ${Adv(r_1)}$ consists of the sets ${\beta}_1, {\beta}_2, {\beta}_3, {\beta}_4$ , with

\begin{align*} {\beta}_1 &= \{d\}, \\ {\beta}_2 &= \{b, {\thicksim} c\}, \\ {\beta}_3 &= \{b, {\thicksim} e\}, \\ {\beta}_4 &= \{{\thicksim} c, {\thicksim} e\}. \end{align*}

The negation of each blanket in ${blankets({Adv(r_1)})}$ results in the following sets:

\begin{align*} {{Neg}({\beta}_1)} &= \big\{\{{\overline{d}}\}, \{{\thicksim} d\}\big\}\\ {{Neg}({\beta}_2)} &= \big\{\{\overline{b}, c\}, \{{\thicksim} b, c\}\big\}\\ {{Neg}({\beta}_3)} &= \big\{\{\overline{b}, e\}, \{{\thicksim} b, e\}\big\}\\ {{Neg}({\beta}_4)} &= \big\{\{c, e\}\big\}. \end{align*}

Therefore, all conflicts in ${\mathit{conflicts}({r_1})}$ can be resolved by replacing $r_1$ with a rule

\begin{align*} {{r'_1}{:}\ } a \leftarrow x, y, {\lambda(r_1)}, \end{align*}

where

\begin{align*} {\lambda(r_1)} \in {{N}({blankets({Adv(r_1)})})} &= {{{N}_{\min}}({blankets({Adv(r_1)})})} \\ &= \big\{ \{{\overline{d}}\}, \{{\thicksim} d\}, \{\overline{b}, c\}, \{{\thicksim} b, c\}, \{\overline{b}, e\}, \{{\thicksim} b, e\},\{c, e\}\big\}. \end{align*}

From a technical point of view, choosing ${\lambda(r_1)} \in \{{\overline{d}}, {\thicksim} d\}$ as a conflict-resolving extension for $r_1$ may seem as the most suitable choice prima facie, seeing that the addition of a single literal resolves all three conflicts of $r_1$ simultaneously. However, depending on what the rules actually represent, it is possible that a corresponding knowledge expert does not regard ${\overline{d}}$ and ${\thicksim} d$ as viable options for resolving the conflicts of $r_1$ , and, instead, picks an extension that contains more than one literal.

Example 14 Suppose the following ELP $\mathcal{P}_{{14}}$ :

\begin{align*} {r_1{:}\ } & x \leftarrow a. \\ {r_2{:}\ } & \overline{x} \leftarrow {\overline{c}}, d, {\thicksim} \overline{a}, {\thicksim} e. \\ {r_3{:}\ } & \overline{x} \leftarrow a, b, {\overline{c}}. \\ {r_4{:}\ } & \overline{x} \leftarrow d, {\thicksim} \overline{b}, {\thicksim} f. \end{align*}

In $\mathcal{P}_{{14}}$ , rule $r_1$ is in conflict with every other rule:

\begin{align*} {\mathit{Conflicts}({\mathcal{P}_{{14}}})} = {\mathit{conflicts}({r_1})} &= \{(r_1, r_2),(r_1,r_3),(r_1,r_4)\} \\ {Adv(r_1)} &= \{r_2, r_3, r_4\}. \end{align*}

The set ${blankets({Adv(r_1)})}$ of blankets for ${Adv(r_1)}$ consists of the sets

Note that literal ${\thicksim} \overline{a}$ does not appear in any blankets of $r_1$ by reason of ${atom({\thicksim} \overline{a})} \in {Atom({B(r)}[r_1])}$ .

The negation of each blanket in ${blankets({Adv(r_1)})}$ yields the following sets:

\begin{align*} {{Neg}({\beta}_1)} &= \big\{\{c, {\overline{d}}\}, \{{\thicksim} {\overline{c}}, {\overline{d}}\}, \{c, {\thicksim} d\}, \{{\thicksim} {\overline{c}}, {\thicksim} d\}\big\}\\ {{Neg}({\beta}_2)} &= \big\{\{c, \overline{b}\}, \{{\thicksim} {\overline{c}}, \overline{b}\}\big\}\\ {{Neg}({\beta}_3)} &= \big\{\{c, f\}, \{{\thicksim} {\overline{c}}, f\}\big\}\\ {{Neg}({\beta}_4)} &= \big\{\{\overline{b}, {\overline{d}}\}, \{{\thicksim} b, {\overline{d}}\}, \{\overline{b}, {\thicksim} d\}, \{{\thicksim} b, {\thicksim} d\}\big\}\\ {{Neg}({\beta}_5)} &= \big\{\{\overline{b}, e\}\big\}\\ {{Neg}({\beta}_6)} &= \big\{\{\overline{b}, e, f\}, \{{\thicksim} b, e, f\}\big\}. \end{align*}

This results in

\begin{align*} {{N}({blankets({Adv(r_1)})})} = \bigcup\limits_{{\beta} \in {blankets({Adv(r_1)})}} {{Neg}({\beta})}, \end{align*}

and on the grounds that $\{\overline{b},e,f\} \supset \{\overline{b},e\}$ , we get

\begin{align*} {{{N}_{\min}}({blankets({Adv(r_1)})})} = {{N}({blankets({Adv(r_1)})})} \backslash \{\overline{b}, e, f\}. \end{align*}

Therefore, all conflicts in ${\mathit{conflicts}({r_1})}$ can be resolved by replacing $r_1$ with a rule

\begin{align*} {{r'_1}{:}\ } x \leftarrow a, {\lambda(r_1)}, \end{align*}

where

\begin{align*} {\lambda(r_1)} \in {{{N}_{\min}}({blankets({Adv(r_1)})})} = \big\{ &\{c, {\overline{d}}\}, \{{\thicksim} {\overline{c}}, {\overline{d}}\}, \{c, {\thicksim} d\}, \{{\thicksim} {\overline{c}}, {\thicksim} d\} \{c, \overline{b}\}, \{{\thicksim} {\overline{c}}, \overline{b}\},\\ &\{c, f\}, \{{\thicksim} {\overline{c}}, f\}, \{\overline{b}, {\overline{d}}\}, \{{\thicksim} b, {\overline{d}}\}, \{\overline{b}, {\thicksim} d\}, \{{\thicksim} b, {\thicksim} d\}, \\ &\{\overline{b}, e\}, \{{\thicksim} b, e, f\} \big\}. \end{align*}

In summary, the results show that implementing a conflict resolution step via conflict-resolving ${\lambda}$ -extensions and blankets yields a conflict resolution process that possesses the properties (P1)-(P3) that were postulated earlier. By Proposition 5, given a rule $r_i \in \mathcal{P}$ , every ${\lambda(r_i)} \in {{N}({blankets({Adv(r_i)})})}$ is a conflict-resolving ${\lambda}$ -extension for $r_i$ . Since by every such conflict resolution step, the number of conflicts is reduced, for the final program ${\mathcal{P}^{(n)}}$ of the conflict resolution process, it holds that ${\mathit{Conflicts}({{\mathcal{P}^{(n)}}})} = \emptyset$ . Moreover, we have shown that for the proposed conflict resolution process $\langle {\mathcal{P}^{(1)}},{\mathcal{P}^{(2)}},\dots,{\mathcal{P}^{(n)}}\rangle$ it even holds that ${\mathit{Conflicts}({{\mathcal{P}^{(i+1)}}})} \subsetneq {\mathit{Conflicts}({{\mathcal{P}^{(i)}}})}$ for $1 \leq i < n$ . Thus, (P1) holds. As every conflict resolution step consists of solely replacing a conflicting rule with its ${\lambda}$ -extension of the form (10), (P2) holds. By Proposition 4, property (P3) holds also. Therefore, a conflict resolution process using conflict-resolving ${\lambda}$ -extensions leads to a uniformly non-contradictory program core in a minimally invasive manner. Including a domain-specific expert into the selection of the most suitable ${\lambda}$ -extensions can furthermore ensure that the resulting non-contradictory program core maintains its professionally adequate knowledge base.

3.6 Missing ${\lambda}$ -extension

Under some circumstances, no ${\lambda}$ -extensions can be generated for a rule $r \in \mathcal{P}$ . In these cases a blanket for Adv(r) cannot be found. Determining whether a blanket for Adv(r) exists can become quite cumbersome and complex since the relationships of atom-related literals between all adversarial rules have to be examined. A small fraction of such possible literal interactions that can make the finding of a blanket impossible will be illustrated in the following example.

Example 15 Suppose the following program $\mathcal{P}_{{15}}$ :

\begin{align*} {r_1{:}\ } & x \leftarrow a, d. & {r_2{:}\ } & \overline{x} \leftarrow a, b. & {r_3{:}\ } & \overline{x} \leftarrow {\overline{c}}. & {r_4{:}\ } & \overline{x} \leftarrow c, {\thicksim} b. \end{align*}

Program $\mathcal{P}_{{15}}$ has conflicts $(r_1,r_2), (r_1,r_3), (r_1,r_4)$ and there does not exist a blanket for $r_1$ . This can be easily shown by looking at each potential candidate literal: Literal a is already in ${B(r)}[r_1]$ and can therefore not be in a blanket. Since atom b (resp. c) appears in ${B(r)}[{\mathit{Conflicts}({r_1})}]$ as default (resp. classically) complementary literals, viz. $r_2,r_4$ (resp. $r_3,r_4$ ), b (resp. c) cannot be part of a blanket either. There are several workarounds that allow the resolution of such conflicts nevertheless. One possible way to resolve such conflicts can be the partitioning of conflicts, that is, given a rule r with several adversaries Adv(r), one could first determine a subset $Adv' \subset {Adv(r)}$ for which a blanket can be computed. This procedure can be repeated until all conflicts of r’ are resolved. The following example illustrates how partitioning can be used to obtain a solution if a specific rule of the program (in this case $r_1$ ) should primarily be modified.

Example 16 (Example 15 contd.) Suppose program $\mathcal{P}_{{15}}$ from Example 15. First, conflicts $(r_1,r_2)$ and $(r_1,r_3)$ can be resolved simultaneously by generating ${\lambda}$ -extensions from the blankets for $Adv' = \{r_2,r_3\}$ . Two of the resulting extensions are ${\lambda}_1 = \{{\thicksim} b, {\thicksim} {\overline{c}}\}$ and ${\lambda}_2 = \{{\thicksim} b, c\}$ . Applying ${\lambda}_1$ to $\mathcal{P}_{{15}}$ results in program $\mathcal{P}_{{15}}'$ :

\begin{align*} {{r_1'}{:}\ } & x \leftarrow a, d, {\thicksim} b, {\thicksim} {\overline{c}}. & {r_2{:}\ } & \overline{x} \leftarrow a, b. & {r_3{:}\ } & \overline{x} \leftarrow {\overline{c}}. & {r_4{:}\ } & \overline{x} \leftarrow c, {\thicksim} b. \end{align*}

Then, the remaining conflict $(r'_1,r_4)$ can be resolved by applying the unique solution ${\lambda}_3 = \{{\thicksim} c\}$ which in turn results in program $\mathcal{P}_{{15}}''$ :

\begin{align*} {{r_1''}{:}\ } & x \leftarrow a, d, {\thicksim} b, {\thicksim} {\overline{c}}, {\thicksim} c. & {r_2{:}\ } & \overline{x} \leftarrow a, b. & {r_3{:}\ } & \overline{x} \leftarrow {\overline{c}}. & {r_4{:}\ } & \overline{x} \leftarrow c, {\thicksim} b. \end{align*}

Note that the reason that a solution like ${\lambda} = \{{\thicksim} b, {\thicksim} c, {\thicksim} {\overline{c}}\}$ cannot be obtained with the general conflict resolution approach is because of the restriction that blankets cannot contain multiple literals of the same atom even though reconcilable literals do not interfer with the applicability of a rule (as can be seen in Example 15). But in order to keep the resolution approach simple and pragmatic, such a restriction on blankets was deemed necessary.

However, whenever conflicts are separately resolved, the final outcome can very much depend on the actual partitions, the order in which the different conflicts are resolved, and the choice of the respective ${\lambda}$ -extensions along the way.

Example 17 (Example 16 contd.) Reconsider the results in Example 16. Note that $(r'_1,r_4)$ in $\mathcal{P}_{{15}}'$ only has the unique solution ${\lambda}_3 = \{{\thicksim} c\}$ because for the resolution of the previous conflicts ${\lambda}_1$ was chosen. Applying ${\lambda}_2$ to $\mathcal{P}_{{15}}$ of Example 15 instead of ${\lambda}_1$ would result in program $\mathcal{P}_{{15}}'''$ :

\begin{align*} {{r_1'}{:}\ } & x \leftarrow a, d, c, {\thicksim} b. & {r_2{:}\ } & \overline{x} \leftarrow a, b. & {r_3{:}\ } & \overline{x} \leftarrow {\overline{c}}. & {r_4{:}\ } & \overline{x} \leftarrow c, {\thicksim} b. \end{align*}

It is easy to see that now for conflict $(r_1,r_4)$ , there exist no possible ${\lambda}$ -extensions anymore as ${B(r_4)} \subset {B(r_1)}$ .

Another possible workaround could be a preceding resolution of conflicts of some adversarial rules $r' \in {Adv(r)}$ , that is, if a blanket for Adv(r) cannot be found, one could resolve the conflicts of some $r' \in {Adv(r)}$ first and then resolve the remaining conflicts of r. This workaround is illustrated in the following example:

Example 18 (Example 15 contd.) Again, suppose program $\mathcal{P}_{{15}}$ from Example 15. Since $r_1$ contains literal d that does not appear in ${B(r)}[{\mathit{Conflicts}({r_1})}]$ , instead of resolving the conflicts of $r_1$ , the conflicts of the adversarial rules could be resolved consecutively, in this case even with the same ${\lambda}$ -extension, namely conflicts $(r_2,r_1), (r_3,r_1), (r_4,r_1)$ with either ${\lambda}$ -extension ${\lambda}_3 = \{{\thicksim} d\}$ or ${\lambda}_4 = \{{\overline{d}}\}$ . Therefore, one possible resolved program $\mathcal{P}_{15}''''$ would consist of the following rules:

\begin{align*} {r_1{:}\ } & x \leftarrow a, d. & {{r_2'}{:}\ } & \overline{x} \leftarrow a, b, {\thicksim} d & {{r_3'}{:}\ } & \overline{x} \leftarrow {\overline{c}}, {\thicksim} d. & {{r_4'}{:}\ } & \overline{x} \leftarrow c, {\thicksim} b, {\thicksim} d. \end{align*}

Examples 16 and 18 show that if the resolution of conflicts of a rule cannot be carried out in one go, there are possible workarounds. But, as shown with Example 17, even if the conflict resolution is partitioned into multiple ones, the choice of a solution can influence the success of remaining conflict resolution attempts. Thus, in such individual cases, both, the order in which the conflicts are solved and the choice of the solutions have to be executed with care. Apart from partitioning conflicts and modifying adversarial rules, there is always the possibility to introduce new atoms to the bodies of a conflict, for example, adding a new atom A to B(r) and $\overline{A}$ to the bodies B(r’) of all adversaries. This, however, would violate our requirement of extensions being informative.

Improving our strategies with respect to such deficiencies right from the beginning, for example, finding a most suitable order in which conflicts are resolved, is part of our ongoing work. Some enhancements of our approach are considered in the next section.

4 Enhancements

In the following, we will outline possible enhancements to the presented resolution approach. Section 4.1 outlines how the multiple resolution processes can be used to resolve many-to-many conflicts and in Section 4.2, we show how the current resolution approach can also be used to deal with inconsistency-causing constraints. In the last two subsections, we will show methods to compute additional information for the knowledge expert to find the most suitable solutions efficiently. In Section 4.3, we will present a method to sort the detected conflicts in a program by the impact the conflicting rules have on other rules. We extend this method in Section 4.4 to introduce the concept of ${\lambda}$ -scores that enable the ordering of ${\lambda}$ -extensions.

4.1 Many-to-many conflicts

So far, the presented approach handles 1-to-many conflicts, that is, the presented approach modifies a single rule r such that the conflicts with n different rules $r' \in {Adv(r)}$ are resolved simultaneously. It is conceivable that instead of a single rule r, a program $\mathcal{P}$ can contain a set $\mathcal{R}$ of m different rules r with ${H(r)} = L$ ( $m > 1$ ) which results in considering what we will call many-to-many conflicts. Currently, in those cases the resolution process have to be applied on each such $r \in \mathcal{R}$ separately and consecutively. Depending on the individual case, it can also be reasonable to modify a rule $r' \in {Adv(r)}$ .

Example 19 Consider the following ELP:

\begin{align*} {{\mathcal{P}_{{19}}}{:}~~~} {r_1{:}\ } x \leftarrow a, e. \qquad {r_2{:}\ } x \leftarrow b, e. \qquad {r_3{:}\ } \overline{x} \leftarrow f. \qquad {r_4{:}\ } \overline{x} \leftarrow g. \qquad \end{align*}

In $\mathcal{P}_{{19}}$ , there are conflicts between $\{r_1,r_2\}$ and $\{r_3,r_4\}$ . One way to resolve all conflicts is to extend $r_1$ and $r_2$ by a ${\lambda}$ -extension, respectively. Since the bodies of $r_3$ and $r_4$ do not contain atom-related literals, each ${\lambda}$ -extension will contain two literals. If, on the other hand, the knowledge expert decides to modify $r_3$ and $r_4$ instead, a possible ${\lambda}$ -extension for both rules can consist of a single literal, viz. either ${\thicksim} e$ or ${\overline{e}}$ .

Example 19 shows that the order in a conflict pair (r,r’) can decide over the “complexity” of its resolution.

4.2 Conflict resolution with constraints

In general, (integrity) constraints in answer set programs serve to weed out unwanted answer sets. One way to implement such a functionality is to map a constraint like $\leftarrow a,b.$ to a rule $z \leftarrow a,b, {\thicksim} z.$ where z is a newly introduced atom (Gebser et al. Reference Gebser, Kaminski, Kaufmann and Schaub2012). Even though the derivation of z due to such constraints technically causes incoherence and not contradiction, we will cover the handling of a specific type of constraints $r_c$ as we can show that the presented conflict resolution approach can be used to prevent the advent of incoherence due to such rules $r_c$ . In the following, we will examine constraints of the form

(12) \begin{align} {{r_c}{:}\ } \leftarrow K,L,\end{align}

where K,L are internal atoms.

Recall that in logic programs, classical negation is actually syntactic sugar: Given the normal logic program ${\mathcal{P}^{+}}$ of $\mathcal{P}$ , classical negation can be incorporated by adding a constraint $\leftarrow A,A'.$ for every atom $A \in {\mathcal{A}}$ (Gelfond and Lifschitz Reference Gelfond and Lifschitz1991).

Example 20 Suppose the following program $\mathcal{P}_{20}$ :

\begin{align*} {r_1{:}\ } & x \leftarrow a. & {r_2{:}\ } & \overline{x} \leftarrow b. \end{align*}

This program is actually interpreted as a positive program $\mathcal{P}_{20}^+$ :

\begin{align*} {r_1{:}\ } & x \leftarrow a. & {{r_2'}{:}\ } & x' \leftarrow b. & {{r_x}{:}\ } & \leftarrow x, x'. \end{align*}

Example 20 shows that resolving the conflict between $(r_1,r_2')$ also ensures that $r_x$ is satisfied. As a generalization of this idea, we can therefore consider constraints as implicit pointers to potential conflicts. Consequently, the satisfaction of a constraint of form (12) can be ensured by treating every pair of rules r,r’ in $\mathcal{P}$ with ${H(r)} = L, {H(r)}[r'] = K$ as implicit conflicts (r,r’) and resolving them using the method for the resolution of conflicts via ${\lambda}$ -extensions.

Example 21 Suppose the following program $\mathcal{P}_{21}$ with internal atoms a,d and external atoms b,c,e,f:

\begin{align*} {r_1{:}\ } & a \leftarrow b, {\thicksim} c. & {r_2{:}\ } & a \leftarrow b, {\thicksim} f. & {r_3{:}\ } & d \leftarrow e. & {r_4{:}\ } \leftarrow a, d. \end{align*}

Then, $(r_3,r_1)$ and $(r_3,r_2)$ can be interpreted as conflicts. To resolve these two conflicts simultaneously, $\{{\thicksim} b\}$ can be added as a ${\lambda}$ -extension to $r_3$ . The modified program $\mathcal{P}_{21}'$ then has the following rules:

\begin{align*} {r_1{:}\ } & a \leftarrow b, {\thicksim} c. & {r_2{:}\ } & a \leftarrow b, {\thicksim} f. & {{r_3'}{:}\ } & d \leftarrow e, {\thicksim} b. & {r_4{:}\ } & \leftarrow a, d. \end{align*}

It is easy to see that a constraint of form (12) can be omitted once the implicit conflicts of the constraint are resolved with fitting ${\lambda}$ -extensions. Thus, rule $r_4$ is redundant in program $\mathcal{P}_{21}'$ , but one has to keep in mind that future, more comprehensive updates can lead to answer sets that contain literals a and d.

4.3 Conflict order

As stated at the beginning, the presented approach is a basic method that can be extended in many respects depending on the requirements of the user. A useful functionality regarding the workflow of conflict resolution is the order in which the conflicts are presented to the expert. It is important that the knowledge expert understands how the order of the conflicts is generated as any enhancement in the proposed framework must not negatively influence the actual decision regarding a resolution but rather aid the expert in finding the most suitable solution efficiently. One easily comprehensible implementation utilizes the affected rule count (inspired by Abdelhalim et al. Reference Abdelhalim, Traoré, Sayed and Notes2009) of the conflicting literals that reflects how many rules are potentially affected by a specific rule. For that, we first define the set ${\mathcal{R}}$ of all rules that are affected by a rule $r_1$ and compute the rule impact of $r_1$ by counting its affected rules.

Definition 10 (Affected Rules and Affected Rule Count) The set ${\mathcal{R}}_{r_1}$ of rules affected by a rule $r_1 \in \mathcal{P}$ is defined as

\begin{align*} &{\mathcal{R}}_{r_1} = \{r \in \mathcal{P} \mid {atom({H}(r_1))} \in {Atom({B(r)})}, ({B(r_1)} \cup {B(r)}) \text{is consistent}\}. \end{align*}

The affected rule count ${{\mathit{AR}}(r_1)}$ of $r_1$ is then defined by the number of affected rules, viz.

\begin{align*} {{\mathit{AR}}(r_1)} = \vert {\mathcal{R}}_{r_1} \vert. \end{align*}

Example 22 (Example 4 continued) Let $\mathcal{P}_{4}$ be program $\mathcal{P}_{{4}}$ extended by the following rules:

\begin{align*} {r_5{:}\ } {\mathit{drug{B}}} &\leftarrow {\mathit{\mathit{eligX}}}, {\mathit{cond{A}}}{Adv}, {\overline{{\mathit{drug{E}}}}}. \\ {r_6{:}\ } {\mathit{drug{C}}} &\leftarrow {\mathit{\mathit{eligX}}}, {\thicksim} {\mathit{cond{A}}}{Adv}, {\mathit{highLCount}}. \\ {r_7{:}\ } {\mathit{drug{D}}} &\leftarrow {\overline{{\mathit{\mathit{eligX}}}}}, {\mathit{cond{A}}}{Adv}, {\overline{{\mathit{preTreated{N}}}}}. \end{align*}

In $\mathcal{P}_{4}$ , rules $r_5$ and $r_7$ are affected by $r_1$ . Rule $r_6$ is not affected as ${B(r_1)}$ and ${B(r_6)}$ are not consistent due to atom ${\mathit{cond{A}}}{Adv}$ , that is, literal ${\mathit{cond{A}}}{Adv}$ occurs in $B^{+}(r_1)$ and in $B^{-}(r_6)$ . Ergo for $r_1$ , we yield the affected rule count ${{\mathit{AR}}(r_1)} = 2$ .

The affected rule count can provide the expert with a first impression (or possibly confirm own conjectures) of the possible impact that the given conflict and consequently the changes made to one of the conflicting rules have within the program. It can contribute additional information to the expert to anticipate the effect of a possible solution. Hence when using this order-criterion, it is on the expert to decide which conflict they want to solve first, for example, they can handle those conflicts with the least impact on other rules first. Additionally, such computed values can also help to decide which rules of a conflict to modify, for example, given a rule $r\in \mathcal{P}$ , it can be beneficial to modify one rule in ${\mathit{conflicts}({r})}$ first and then modify r in order to resolve all remaining conflicts of r (see Section 4.1).

4.4 ${\lambda}$ -scores

In the previous section, we presented a method that aims to improve the user’s first major task during the resolution process which is choosing a conflict out of all detected conflicts. In the next step, the user has to decide on a solution for a picked conflict. To facilitate the finding of a most suitable solution for a chosen conflict (r,r’), an ordering of the computed suggestions can be established. For that one can assign a score to each ${\lambda}$ -extension that is calculated using different criteria. In this section, we will outline one prototypical enhancement that adds a numerical value to each generated ${\lambda}$ -extension named ${\lambda}$ -score. We will present a basic approach to compute ${\lambda}$ -scores by utilizing the previously introduced affected rule count to quantify the effect a rule modification can have. Suppose a conflict $(r_1,r_2)$ and a solution $r'_1$ which can either be a computed solution ( ${\lambda}$ -extended rule) or a modified custom solution, respectively, for this conflict. In order to reflect the effect this solution can have on the overall program, one can look at the size of the difference between the affected rules of $r_1$ and the ${\lambda}$ -extended rule $r_1'$ which we will call the effect of the modification of $r_1$ to $r'_1$ .

Definition 11 (Effect) Let $(r_1,r_2)$ be a conflict in $\mathcal{P}$ and $r'_1$ a generated, ${\lambda}$ -extended rule of $r_1$ . Let furthermore ${\mathcal{R}}_{r_1}$ and ${\mathcal{R}}_{r'_1}$ be the respective sets of affected rules. Then, the effect ${\mathit{Eff}(r_1,r'_1)}$ of this modification is defined by

\begin{align*} {\mathit{Eff}(r_1,r'_1)} = {\mathcal{R}}_{r_1} - {\mathcal{R}}_{r'_1}.\end{align*}

Note that as ${\lambda}$ -extended rules always expand the body of the original rule and therefore are more specific, any generated solution will affect the same rules or a subset of the rules that are affected by the original rule, that is, ${\mathcal{R}}_{r'_1} \subseteq {\mathcal{R}}_{r_1}$ holds. The higher the effect of a solution, the more rules are not affected anymore after the modification w.r.t. the rules affected by the original rule. The effect of a suggested modification can therefore be used as the ${\lambda}$ -score of the suggestion. If for example an expert wants to examine the most cautious solutions, the solutions with the least effect can be presented first.

Example 23 (Example 10 continued) Suppose, the expert wants to resolve the conflict in $\mathcal{P}_{4}$ by changing $r_1$ to $r'_1$ with

\begin{equation*}{{r'_1}{:}\ } {\mathit{\mathit{eligX}}} \leftarrow {\overline{{\mathit{highLCount}}}}, {\mathit{preTreated{N}}}, {\mathit{ctrIndR}}.\end{equation*}

As rule $r_5$ is the only rule affected by $r'_1$ , we get the effect

\begin{equation*}{\mathit{Eff}(r_1,r'_1)} = \{r_5,r_7\} - \{r_5\} = 1.\end{equation*}

The effect of a modification tells the expert how impactful a change is regarding the affected rules, that is, how many additional and less rules are affected after the changes. The interpretation of the effect of modifications that is offered at this point can be seen as a first proposal to produce the ${\lambda}$ -scores. The corresponding method for their computation can thus serve as groundwork where individual enhancements and modifications are possible. The presented definition of modification effects is an illustrative example to show how ${\lambda}$ -extensions can hypothetically be ordered. For a given conflict, the user can inspect the suggestions sorted by their effect, starting with those that have the least effect. This way, they can look for and prioritize solutions that have the least impact on the program.

In analogue to the previously described method for ordering conflicts, any implementation for the computation of ${\lambda}$ -scores must not negatively influence the expert regarding their decisions, that is, enhancements like ordering conflicts and suggestions should not incentivize the expert to choose solutions with the sole intention to resolve all conflicts in the technically easiest and quickest way possible without considering the underlying errors and problems that led to the conflict, nor should it bias the expert’s thought process in any other negative way. In other words, the goal of such enhancements is to improve the finding of solutions that reflect the actual professional expertise best and simultaneously provide robustness for future updates (i.e. mitigate the potential for future conflicts), while not compromising any decision on a solution during the process.

Establishing a score for each suggestion allows to generate an order over all suggestions which in turn can be used to show the knowledge expert those suggestions first that are more relevant according to their criteria. If a semi-automated approach is wanted, the knowledge expert could also define a specific score threshold so that suggestions can be applied without the expert’s involvement. Then, if there exist suggestions ${\lambda}$ with a score below such a threshold, the conflict can be resolved directly by using every ${\lambda}$ with the lowest score as a solution. Enhancements like these that gather and use additional metadata can help to add a highly customizable abstraction layer between the knowledge expert and the actual knowledge base where the expert can input information about the program elements in order to resolve a conflict without the need for any technical knowledge about answer set programming while ensuring that the resulting rules are still representing correct knowledge in the professional sense.

5 Conclusion and future work

In this paper, we proposed a method to modify answer set programs such that they remain consistent given any (allowed) instance data. We provided an analysis how contradictions in a program can arise and discussed the necessary requirements rules have to satisfy in order to prevent contradictions while keeping the degree of change to a minimum. Based on that, we arrived at the notion of ${\lambda}$ -extensions and we presented a strategy that gathers all conflict-resolving ${\lambda}$ -extensions for a conflicting rule that comprise the atoms occurring in the conflicting rules. Extending a rule by a corresponding conflict-resolving ${\lambda}$ -extension resolves all conflicts of this rule simultaneously. As a consequence, a conflict resolution process that uses the proposed strategy for computing conflict-resolving ${\lambda}$ -extensions eventually yields a uniformly non-contradictory program core.

The presented approach constitutes crucial groundwork for the implementation of a larger (application) framework for updating and maintaining answer set programs. It enables the knowledge expert to inspect contradictory statements in a program and update rules interactively in view of new information given by an update. The suggestions that are generated by this algorithm can be viewed as a baseline for modifications. As mentioned in Example 10, applying a suggested ${\lambda}$ -extension to a rule r can lead to a “stricter” ${\lambda}$ -extended rule r’. Whether this makes sense or not, is highly dependent on the professional meaning of these rules. Our approach allows the knowledge expert to decide whether a suggested enhancement should be applied as is or additional (manual) modifications should follow the applied suggestion. But as shown with Proposition 5, every ${\lambda}$ -extension satisfies the minimal requirement of resolving the corresponding conflicts simultaneously and can therefore used as a reliable starting point.

This paper adresses one part of an interactive solution for conflict resolution in logic programs as proposed in Thevapalan and Kern-Isberner (Reference Thevapalan and Kern-Isberner2020). The running example illustrates that the proposed framework can pose a highly beneficial tool in the medical sector and other domains. We argue that any area where experts face complex decisions based on knowledge that is not solely comprised of facts but also on practical knowledge (experience) and continually growing and changing (adapted) expertise can highly profit from such a framework to efficiently build up and maintain an adequate knowledge base.

The ideas and results discussed in this paper can be adapted and extended in various ways. In Thevapalan et al. (Reference Thevapalan, Haupt and Kern-Isberner2022), the authors show how conflicts can be resolved in cases where the actual conflicting rules shall remain unchanged. For that, the concept of ${\lambda}$ -extensions is picked up to generate solutions that restore consistency. Aside from contradictions, extended logic program can also become inconsistent due to incoherence. A method to pinpoint the causes of incoherence in logic programs and strategies to reestablish coherence in a program are developed in Thevapalan et al. (Reference Thevapalan, Heyninck and Kern-Isberner2021).

Since in the presented conflict resolution strategy, the body of one of the conflicting rules is extended, one possible extension of the approach is the compilation of strategies for the remaining types of program modifications, namely reduction of rule bodies, replacing body literals, removing rules as a whole and adding new rules.

As outlined Section 4, we see numerous ways to extend the presented approach. In the future, we want to adapt the method of conflict resolution to resolve many-to-many conflicts in a more convenient way that generates ${\lambda}$ -extensions based on all involved rules that at best does not require the repeated use of a resolution.

Additionally, we want to work out methods to interactively compute ${\lambda}$ -scores (Section 4.4) in order to find suitable solutions more efficiently.

In each conflict resolution step during a conflict resolution process, solutions for a conflict are computed independently of other conflicts. In order to contemplate dependencies between conflicts, future work will also include the development of suitable heuristics to determine which rules of a conflict to modify (since a conflict-relation is symmetrical) and refine the order in which the different conflicts should be resolved. Besides taking into account the connections between conflicts, such heuristics could also consider individual preferences and conditions given by the expert, for example, a set of rules that shall not be modified, rule weights etc.

The other major functionality that is part of our ongoing work is the actual interaction process between the expert and the framework. These interactions must tackle two problems: explaining the cause of the respective conflict to the user and choosing the most suitable solution for it. Instead of burden the user with all available information, we suggest a dialogical approach where the user can reach an informed decision after a back-and-forth dialogue with the framework. Using argumentative dialogue theories (Caminada Reference Caminada2017; Modgil and Caminada Reference Modgil and Caminada2009; Walton and Krabbe Reference Walton and Krabbe1995) could enable the framework to “communicate” with the user where they can ascertain the underlying causes of the conflict and successively attain the most suitable suggestion.

Footnotes

1 Note that the inconsistency type is not solely determined by the answer set semantics of $\mathcal{P}$ but also by using well-founded semantics and the normal program of $\mathcal{P}$ . For more information on the inconsistency types, we refer the reader to Schulz et al. (Reference Schulz, Satoh, Toni and Notes2015), Inoue (Reference Inoue1993).

2 Keep in mind that default literals cannot be strongly negated, for example, ${\thicksim} \overline{L}, {\thicksim} K$ are not negated counterparts for two atom-related literals ${\thicksim} L, {\thicksim} {\overline{K}}$ .

References

Abdelhalim, A., Traoré, I. and Sayed, B. 2009. RBDT-1: A new rule-based decision tree generation technique. In Rule Interchange and Applications, International Symposium, RuleML 2009, Las Vegas, Nevada, USA, 5–7 November 2009. Proceedings, G. Governatori, J. Hall and A. Paschke, Eds. Notes, Lecture in Computer Science, vol. 5858. Springer, 108121.Google Scholar
Alferes, J. J., Leite, J. A., Pereira, L. M., Przymusinska, H. and Przymusinski, T. C. 1998. Dynamic logic programming. In 1998 Joint Conference on Declarative Programming, APPIA-GULP-PRODE’98, A Coruña, Spain, 20–23 July 1998, J. L. Freire-Nistal, M. Falaschi and M. V. Ferro, Eds., 393408.Google Scholar
Alferes, J. J., Leite, J. A., Pereira, L. M., Przymusinska, H. and Przymusinski, T. C. 2000. Dynamic updates of non-monotonic knowledge bases. Journal of Logic Programming 45, 1-3, 4370.CrossRefGoogle Scholar
Berge, C. 1989. Hypergraphs - Combinatorics of Finite Sets . North-Holland Mathematical Library, vol. 45. North-Holland.Google Scholar
Caminada, M. 2006. Well-founded semantics for semi-normal extended logic programs. In Proc. 11th Int’l Workshop on Nonmonotonic Reasoning, 103108.Google Scholar
Caminada, M. 2017. Argumentation semantics as formal discussion. Journal of Applied Logics 4, 8, 24572492.Google Scholar
Caminada, M. and Sakama, C. 2006. On the existence of answer sets in normal extended logic programs. In ECAI 2006, 17th European Conference on Artificial Intelligence, 29 August–1 September 2006, Riva del Garda, Italy, Including Prestigious Applications of Intelligent Systems (PAIS 2006), Proceedings, G. Brewka, S. Coradeschi, A. Perini and P. Traverso, Eds. Frontiers in Artificial Intelligence and Applications, vol. 141. IOS Press, 743744.Google Scholar
Costantini, S. 2006. On the existence of stable models of non-stratified logic programs. Theory and Practice of Logic Programming 6, 1-2, 169212.CrossRefGoogle Scholar
Eiter, T., Fink, M., Sabbatini, G. and Tompits, H. 2002. On properties of update sequences based on causal rejection. Theory and Practice of Logic Programming 2, 6, 711767.CrossRefGoogle Scholar
Gebser, M., Kaminski, R., Kaufmann, B. and Schaub, T. 2012. Answer Set Solving in Practice . Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3/4, 365386.Google Scholar
Ghosh, A. 2004. Understanding medical uncertainty: A primer for physicians. Journal of Association of Physicians of India 52, 739742.Google Scholar
Inoue, K. 1993. Studies on Abductive and Nonmonotonic Reasoning. Ph.D. thesis, Kyoto University.Google Scholar
Modgil, S. and Caminada, M. 2009. Proof theories and algorithms for abstract argumentation frameworks. In Argumentation in Artificial Intelligence. Springer, 105129.CrossRefGoogle Scholar
Przymusinski, T. C. 1991. Three-valued nonmonotonic formalisms and semantics of logic programs. Artificial Intelligence 49, 1-3, 309343.CrossRefGoogle Scholar
Reiter, R. 1980. A logic for default reasoning. Artificial Intelligence 13, 1-2, 81132.CrossRefGoogle Scholar
Schulz, C. 2017. Developments in Abstract and Assumption-based Argumentation and their Application in Logic Programming. Ph.D. thesis, Imperial College London, UK.Google Scholar
Schulz, C., Satoh, K. and Toni, F. 2015. Characterising and explaining inconsistency in logic programs. In Logic Programming and Nonmonotonic Reasoning - 13th International Conference, LPNMR 2015, Lexington, KY, USA, 27–30 September 2015. Proceedings, F. Calimeri, G. Ianni and M. Truszczynski, Eds. Notes, Lecture in Computer Science, vol. 9345. Springer, 467479.Google Scholar
Thevapalan, A., Haupt, K. and Kern-Isberner, G. 2022. Towards causality-based conflict resolution in answer set programs. In 16th International Conference on Logic Programming and Non-monotonic Reasoning, LPNMR 2022, Genova Nervi, Italy, 5–9 September 2022. Proceedings. Lecture Notes in Computer Science, vol. 13416. Springer. to be published.Google Scholar
Thevapalan, A., Heyninck, J. and Kern-Isberner, G. 2021. Establish coherence in logic programs modelling expert knowledge via argumentation. In Proceedings of the International Conference on Logic Programming 2021 Workshops co-located with the 37th International Conference on Logic Programming (ICLP 2021), Porto, Portugal (virtual), 20–21 September 2021, J. Arias, F. A. D’Asaro, A. Dyoub, G. Gupta, M. Hecher, E. LeBlanc, R. Peñaloza, E. Salazar, A. Saptawijaya, F. Weitkämper and J. Zangari, Eds. CEUR Workshop Proceedings, vol. 2970. CEUR-WS.org.Google Scholar
Thevapalan, A. and Kern-Isberner, G. 2020. Towards interactive conflict resolution in asp programs. In 18th International Workshop on Non-Monotonic Reasoning, Workshop Notes, M. V. Martínez and I. Varzinczak, Eds., 2936.Google Scholar
van Gelder, A., Ross, K. A. and Schlipf, J. S. 1991. The well-founded semantics for general logic programs. Journal of the ACM 38, 3, 620650.Google Scholar
Walton, D. and Krabbe, E. C. W. 1995. Commitment in Dialogue: Basic Concepts of Interpersonal Reasoning. State University of New York Press, Albany, NY, USA.Google Scholar
Figure 0

Fig. 1. Visualization of truth values of an atom A w.r.t. a set of literals S.

Figure 1

Fig. 2. Possible reationships between two atom-related literals.

Figure 2

Table 1. Relationship between two rules r,r’ with complementary head literals w.r.t. a literal ${L=A}$

Figure 3

Table 2. Results from Example 7