-
In real-world applications, the provenance of data can be very diverse and include non-trustworthy sources. Thus, databases are often inconsistent in practice when the data do not conform to the imposed integrity constraints (ICs). A rich theory has been developed to deal with inconsistent databases.
Formally, ICs describe fundamental structural properties of data that should be satisfied for a database to be considered consistent. ICs are often formulated in some logic, most notably in fragments of first-order logic. Two of the most fundamental classes of ICs are key constraints (indicating that the value of a given collection of attributes uniquely determines the whole record in the database table) and inclusion dependencies (which express that all values for a given attribute occur as values of another given attribute). Together, key constraints and inclusion dependencies (IDs) can express foreign key constraints. The literature for database dependencies considers a whole hierarchy of dependencies in increasing generality (see, e.g., Abiteboul[1]). Within this hierarchy, key constraints are special cases of functional dependencies (FDs), which are special cases of equality-generating dependencies, which again generalize to denial constraints (DCs). Likewise, IDs generalize to local-as-view tuple-generating dependencies (LTGDs), which are special cases of tuple-generating dependencies (TGDs). All the aforementioned dependencies can be defined as particular syntactic fragments of first-order logic (see the section "Preliminaries" for formal definitions). In this paper, we examine expressive ICs, specifically DCs and LTGDs, alongside their less expressive counterparts, FDs and IDs.
One of the main approaches for handling inconsistency is database repairing. The goal is to identify and repair inconsistencies in data to obtain a consistent database that satisfies the imposed constraints. In the usual approaches, one would search for a database that satisfies the given constraints and differs minimally from the original database; the obtained database is called a repair of the original. Some of the most prominent notions of repairs are set-based repairs[2,3], attribute-based repairs[4], and cardinality-based repairs[5].
Dung's abstract argumentation framework (AF)[6] has been specifically designed to model conflicts and support relationships among arguments. An abstract AF represents arguments and their conflicts through directed graphs and allows for a convenient exploration of the conflicts at an abstract level. Furthermore, it is often necessary to consider conflicts not only between individual arguments but also between sets of arguments. This necessity has given rise to the so-called set-based AFs (SETAFs)[7], which allow modeling of collective attacks.
AFs have been explored extensively for representing and reasoning with inconsistent knowledge bases (KBs), covering Datalog± and description logics (see, e.g., studies[8−13] and Arieli[14] for an overview). The common goal in each of these works is to formally establish a connection between inconsistent KBs and AFs such that the argumentation machinery then outputs extensions equivalent to the set of repairs of the KB. Nevertheless, in the setting of relational databases and ICs, there is still a gap with respect to how or whether a connection between inconsistent databases and AFs can be established. To the best of our knowledge, only FDs (or their generalization, denial constraints) have been investigated in the context of AFs (resp., SETAFs) in Bienvenu & Bourgaux[13]. We expand this area of research by establishing further connections between repairs and abstract argumentation frameworks when further ICs are allowed.
In this paper, we focus on subset repairs of relational databases when the ICs are DCs and LTGDs. The first problem of interest to us is establishing a connection between repairs for the inconsistent databases (DBs) and extensions in SETAFs. We show how subset-maximal repairs under a set of DCs and LTGDs can be obtained by computing the naive, preferred, or stable extensions (see the section "Preliminaries" for definitions) in the related SETAFs. Repairs under DCs correspond to the naive extensions, which also coincide with the preferred and stable extensions in the resulting SETAFs. For LTGDs, the correspondence requires preferred semantics. However, a polynomial-time pre-processing on the resulting SETAFs results in its unique extension that is also stable and naive. Allowing both types of ICs breaks this relationship between extensions, and only preferred semantics captures the repairs. Our second contribution highlights that when one restricts DCs to FDs and LTGDs to IDs, respectively, a similar connection as for the expressive ICs holds; however, now the resulting SETAFs are in fact AFs (with attacks only between arguments, rather than collective attacks). We are also interested in the computational problems of deciding the existence of a repair and of determining whether a given fact belongs to some (or every) repair and consider their complexity. See Table 1 for the complexity results.
Table 1. Overview of our main contributions.
Equivalence between DBs with expressive ICs and SETAFs, along with data complexity results. ICs SETAF-equivalent semantics for repairs Complexity results $ {\rm{REP}}_{{\rm{B}}} $ $ \exists {\text{-}}{\rm{REP}}_{{\rm{B}}} $ $ \forall {\text{-}}{\rm{REP}}_{{\rm{B}}} $ DCs $ \sigma \in \{\text{naive},\text{pref},\text{stab}\}^\star $ (trivial) (trivial) $ \in{\bf{P}} $ LTGDs $ \text{pref} $ (Thm. 3.9) $ \in{\bf{P}} $[15] $ \in{\bf{P}} $[15] $ \in{\bf{P}} $[15] DCs+LTGDs $ \text{pref} $ (Thm. 3.13) $ {\bf{NP}} $ (Thm. 3.14) $ {\bf{NP}} $ (Thm. 3.14) $ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ (Thm. 3.15) Equivalence between DBs with less expressive ICs and AFs, along with combined complexity results. ICs AF-equivalent semantics for repairs Complexity Results $ {\rm{REP}} $ $ \exists {\text{-}}{\rm{REP}} $ $ \forall {\text{-}}{\rm{REP}} $ FDs $ \sigma \in \{\text{naive},\text{pref},\text{stab}\}^\star $ (trivial) (trivial) $ \in{\bf{P}} $ IDs $ \text{pref} $ (Cor. 4.7) $ \in{\bf{P}} $[15] $ \in{\bf{P}} $[15] $ \in{\bf{P}} $[15] FDs+IDs $ \text{pref} $ (Cor. 4.12) $ {\bf{NP}} $ (Thm. 4.13) $ {\bf{NP}} $ (Thm. 4.13) $ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ (Thm. 4.16) The table at the top indicates results for expressive ICs involving a fixed set $ B $ of DCs and LTGDs, whereas the table at the bottom depicts results for less expressive ICs including FDs and IDs. The lower bounds for less expressive ICs also hold for data complexity since the involved reductions use fixed sets of constraints. The second column in each table indicates the (SET)AF-semantics corresponding to repairs for ICs in the first column, and the last three columns present the complexity of each problem. The P-results are already known in the literature, whereas the remaining results are new. Finally, the results marked by * follow from the earlier work in studies[13,17]. By employing Dung's AFs (and their generalizations, SETAFs) to model repairs of a relational database, one can effectively abstract away from the detailed content of individual entries in the database and focus solely on their relationships with other entries. This approach provides a clearer understanding of why specific records either appear or do not appear in a repair, as well as the reasons certain values may be absent from query answers. Furthermore, this modeling approach allows for the incorporation of additional information about records, such as priorities among them, directly at an abstract level.
Related work The problem of computing subset-maximal repairs and its complexity has been explored extensively in the database setting[15−20] (see studies[21,22] for an overview). The notions of conflict graphs and hypergraphs have been introduced before for certain families of ICs[23−25]. In particular, a correspondence between repairs and subset-maximal independent sets of the conflict graphs for FDs[16] and DCs[17] has been established. Moreover, a recent work defines conflict (hyper)graphs for a richer setting of universal constraints considering symmetric difference repairs[26]. Notice that the connection between repairs and independent sets also yields a correspondence between repairs and the naive extensions when the conflict graph is seen as an AF. Nevertheless, to the best of our knowledge, no work has considered a similar graph representation when LTGDs (or even IDs) are taken into account. Hannula and Wijsen[18] addressed the problem of consistent query answering with respect to primary and foreign keys. Their setting allows the insertion of new tuples to fulfill foreign key constraints rather than only deleting.
The case of unirelational databases is also connected to the team-semantics literature[27]. Team semantics is a logical framework where formulae are evaluated over unirelational databases (teams in their terminology). In this setting, the complexity of finding maximal satisfying subteams has been studied by Hannula & Hella[28] for inclusion logic formulas and by Mahmood[29] for propositional dependence logic. In the team-semantics literature, FDs are known as dependence atoms and IDs as inclusion atoms, denoted, respectively, as
and$ \text{dep}({\boldsymbol{x}} ; {\boldsymbol{y}}) $ (We borrow this notation and write$ {\boldsymbol{x}} \subseteq {\boldsymbol{y}} $ and$ \text{dep}({\boldsymbol{x}} ; {\boldsymbol{y}}) $ for FDs and IDs, respectively).$ {\boldsymbol{x}} \subseteq {\boldsymbol{y}} $ Our work differs from the previous work, since it combines denial constraints (a subclass of universal constraints) and LTGDs (a subclass of tuple-generating dependencies). Moreover, one of our main contributions lies in connecting repairs under DCs (resp., FDs) and LTGDs (IDs) to the extensions of set-based (plain) AFs in Dung's setting[6]. A similar connection between (SET)AFs and preferred repairs has been explored in the context of prioritized description logic[13] and Datalog± KBs[30−33]. Employing abstract argumentation, we utilize facts in a database as arguments, aligning with the approach presented in Bienvenu & Bourgaux[13]. In fact, the results for DCs and FDs regarding preferred and stable semantics follow as a corollary from the work by Bienvenu & Bourgaux[13] since repairs in the prioritized setting generalize subset repairs. In contrast, Croitoru et al.[31,32] take an orthogonal approach in the datalog setting, employing structured argumentation to construct arguments from a given KB.
Regarding the expressivity comparison between various formalisms, König el al.[34] provided several translations between different argumentation formalisms, namely assumption-based argumentation (ABA)[35], claim-augmented frameworks (CAF)[36], and argumentation frameworks with collective attacks (SETAF)[7]. This puts our work in a broader context by presenting novel translations from databases with expressive ICs to SETAFs. Furthermore, recently, Mahmood et al.[37] presented translations from AFs to inconsistent databases, which is the converse direction to what we aimed to achieve in this paper. Their main findings indicate that one can translate argument interaction in an AF via FDs and IDs alone.
Prior work A preliminary version of this work was published in FoIKS 2024[38]. The current paper expands the earlier work to more expressive ICs. To be precise, we utilize SETAFs to simulate denial constraints and LTGDs using the same ideas as for FDs and IDs. The conference version focused on FDs and IDs in connection to plain AFs. The results for DCs follow from the work by Bienvenu & Bourgaux[13]; thus, the task is to extend them to LTGDs. The results of the conference version can now be derived as special cases from the more general results of this paper, when the involved ICs are FDs and IDs.
-
We assume that the reader is familiar with basics of complexity theory and first-order logic. In particular, we will encounter (1) the complexity classes
, and$ {\bf{P}}, {\bf{NP}} $ , and (2) closed first-order formulas having$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ as the quantifier prefixes. In the following, we shortly recall the necessary definitions from databases and argumentation.$ \forall.\exists. $ Databases A (relational) schema
is a finite set of relation names. Each relation$ \tau $ is associated with a positive integer, called the arity of$ T\in\tau $ . We consider a countable set$ T $ of constants to act as domain elements, from which the values can appear in a database. A term is either a constant from$ C $ or a variable. Let$ C $ be terms and$ t_1,\dots,t_k $ be a relation of arity$ T\in\tau $ , the expression$ k $ is called a relational atom. A relational atom composed of only constants is called a fact. Given a schema$ T(t_1,\dots,t_k) $ , a database$ \tau $ over$ {\cal{T}} $ is a finite set of facts using relation symbols from$ \tau $ . The active domain of a database$ \tau $ is denoted as$ {\cal{T}} $ and defined as the collection of all the constant values from$ \text{dom}({\cal{T}}) $ that occur in facts of$ C $ .$ {\cal{T}} $ A fact can also be seen as a database tuple. In this notation, the fact
corresponds to stating that the tuple$ T(a_1,\dots,a_k) $ is a record in the (database) table$ (a_1,\dots,a_k) $ of arity$ T $ —which is a collection of such tuples, each with an associated unique identifier. For analogy, a table corresponds to a relation name$ k $ in a schema$ T $ and can be seen as a grouping of facts together that use the same relation symbol (namely,$ \tau $ ). For a table$ T $ of arity$ T $ , the positions$ k $ in the columns of$ \{1,\dots,k\} $ are usually given explicit names, resulting in the set$ T $ of attributes of$ \text{att}(T) $ . The active domain$ T $ of$ \text{dom}(T) $ in the tabular view is the collection of all the values that occur in the tuples of$ T $ . We denote individual attributes (or variables) by small letters (e.g.,$ T $ ,$ x $ ) and reserve boldface letters (e.g.,$ y $ ) for sequences of attributes. For an attribute$ {\boldsymbol{x}}, {\boldsymbol{y}} $ and a tuple$ x\in\text{att}(T) $ ,$ s\in T $ denotes the value taken by$ s(x) $ for the attribute$ s $ . For a sequence$ x $ ,$ {\boldsymbol{x}} =(x_1,\ldots,x_k) $ denotes the sequence of values$ s({\boldsymbol{x}}) $ . Given this tabular view, a database over schema$ (s(x_1),\ldots, s(x_k)) $ is seen as a collection$ \tau = \{T_1,\ldots, T_m \} $ of tables corresponding to relation symbols in$ {\cal{T}}=(T_1,\dots, T_m) $ . Again, the active domain$ \tau $ of a database$ \text{dom}({\cal{T}}) $ is the union of active domains of each table$ {\cal{T}} $ . We find it convenient to write a database without explicitly mentioning its schema and active domain always.$ T\in{\cal{T}} $ We next present an example database.
Example 2.1 Consider the schema
. The database tables over this schema (Table 2) contain data about employees and departments, respectively. Here, E(E1, D1, Paderborn) is a fact and (E1, D1, Paderborn) is a tuple in$ \{E,D\} $ with identifier$ E $ . For presentation of examples, we refer to tuple identifiers also as facts. Hence, we write$ e_1 $ for the fact E(E1, D1, Paderborn).$ e_1 $ ◁ Table 2. A database with two tables over the schema {E,D}.
E Emp_ID Dept_ID Location D Dept_ID Dept_NAME Location e1 E1 D1 Paderborn d1 D1 Sales Paderborn e2 E2 D2 Sheffield d2 D2 Marketing Sheffield e3 E3 D2 Hanover d3 D3 HR Hanover The first column indicates identifier for each fact/tuple. Integrity constraints. ICs are closed first-order formulas, i.e., all the variables are bound to quantification. In the following, we first specify different types of ICs.
Let
be a database schema. Recall that a database atom is an application of any relation name$ \tau $ over variables or constants. Let$ T\in\tau $ and$ \varphi $ be conjunctions of database atoms and let$ \psi_i $ be a quantifier-free formula using only built-in predicates (e.g., equality or inequality). We call a formula of the form$ \beta $ $ \forall {\boldsymbol{x}} (\varphi({\boldsymbol{x}})\land \beta({\boldsymbol{x}})\rightarrow \bigvee\limits_{i=1}^n \exists {\boldsymbol{y}}_i \psi_i({\boldsymbol{x}}, {\boldsymbol{y}}_i)) $ a generic first-order IC (FO). All other types of constraint languages arise from restrictions on the generic ICs, as we illustrate next. A generic IC is called full or a universal constraint (UC) if it contains no existential quantifiers. A DC has the form
, which can also be thought of as a UC with empty right hand side. An equality-generating dependency (EGD) has the form$ \forall {\boldsymbol{x}} \neg (\varphi({\boldsymbol{x}})\land \beta ({\boldsymbol{x}})) $ , which can be thought of as a DC where$ \forall {\boldsymbol{x}} (\varphi({\boldsymbol{x}})\rightarrow x_i=x_j) $ is a single inequality. Let$ \beta $ be an$ T $ -ary relation and$ n $ be two sets with pairwise distinct variables$ I,J\subseteq \{1,\dots,n\} $ . Then, an FD over$ x_1,\dots,x_n,y_1,\dots,y_n $ is an EGD of the form$ T $ . A key constraint is a special type of FD requiring$ \forall {\boldsymbol{x}} \forall {\boldsymbol{y}} (T({\boldsymbol{x}}) \land T({\boldsymbol{y}}) \land \bigwedge_{i\in I}x_i =y_i \rightarrow \bigwedge_{j\in J}x_j=y_j) $ .$ I\cup J = \{1,\dots,n\} $ A disjunctive tuple-generating dependency (
-TGD) is a generic IC that has empty$ \vee $ and an ordinary tuple-generating dependency (TGD) additionally requires$ \beta $ . An LTGD is a TGD where$ n=1 $ is a single atom and an ID is an LTGD where$ \varphi $ is also a single atom. Figure 1 (adapted from study by Arming[39]) presents an overview of the hierarchy of different ICs together with their syntactic forms.$ \psi_i $
Figure 1.
Hierarchy of ICs and syntactic form for the most commonly studied constraints[39].
The semantics for ICs is defined similarly to first-order (FO) formulas. A database
over schema$ {\cal{T}} $ gives rise to an FO-structure$ \tau $ over the vocabulary$ \mathcal A $ . The domain of$ \tau $ is the active domain$ \mathcal A $ of$ \text{dom}({\cal{T}}) $ and each relation symbol$ {\cal{T}} $ is interpreted as the corresponding database table$ T\in \tau $ in$ T $ , i.e., it contains all the tuples of constants$ {\cal{T}} $ over$ (a_1,\dots,a_k) $ such that$ \text{dom}({\cal{T}}) $ . Then, for an IC$ T(a_1,\dots,a_k)\in {\cal{T}} $ , we write$ \alpha $ iff$ {\cal{T}}\models \alpha $ under the classical Tarski semantics. Moreover, one often uses a more convenient notation for FDs and IDs as we illustrate next. Let$ \mathcal A\models \alpha $ be an$ T $ -ary relation,$ n $ be two sets and let$ I,J\subseteq \{1,\dots,n\} $ be pairwise distinct variables. Then, for sequences$ x_1,\dots,x_n,y_1,\dots,y_n $ and$ {\boldsymbol{X}} = (x_i \mid i\in I) $ , the FD$ {\boldsymbol{Y}} = (y_j \mid j\in J) $ can be equivalently expressed as$ \forall {\boldsymbol{x}} \forall {\boldsymbol{y}} (T({\boldsymbol{x}}) \land T({\boldsymbol{y}}) \land \bigwedge_{i\in I}x_i =y_i \rightarrow \bigwedge_{j\in J}x_j=y_j) $ or$ \text{dep}({\boldsymbol{X}} ; {\boldsymbol{Y}}) $ (as done usually in the DBs setting). Moreover, let$ {\boldsymbol{X}} \rightarrow {\boldsymbol{Y}} $ and$ T_i $ be two relations, and$ T_j $ be sequences of variables. The ID$ {\boldsymbol{x}}_1, {\boldsymbol{x}}_2, {\boldsymbol{x}}_3 $ can be equivalently expressed as$ \forall {\boldsymbol{x}}_1 \forall {\boldsymbol{x}}_2 (T_i({\boldsymbol{x}}_1,{\boldsymbol{x}}_2) \rightarrow \exists {\boldsymbol{x}}_3 T_j({\boldsymbol{x}}_2,{\boldsymbol{x}}_3)) $ where$ T_i[{\boldsymbol{Y}}] \subseteq T_j[{\boldsymbol{X}}] $ (respectively,$ {\boldsymbol{X}} $ ) is the set of attributes of$ {\boldsymbol{Y}} $ ($ T_j $ ) corresponding to$ T_i $ . We find it convenient to write$ {\boldsymbol{x}}_2 $ instead of$ {\boldsymbol{Y}}\subseteq {\boldsymbol{X}} $ for an ID involving a single relation$ T[{\boldsymbol{Y}}]\subseteq T[{\boldsymbol{X}}] $ . We will use this notation throughout our paper.$ T $ The following example depicts ICs over the database from Example 2.1.
Example 2.2 Consider a DC
and an LTGD$ {\rm{dc}} $ , as given below.$ {\rm{lav}} $ $ {\rm{dc}} := \forall x_1, x_2, x_3, x_4, x_5 \neg (E(x_1, x_2, x_3) \land D(x_2, x_4, x_5) \land x_3 \neq x_5) $ $ {\rm{lav}} := \forall x_1, x_2, x_3 (D(x_1, x_2, x_3) \to \exists y_1, y_2 E(y_1, x_1, y_2)) $ The DC
states that the database should not contain any employees that work at a different location than where their department is located and the LTGD$ {\rm{dc}} $ requires that every department has at least one employee. Both$ {\rm{lav}} $ and$ {\rm{dc}} $ are violated in the database from Example 2.1.$ {\rm{lav}} $ ◁ Let
be a database (a collection of facts) and$ {\cal{T}} $ be a collection of ICs. Then$ B $ is consistent with respect to$ {\cal{T}} $ , denoted as$ B $ , if$ {\cal{T}}\models B $ for each$ {\cal{T}}\models b $ . Moreover,$ b\in B $ is inconsistent with respect to$ {\cal{T}} $ if there is some$ B $ such that$ b\in B $ . A subset-repair of$ {\cal{T}}\not \models b $ with respect to$ {\cal{T}} $ is a subset$ B $ that is consistent with respect to$ {\cal{P}}\subseteq {\cal{T}} $ , and maximal in the sense that no set$ B $ exists such that it is consistent with respect to$ {\cal{P}}' $ and$ B $ . In the tabular view, the subset of a DB$ {\cal{P}} \subset {\cal{P}}' \subseteq T $ is defined as$ {\cal{T}} = (T_1,\dots,T_m) $ , where$ {\cal{P}} = (P_1,\dots,P_m) $ for each$ P_i\subseteq T_i $ . In the following, we simply speak of a repair when we intend to mean a subset-repair. Furthermore, we often consider a database$ i\leq m $ and a set$ {\cal{T}} $ of ICs assuming that$ B $ only uses relation names from the schema of$ B $ . In that case, we call$ {\cal{T}} $ a constrained database. For a constrained database$ {\cal{D}} = \langle {\cal{T}}, B \rangle $ ,$ {\cal{D}} $ denotes the set of all repairs for$ \text{repairs}({\cal{D}}) $ .$ {\cal{D}} $ The first problem we are interested in (
) asks whether there exists a repair for a constrained database$ {\rm{REP}} $ . Since the empty database ($ {\cal{D}} $ ) satisfies each IC trivially, we are interested in the decision problem asking whether a non-empty repair exists.$ \emptyset $ Problem: REP Input: a constrained database $ {\cal{D}}=\langle {\cal{T}}, B\rangle $ Question: is there a repair with$ \mathcal R\in \text{repairs}({\cal{D}}) $ $ \mathcal R\neq \emptyset $ Two further problems of interest are brave and cautious reasoning for a given fact
, asking whether$ s\in {\cal{T}} $ belongs to some (every) repair for$ s $ .$ {\cal{D}} $ Problem: $ \exists {\text{-}}{\rm{REP}} $ Input: a constrained database and a fact$ {\cal{D}}=\langle {\cal{T}}, B\rangle $ $ s\in {\cal{T}} $ Question: does belong to some repair for$ s $ $ {\cal{D}} $ Problem: $ \forall {\text{-}}{\rm{REP}} $ Input: a constrained database and a fact$ {\cal{D}}=\langle {\cal{T}}, B\rangle $ $ s\in {\cal{T}} $ Question: does belong to all repairs for$ s $ $ {\cal{D}} $ We also consider the case when the set
of ICs is fixed and the input only involves a database$ B $ (and a fact$ {\cal{T}} $ ). This gives rise to separate decision problems$ s $ ,$ {\rm{REP}}_{{\rm{B}}} $ and$ \exists {\text{-}}{\rm{REP}}_{{\rm{B}}} $ , for each$ \forall {\text{-}}{\rm{REP}}_{{\rm{B}}} $ . We can then define the data complexity of$ B $ ,$ {\rm{REP}} $ and$ \exists {\text{-}}{\rm{REP}} $ , in the usual way. That is, for a complexity class$ \forall {\text{-}}{\rm{REP}} $ , the data complexity of$ {\cal{C}} $ is in$ {\rm{REP}} $ , if$ {\cal{C}} $ is in$ {\rm{REP}}_{{\rm{B}}} $ , for every$ {\cal{C}} $ , and$ B $ -hard, if$ {\cal{C}} $ is$ {\rm{REP}}_{{\rm{B}}} $ -hard, for some$ {\cal{C}} $ . Thus, the problems defined above (i.e.,$ B $ ,$ {\rm{REP}} $ and$ \exists {\text{-}}{\rm{REP}} $ ) then correspond to the setting of combined complexity.$ \forall {\text{-}}{\rm{REP}} $ Observe that our focus in this work lies on inconsistent databases, i.e., we assume that
is inconsistent with respect to$ {\cal{T}} $ in a constrained database$ B $ . This is not a restriction since the considered questions about repairs are trivial if the database is consistent with respect to its constraints. Moreover, all our translations to (SET)AFs and the connection between repairs and extensions still apply to the consistent case, although they do not provide much insight.$ {\cal{D}}=\langle {\cal{T}}, B\rangle $ The following example presents a repair for the database from Example 2.1 with respect to the ICs from Example 2.2.
Example 2.3 Reconsider the database from Example 2.1, which is inconsistent with the ICs from Example 2.2. Here, the fact
violates$ d_3 $ , and the only way to resolve this violation (in our subset-repair setting) is to remove$ {\rm{lav}} $ . Moreover, the set$ d_3 $ also violate$ \{e_3, d_2\} $ . This results in two ways to repair our database, by removing either of those facts. Thus, we have two subset-maximal repairs, namely$ {\rm{dc}} $ and$ \{e_1, e_2, d_1, d_2\} $ .$ \{e_1, e_2, e_3, d_1\} $ ◁ Abstract argumentation We use Dung's argumentation framework[6] and consider only non-empty and finite sets of arguments
. An (argumentation) framework (AF) is a directed graph$ A $ , where$ {\cal{F}}=(A, R) $ is a set of arguments and the relation$ A $ represents direct attacks between arguments. If$ R \subseteq A\times A $ , we say that an argument$ S\subseteq A $ is defended by$ s \in A $ in$ S $ , if for every$ {\cal{F}} $ there exists$ (s', s) \in R $ such that$ s''\in S $ .$ (s'',s')\in R $ In abstract argumentation, one is interested in computing the so-called extensions, which are subsets
of the arguments that have certain properties. The set$ S \subseteq A $ of arguments is called conflict-free in$ S $ if$ {\cal{F}} $ . Let$ (S\times S) \cap R = \emptyset $ be conflict-free, then$ S $ is$ S $ 1. naive in
if no$ {\cal{F}} $ is conflict-free in$ S' \supset S $ ;$ {\cal{F}} $ 2. admissible in
if every$ {\cal{F}} $ is defended by$ s \in S $ in$ S $ .$ {\cal{F}} $ Further, let
be admissible. Then,$ S $ is$ S $ 3. preferred in
, if there is no$ {\cal{F}} $ that is admissible in$ S' \supset S $ ;$ {\cal{F}} $ 4. stable in
if every$ {\cal{F}} $ is attacked by some$ s \in A \setminus S $ .$ s' \in S $ We denote each of the mentioned semantics by abbreviations:
and$ \text{conf},\text{ naive},\ \mathrm{adm},\ \mathrm{pref} $ , respectively. For a semantics$ \text{stab} $ , we write$ \sigma \in \{\text{conf}, \text{naive}, \text{adm}, \text{pref}, \text{stab}\} $ for the set of all extensions of semantics$ \sigma({\cal{F}}) $ in$ \sigma $ . Now, we are ready to define the corresponding decision problem asking for extension existence with respect to a semantics$ {\cal{F}} $ .$ \sigma $ Problem: $ {\rm{Ext}}\sigma $ Input: an argumentation framework $ {\cal{F}} $ Question: is it true that $ \sigma({\cal{F}})\neq\emptyset $ Finally, for an AF
and$ {\cal{F}}{=}(A,R) $ , we define the problems$ a\in A $ and$ {\rm{Cred}}_{\sigma} $ , which ask whether$ {\rm{Skep}}_{\sigma} $ is in some$ a $ -extension of$ \sigma $ ("credulously accepted") or every$ {\cal{F}} $ -extension of$ \sigma $ ("skeptically accepted"), respectively.$ {\cal{F}} $ Problem: $ {\rm{Cred}}_\sigma $ Input: an AF and an argument$ {\cal{F}} = (A, R) $ $ a \in A $ Question: is it true that for some$ a \in E $ $ E \in \sigma({\cal{F}}) $ Problem: $ {\rm{Skep}}_\sigma $ Input: an AF and an argument$ {\cal{F}} = (A, R) $ $ a \in A $ Question: is it true that for all$ a \in E $ $ E \in \sigma({\cal{F}}) $ Example 2.4 Consider the argumentation framework
with the attack relation as depicted in Fig. 2. Then extensions for$ \mathcal{AF} = \{a,b,c,d\} $ are also depicted in Fig. 2 for the mentioned semantics.$ {\cal{F}} $ ◁
Figure 2.
Framework $ {\cal{F}} $ from Example 2.4 (left) and extensions for given semantics (right).
The complexity of reasoning in argumentation is well understood, see Table 1 in Dvorák & Dunne[40] for an overview. In particular,
and$ {\rm{Cred}}_{\text{naive}} $ are in P, whereas,$ {\rm{Skep}}_{\text{naive}} $ and$ {\rm{Cred}}_{\text{pref}} $ are$ {\rm{Skep}}_{\text{pref}} $ -complete and$ {\bf{NP}} $ -complete, respectively. Moreover, the problem to decide whether there is a non-empty extension is in P for$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ and$ \text{naive} $ -complete for$ {\bf{NP}} $ -semantics. This makes$ \text{pref} $ -semantics somewhat easier and$ \text{naive} $ the hardest among the considered semantics in this work.$ \text{pref} $ Set-based argumentation. Dung's AFs can be generalized by allowing attacks not only from single arguments, but from collections of arguments[7]. A B-hypergraph (backwards hypergraph) is a directed hypergraph
where each edge goes from a set of nodes to a single node, i.e.,$ (V, E) $ . A set-based argumentation framework (SETAF) is a B-hypergraph$ E \subseteq 2^V \times V $ where$ {\cal{F}} = (A, R) $ is the set of arguments and$ A $ represents the attacks from sets of arguments to individual arguments. A subset$ R \subseteq 2^A \times A $ of arguments is conflict-free, if$ S \subseteq A $ and$ (2^S \times S) \cap R = \emptyset $ defends an argument$ S $ if for every$ s \in A $ there exists$ (S', s) \in R $ such that$ S" \subseteq S $ for some$ (S'',s')\in R $ . For$ s' \in S' $ a singleton set, we prefer denoting the attack$ S=\{s\} $ by$ (\{s\},s') $ . With this definition of conflict-freeness, the notions of naivety, admissibility, preferredness and stability are defined analogously to plain AFs.$ (s, s') $ Problem: $ {\rm{Ext}}\sigma^{SET} $ Input: a SETAF $ {\cal{F}} $ Question: is it true that $ \sigma({\cal{F}}) \neq \emptyset $ For a SETAF
and argument$ {\cal{F}} $ , we similarly define the problems$ a\in A $ and$ {\rm{Cred}}_{\sigma} $ asking whether$ {\rm{Skep}}_{\sigma} $ is in some$ a $ -extension of$ \sigma $ or every$ {\cal{F}} $ -extension of$ \sigma $ , respectively.$ {\cal{F}} $ Example 2.5 Consider the SETAF
, where$ {\cal{S}} = (A, R) $ and$ A = \{a, b, c, d, e\} $ . In$ R = \{(\{a, b\}, d), (\{b, c\}, e), (\{e\}, a)\} $ , the extension$ {\cal{S}} $ is conflict-free, preferred and stable. Note that$ \{a, b, c\} $ defends$ \{b, c\} $ against$ a $ . This example is visualized in Fig. 3.$ \{e\} $ ◁ The corresponding decision problem for the extensions existence is defined as follows.
-
In this section, we prove that repairs under expressive families of ICs (involving DCs and LTGDs) can be equivalently seen as extensions in SETAFs. In the first two subsections, we consider instances containing only one type of ICs to SETAFs and the third subsection combines both constraints (DCs and LTGDs). Given an instance
comprising a database$ {\cal{D}} = \langle {\cal{T}},B\rangle $ and a set$ {\cal{T}} $ of ICs, the goal is to capture all the subset-repairs for$ B $ by$ {\cal{D}} $ -extensions of the resulting SETAF$ \sigma $ for some semantics$ {\cal{S}}_{\cal{D}} $ .$ \sigma $ In the section "Simulating DCs via SETAFs", we encode a constrained database
with database$ {\cal{D}} = \langle {\cal{T}},D \rangle $ and a collection$ {\cal{T}} $ of DCs into a SETAF$ D $ . This is achieved by letting each fact$ {\cal{S}}_{\cal{D}} $ be an argument. Then the attack relation between arguments simulates the violation of some$ s\in {\cal{T}} $ by sets of facts. This allows to establish a connection between repairs for$ d \in D $ and the extensions for the resulting SETAF under preferred, stable and naive semantics. This construction for DCs is a special case of the results in Bienvenu & Bourgaux[13]. In our case, we do not consider priorities among facts in the database, which allows a weaker SETAF-semantics (naive extensions) to capture repairs.$ {\cal{D}} $ In the section "Simulating LTGDs via SETAFs", we simulate a constrained database
including a collection$ {\cal{D}}= \langle {\cal{T}}, L\rangle $ of LTGDs via SETAFs. The first observation is that the semantics for LTGDs requires the notion of support or defense rather than conflict between facts. Then, we depict each fact as an argument as well as use auxiliary arguments to simulate the dependency$ L $ (i.e., to model the semantics for LTGDs). Further, we add self-attacks for these auxiliary arguments to prohibit them from appearing in any extension. Consequently, we establish a connection between repairs for$ \ell \in L $ and the extensions for SETAFs under preferred semantics. Finally, we present a polynomial-time processing of the resulting SETAFs that computes its unique preferred extension, which also yields a unique repair for$ {\cal{D}} $ . Interestingly, the computed preferred extension is also stable and naive, and hence coincides with the only repair for$ {\cal{D}} $ . Our construction for LTGDs relies on self-attacking arguments. This allows us to avoid taking auxiliary arguments in any extension and establish a connection between repairs of a DB and extensions of the resulting SETAF. Toward the end of our paper, in the section "Simulating FDs and IDs via AFs", we discuss the role played by the self-attacking arguments and a possibility for a different translation from DBs to (SET)AFs.$ {\cal{D}} $ Having established that both DCs and LTGDs can be modeled in SETAFs via attacks, the section "Simulating DCs and LTGDs via SETAFs" generalizes this approach by allowing both types of constraints. We observe that no prior work has handled the case of tuple-generating dependencies (to our knowledge).
We first formalize the notion of conflicts for a DB with respect to a set of DCs. Intuitively, a conflict in a constrained database
is a minimal (under set inclusion) inconsistent set of facts from$ {\cal{D}} $ with respect to some DC in$ {\cal{T}} $ .$ {\cal{D}} $ Definition 3.1 Let
be a constrained database with a set$ {\cal{D}}=\langle{\cal{T}}, D \rangle $ of DCs. A collection$ D $ of facts is a conflict in$ C\subseteq {\cal{T}} $ if there exists some$ {\cal{D}} $ such that (i)$ d\in D $ , and (ii)$ C\not\models d $ for each proper subset$ C'\models d $ .$ C'\subsetneq C $ Given
, then by$ {\cal{D}} $ we denote the set of all conflicts in$ {\rm{Conf}}({\cal{D}}) $ . It is known that$ {\cal{D}} $ can be represented as a conflict hypergraph[20], where the vertices are the facts in$ {\rm{Conf}}({\cal{D}}) $ and hyperedges are conflicts in$ {\cal{D}} $ . We follow Bienvenu & Bourgaux[13] and transform an instance$ {\cal{T}} $ with database$ {\cal{D}} = \langle {\cal{T}}, D\rangle $ and a collection$ {\cal{T}} $ of DCs to a SETAF$ D $ .$ {\cal{S}}_{\cal{D}} $ Definition 3.2 (Bienvenu & Bourgaux[13]) Let
be a constrained database including a database$ {\cal{D}} = \langle {\cal{T}}, D\rangle $ and a collection$ {\cal{T}} $ of DCs. Then,$ D $ denotes the following SETAF.$ {\cal{S}}_{\cal{D}} $ ●
, i.e, each fact$ A := {\cal{T}} $ is seen as an argument.$ s\in {\cal{T}} $ ●
.$ R := \{(C\setminus\{t\}, t) \mid C\in{\rm{Conf}}({\cal{D}}), t\in C\} $ We call
the SETAF generated by$ {\cal{S}}_{\cal{D}} $ .$ {\cal{D}} $ It is worth highlighting that given a set
of DCs as input, then checking whether "a database$ D $ is a repair of a database$ {\cal{T}}' $ w.r.t.$ {\cal{T}} $ " is$ D $ -complete even if$ {\bf{DP}} $ and$ {\cal{T}} $ are both fixed[39], Lemma 6. The complexity of the repair checking problem drops to P if we consider a fixed set of DCs. As a result, one normally considers a fixed set$ {\cal{T}}' $ of DCs. In our encoding, this has the effect that one can construct the argumentation framework from a constrained database$ D $ in polynomial time. Furthermore, given the conflict hypergraph$ {\cal{D}} $ for a constrained database$ {\cal{G}}_{\cal{D}} $ , the framework$ {\cal{D}} $ can still be constructed in polynomial time in the size of$ {\cal{S}}_{\cal{D}} $ .$ {\cal{G}}_{\cal{D}} $ Example 3.3 Consider the following database tables
and$ C $ , containing the data about customers and orders, respectively.$ O $ ${ \begin{array}{c|cc} C & \mathit { Cus\_ID } & \mathit { Location } \\ \hline s_1 & \mathit { C1 } & \mathit { Paderborn } \\ s_2 & \mathit { C2 } & \mathit { Sheffield } \\ s_3 & \mathit { C3 } & \mathit { Hanover } \end{array}\ \ \ \ \ \ \ \ \begin{array}{c|cccc} \mathit { O } & \mathit { Ord\_ID } & \mathit { Cus\_ID } & \mathit { Prod\_ID } & \mathit { Ship\_ID } \\ \hline t_1 & \mathit { O1 } & \mathit { C1 } & \mathit { P1 } & \mathit { S1 } \\ t_2 & \mathit { O2 } & \mathit { C2 } & \mathit { P2 } & \mathit { S2 } \\ t_3 & \mathit { O3 } & \mathit { C2 } & \mathit { P1 } & \mathit { S1 } \\ t_4 & \mathit { O5 } & \mathit { C1 } & \mathit { P1 } & \mathit { S4 } \end{array}} $ Here, Cus_ID, Ord_ID, Prod_ID and Ship_ID are the IDs of individual customers, orders, products and shipments, respectively. Let
be a set of DCs where$ D = \{{\rm{dc}}_1, {\rm{dc}}_2\} $ $ {\rm{dc}}_1 := \forall x_1, \dots , x_6 \neg (O(x_1, x_2, x_3, x_4) \land O(x_5, x_2, x_3, x_6) \land x_1 \neq x_5) $ and
$ \begin{split}{\rm{dc}}_2 :=& \forall x_1, \dots, x_9 \neg (O(x_1, x_2, x_3, x_4) \land O(x_5, x_6, x_7, x_4) \\&\land C(x_2, x_8) \land C(x_6, x_9) \land x_8 \neq x_9). \end{split}$ The DC
essentially says that no customer should have more than one order for the same product and$ {\rm{dc}}_1 $ requires that no orders to different locations can be transported in the same shipment.$ {\rm{dc}}_2 $ Both constraints are violated in the tables
and$ C $ . The conflicts in the DB include$ D $ . The respective SETAF$ \{t_1,t_4\},\{t_1,t_3,s_1,s_2\} $ is depicted in Fig. 4.$ {\cal{S}}_{\langle \{C, O\}, D \rangle} $ ◁
Figure 4.
SETAF $ {\cal{S}}_{\langle \{C, O\}, D \rangle} $ for Example 3.3. The attacker in each set-attack is depicted as a triangle of different color (for better presentation) and the attack is presented in the same color. For example, the red triangle and the arrow depict the attack $ (\{t_1,s_1,s_2\},t_3) $.
It is known that the repairs for
correspond precisely to the independent sets of its conflict hypergraph$ {\cal{D}} $ . Observe that the independent sets in$ {\cal{G}}_{\cal{D}} $ are exactly the naive extensions of$ {\cal{G}}_{\cal{D}} $ . Moreover, using the observations from Bienvenu & Bourgaux[13], Theorem 28, it is easy to see that every naive extension is also preferred as well as stable. Therefore, we have the following equivalence between the extensions and repairs. The equivalence regarding the stable and preferred semantics is a direct consequence of the results in Bienvenu & Bourgaux[13].$ {\cal{S}}_{\cal{D}} $ Theorem 3.4. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, D \rangle $ is a set of DCs and let$ D $ denote the SETAF generated by$ {\cal{S}}_{\cal{D}} $ . Then for every$ {\cal{D}} $ ,$ {\cal{P}}\subseteq {\cal{T}} $ iff$ {\cal{P}} \in \text{repairs}({\cal{D}}) $ for$ {\cal{P}}\in \sigma({\cal{S}}_{\cal{D}}) $ .$ \sigma \in \{\text{naive}, \text{stab}, \text{pref}\} $ Proof Given a repair
, then$ {\cal{P}}\subseteq {\cal{T}} $ for every$ {\cal{P}}\models d $ and hence there is no$ d\in D $ with$ C\in{\rm{Conf}}({\cal{D}}) $ . So, the set of arguments in$ C\subseteq {\cal{P}} $ is conflict-free since every attack in$ {\cal{P}} $ has the form$ R $ where$ (E\setminus\{t\},t) $ .$ E\cup \{t\} \in {\rm{Conf}}({\cal{D}}) $ The converse holds similarly. A naive extension
does not contain all the arguments in any attack$ P\subseteq A $ . Thus, for every conflict$ (E,t) $ , such that$ C\in {\rm{Conf}}({\cal{D}}) $ , we have that$ C=E\cup\{t\} $ and therefore$ C\not\subseteq P $ (seen as a subset of$ P $ ) is a repair for$ {\cal{T}} $ . Finally, the subset-maximality remains the same for both cases since each fact is seen as an argument and vice versa. This establishes the correctness of our theorem.$ {\cal{D}} $ □ It is worth remarking that the presence of DCs with a single database atom yields singleton conflicts which results in self-contradictory facts (or self-attacking arguments in the translation). However, such self-contradictory facts do not occur in any repair and can be removed using existing reasoning algorithms, as highlighted by Bienvenu & Bourgaux[13]. Therefore, a usual assumption is that every DC contains at least two database atoms. This has the effect that each conflict contains at least two arguments. Consequently, in the presence of DCs, every fact in a conflict belongs to at least one repair and no fact in any conflict belongs to every repair. This holds because for each conflict
, there is a repair containing facts in$ C\in{\rm{Conf}}({\cal{D}}) $ as well as another one containing$ C\setminus \{t\} $ . As a result, we have the following observation regarding the acceptability of facts with respect to$ t $ . Specifically, we can decide if a given fact$ {\cal{D}} $ is in some (or all) repairs, in polynomial time for a fixed set of DCs.$ s \in {\cal{T}} $ Remark 3.5 Let
be a set of DCs over the schema$ D $ . Then, for every constrained database$ \tau $ involving a database$ {\cal{D}} = \langle {\cal{T}},D \rangle $ over$ {\cal{T}} $ :$ \tau $ is true for every$ \exists {\text{-}}{\rm{REP}} $ and$ s\in{\cal{T}} $ is true iff$ \forall {\text{-}}{\rm{REP}} $ for any$ s\not\in C $ . Moreover, both problems are decidable in polynomial time in data complexity.$ C\in {\rm{Conf}}({{\cal{D}}}) $ 3.2. Simulating LTGDs via SETAFs
-
Let
be a constrained database with a collection$ {\cal{D}} =\langle {\cal{T}}, L\rangle $ of facts and a collection$ {\cal{T}} $ of LTGDs. We recall the semantics for LTGDs via variable assignments. For a set$ L $ of variables, an assignment of$ V $ into a database$ V $ is a mapping$ {\cal{T}} $ . For a relational atom$ h\colon V\rightarrow \text{dom}({\cal{T}}) $ with terms$ T({\boldsymbol{t}}) $ , we denote by$ {\boldsymbol{t}}=(t_1,\dots,t_k) $ the result of substituting every$ h(T({\boldsymbol{t}})) $ in$ t_i $ by$ T({\boldsymbol{t}}) $ , where we set$ h(t_i) $ when$ h(t_i)=t_i $ is a constant. In other words, an assignment maps a relational atom$ t_i $ to a candidate fact$ T({\boldsymbol{t}}) $ , which may or may not be present in the database$ h(T({\boldsymbol{t}})) $ . The notation extends to a conjunction of atoms by considering them as a set. Precisely, for a conjunction$ {\cal{T}} $ with$ \phi({\boldsymbol{x}}) :=\bigwedge_{1\leq i\leq n} T_i({\boldsymbol{x}}_i) $ and$ {\boldsymbol{x}}_i\subseteq {\boldsymbol{x}} $ , and an assignment$ T_i\in \tau $ , we define$ h\colon {\boldsymbol{x}}\rightarrow \text{dom}({\cal{T}}) $ . Recall that every LTGD$ h(\phi({\boldsymbol{x}}))=\{h(T_i({\boldsymbol{x}}_i))\mid 1\leq i\leq n\} $ has the form$ \ell\in L $ where$ \forall {\boldsymbol{x}} (T({\boldsymbol{x}}) \rightarrow \exists {\boldsymbol{y}} \psi({\boldsymbol{x}},{\boldsymbol{y}})) $ is a conjunction of relational atoms over variables$ \psi := \bigwedge_{1\leq i\leq n_\ell}\psi_i({\boldsymbol{z}}_i) $ using relation names$ {\boldsymbol{z}}_i \subseteq {\boldsymbol{x}}\cup{\boldsymbol{y}} $ . Then,$ \psi_i\in\tau $ if for each assignment$ {\cal{T}}\models \ell $ such that$ h $ , there exists an assignment$ h(T({\boldsymbol{x}}))\in {\cal{T}} $ such that$ h'\colon {\boldsymbol{x}}\cup\mathbf y\rightarrow \text{dom}({\cal{T}}) $ and$ h'\upharpoonright_{{\boldsymbol{x}}}=h\upharpoonright_{{\boldsymbol{x}}} $ , where$ h'(\psi({\boldsymbol{x}}, {\boldsymbol{y}})) \subseteq {\cal{T}} $ is the restriction of$ h\upharpoonright_{{\boldsymbol{x}}} $ on$ h $ . If$ {\boldsymbol{x}} $ is true and there indeed exists such an assignment$ h(T({\boldsymbol{x}}))\in {\cal{T}} $ then we say that the set of facts$ h' $ supports the fact$ h'(\psi({\boldsymbol{x}}, {\boldsymbol{y}})) $ for the LTGD$ h(T({\boldsymbol{x}})) $ . For such an LTGD$ \ell $ , we call$ \ell $ the source of$ T $ , denoted as$ \ell $ . For a$ \text{source}(\ell) $ -fact$ \text{source}(\ell) $ , we denote by$ s $ the collection of all the sets supporting$ {\boldsymbol{S}}_{\ell}({s}) $ for the LTGD$ s $ . It is worth remarking that, for a constrained database$ \ell $ and$ {\cal{D}}=\langle{\cal{T}},L\rangle $ ,$ \ell\in L $ if and only if$ {\cal{D}}\models \ell $ for each$ {\boldsymbol{S}}_{\ell}({s})\neq\emptyset $ -fact$ \text{source}(\ell) $ .$ s $ Interestingly, we can encode the sets supporting a fact by using SETAFs, as formalized next.
Definition 3.6 Let
be a constrained database including a database$ {\cal{D}} =\langle {\cal{T}},L \rangle $ and a collection$ {\cal{T}} $ of LTGDs. Then$ L $ is the following SETAF.$ {\cal{S}}_{\cal{D}} $ ●
,$ A := \{s \mid s\in {\cal{T}} \} \cup \{s_\ell \mid s{{\ is\ a }}\ \text{source}(\ell)-{\rm{fact\ for }}\ \ell\in L\} $ ●
.$ R := \{(s_\ell,s), (s_\ell,s_\ell) \mid s{{\ is\ a }}\ \text{source}(\ell)-{\rm{fact\ for }}\ \ell\in L \}\cup \{(S,s_\ell)\mid S\in {\boldsymbol{S}}_{\ell}({s}), \ell\in L\} $ Intuitively, for each
and {a$ \ell\in L $ -fact$ \text{source}(\ell) $ }, the attack$ s $ models that the LTGD$ (s_\ell,s) $ must be satisfied for the fact$ \ell\in L $ . Moreover, the self-attacks$ s $ enforce that the extensions only contain arguments corresponding to facts in the database. Then, each$ (s_\ell,s_\ell) $ attacks$ S\in {\boldsymbol{S}}_{\ell}({s}) $ and consequently, defends$ s_\ell $ against$ s $ . The whole idea captured in this translation is that for each$ s_\ell $ of the form$ \ell \in L $ where$ \forall {\boldsymbol{x}} (T({\boldsymbol{x}}) \rightarrow \exists {\boldsymbol{y}} \bigwedge_{1\leq i\leq n_\ell}\psi_i({\boldsymbol{z}}_i)) $ : a$ {\boldsymbol{z}}_i \subseteq {\boldsymbol{x}}\cup{\boldsymbol{y}} $ -fact$ T $ is in a repair$ s $ of$ \mathcal P $ if and only if there are$ {\cal{D}} $ -facts$ \psi_i $ for$ t_i $ , such that$ 1\leq i\leq n_\ell $ if and only if the set$ \{t_1,\dots,t_{n_\ell}\}\in {\boldsymbol{S}}_{\ell}({s}) $ attacks$ S=\{t_1,\dots,t_{n_\ell}\} $ in$ s_\ell $ if and only if the argument$ {\cal{S}}_{\cal{D}} $ is defended against$ s\in A $ in$ s_\ell $ .$ {\cal{S}}_{\cal{D}} $ Example 3.7. The database tables
,$ E $ and$ D $ contain data about employees, departments and projects, respectively, and are defined as follows:$ P $ $\begin{split}& \begin{array}{c|cc} E & \mathit { Emp\_ID } & \mathit { Dept\_ID } \\ \hline {s_1} & \mathit{E 1} & \mathit{D 1} \\ s_2 & \mathit{E 2} & \mathit{D 2} \\ s_3 & \mathit{E 3} & \mathit{D 3} \end{array}\ \ \ \ \ \ \ \ \begin{array}{c|cc} D & \mathit { Dept\_ID } & \mathit { Dept\_Name } \\ \hline t_1 & \mathit { D1 } & \mathit { Accounting } \\ t_2 & \mathit { D3 } & \mathit { Sales } \end{array}\\& \begin{array}{c|cc} P & \mathit { Prod\_ID } & \mathit { Dept\_ID } \\ \hline u_1 & \mathit { P1 } & \mathit { D1 } \\ u_2 & \mathit { P2 } & \mathit { D3 } \end{array}\end{split} $ Here, Emp_ID, Dept_ID and Prod_ID are the IDs of individual employees, departments and products, respectively. Let
be a set of LTGDs where$ L = \{{\rm{lav}}_1, {\rm{lav}}_2\} $ $ {\rm{lav}}_1 := \forall x_1, x_2 (E(x_1, x_2) \to \exists y, z (D(x_2, y) \land P(z, x_2))) $ and
$ {\rm{lav}}_2 := \forall x_1, x_2 (D(x_1, x_2) \to \exists y, z (E(y, x_1) \land P(z, x_1))). $ The constraint
essentially says that if an employee is in a department, then the department must exist and be associated with a project. The constraint$ {\rm{lav}}_1 $ says that each department has at least one employee and at least one project associated with it.$ {\rm{lav}}_2 $ In the tables
,$ E $ and$ D $ ,$ P $ is violated while$ {\rm{lav}}_1 $ is satisfied. The source of each TGD$ {\rm{lav}}_2 $ , and the supporting facts for$ \ell $ -fact$ \text{source}(\ell) $ are presented as follows:$ s $ ●
$ \text{source}({\rm{lav}}_1) = E, $ ●
$ \text{source}({\rm{lav}}_2) = D, $ ●
supports$ \{t_1,u_1\} $ for$ s_1 $ ,$ {\rm{lav}}_1 $ ●
does not have any supporter for$ s_2 $ $ {\rm{lav}}_1 $ ●
supports$ \{t_2,u_2\} $ for$ s_3 $ ,$ {\rm{lav}}_1 $ ●
supports$ \{s_1, u_1\} $ for$ t_1 $ ,$ {\rm{lav}}_2 $ ●
supports$ \{s_3, u_2\} $ for$ t_2 $ .$ {\rm{lav}}_2 $ The respective SETAF
is depicted in Fig. 5.$ {\cal{S}}_{\langle \{E, D, P\}, L \rangle} $ ◁
Figure 5.
SETAF $ {\cal{S}}_{\langle \{E, D, P\}, L \rangle} $ for Example 3.7. For brevity, we rename the LTGDs $ \{{\rm{lav}}_1,{\rm{lav}}_2\} $ to be $ \{1,2\} $. Moreover, the auxiliary arguments for $ \text{source}(1) $-facts $ s_i $ are renamed to $ s_{1i} $ and those for $ \text{source}(2) $-facts $ t_j $ to $ t_{2j} $.
Similar to the case of DCs, the repair checking problem under LTGDs is
-complete if the set$ {\bf{DP}} $ of ICs is considered as input (see Table 3 in Arming et al.[39]). Therefore, we consider a fixed set$ L $ of LTGDs as the complexity drops to P in this case. Then, for a constrained database$ L $ , the framework$ {\cal{D}}=\langle{\cal{T}},L \rangle $ can be constructed in polynomial time. An algorithm basically goes through every$ {\cal{S}}_{\cal{D}} $ in turn: for each$ \ell\in L $ -fact$ \text{source}(\ell) $ , it computes the set$ s $ in polynomial time since the size of each LTGD in$ {\boldsymbol{S}}_{\ell}({s}) $ is constant.$ L $ For a set
of LTGDs, a minimal violation of$ L $ is caused by a single$ \ell\in L $ -fact$ \text{source}(\ell) $ for which$ s $ . Since we only allow subset repairs (deleting facts), the only way to eliminate a violation is to remove such a fact$ {\boldsymbol{S}}_{\ell}({s})=\emptyset $ . However, this removal of facts may trigger other violations for facts, all of whose supporting sets contained some deleted facts. This triggers a chain reaction and the repair process iteratively removes any fact that has no remaining supporting set. Since the database is finite, this process eventually terminates (in the worst case, there are no facts remaining and$ s $ is the only repair). The remaining facts are exactly those that have at least one full support left, so no violations remain. The key observation is that this process always leads to the same final set of facts, no matter in which order we remove unsupported facts. Therefore, the final set of facts is consistent and subset-maximal. Observe that in some cases$ \emptyset $ might be the only repair for a database$ \emptyset $ involving LTGDs.$ {\cal{D}} $ Remark 3.8 A constrained database
involving a set$ {\cal{D}} = \langle {\cal{T}}, L \rangle $ of LTGDs admits a unique repair.$ L $ Now we prove that the repair of an instance
actually corresponds to the unique preferred extension of the resulting SETAF$ {\cal{D}} $ .$ {\cal{S}}_{\cal{D}} $ Theorem 3.9. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, L \rangle $ is a set of LTGDs and let$ L $ denote the SETAF generated by$ {\cal{S}}_{\cal{D}} $ . Then for$ {\cal{D}} $ ,$ {\cal{P}}\subseteq {\cal{T}} $ iff$ {\cal{P}} \in \text{repairs}({\cal{D}}) $ . Moreover,$ {\cal{P}}\in \text{pref}({\cal{S}}_{\cal{D}}) $ has exactly one preferred extension.$ {\cal{S}}_{\cal{D}} $ Proof We first prove the reverse direction. Let
be a preferred extension in$ P\subseteq A $ , then$ {\cal{S}}_{\cal{D}} $ must not contain an auxiliary argument$ P $ corresponding to any LTGD$ s_\ell $ since$ \ell\in L $ is conflict-free. This implies that$ P $ , which, together with the fact that$ P\subseteq {\cal{T}} $ is admissible (hence every$ P $ is defended against each$ s\in P $ ) and maximal under set inclusion, yields the proof of the claim.$ s_\ell\in A $ Conversely, let
denote a repair for$ {\cal{P}}\subseteq {\cal{T}} $ . Then$ {\cal{D}} = \langle {\cal{T}}, L \rangle $ is conflict-free in$ {\cal{P}} $ since each attack in$ {\cal{S}}_{\cal{D}} $ contains at least one argument among the auxiliary arguments ($ R $ ) which are not in$ s_\ell $ (as$ {\cal{P}} $ ). Moreover, for each$ {\cal{P}}\subseteq {\cal{T}} $ and$ s\in {\cal{P}} $ , there are$ \ell\in L $ , such that$ t_1,\dots,t_{n_\ell}\in {\cal{P}} $ . This implies that each$ \{s, t_1,\dots, t_{n_\ell}\}\models \ell $ is defended against the attack$ s\in {\cal{P}} $ since$ s_\ell\in A $ . Consequently,$ (\{t_1,\dots,t_{n_\ell}\}, s_\ell)\in R $ is admissible. To prove that$ {\cal{P}} $ is also preferred in$ {\cal{P}} $ , assume the contrary that there is an admissible$ {\cal{S}}_{\cal{D}} $ in$ {\cal{P}}'\supset {\cal{P}} $ . Since$ {\cal{S}}_{\cal{D}} $ is also conflict-free, using the same argument as for$ {\cal{P}}' $ we notice that$ {\cal{P}} $ . Now,$ {\cal{P}}'\subseteq {\cal{T}} $ being admissible (together with the claim in reverse direction) implies that$ {\cal{P}}' $ is a repair for$ {\cal{P}}' $ contradicting the fact that$ {\cal{D}} $ is a subset-maximal repair for$ {\cal{P}} $ . As a consequence,$ {\cal{D}} $ is preferred in$ {\cal{P}} $ .$ {\cal{S}}_{\cal{D}} $ This proves the correctness of the theorem. The uniqueness of the extension follows due to Remark 3.8.
□ Notice that a framework
may not have stable extensions for certain constrained databases$ {\cal{S}}_{\cal{D}} $ including databases$ {\cal{D}} $ and LTGDs$ {\cal{T}} $ . This holds because some arguments can neither be accepted in an extension (e.g., when$ L $ for some$ {\boldsymbol{S}}_{\ell}({s})=\emptyset $ -fact$ \text{source}(\ell) $ and$ s $ ), nor attacked by arguments in an extension (since arguments in$ \ell\in L $ only attack auxiliary arguments). Mahmood et al.[38] presented a pre-processing over the argumentation framework generated by a constrained database$ A $ involving IDs, which computes its unique preferred extension, which is also naive and stable. It is easy to observe that a similar pre-processing can be implemented for the case of LTGDs. This pre-processing also allows us to answer credulous and skeptical acceptance for a fact$ {\cal{D}} $ in polynomial time considering the data complexity.$ s\in{\cal{T}} $ A pre-processing algorithm for
. Observe that an undefended argument in a SETAF$ {\cal{S}}_{\cal{D}} $ cannot belong to any preferred extension of$ {\cal{S}}=(A,R) $ . The intuition behind pre-processing is to remove such arguments, which are not defended against some of their attacks in$ {\cal{S}} $ . This corresponds to (recursively) removing those facts$ {\cal{S}}_{\cal{D}} $ , for which there is$ s\in {\cal{T}} $ such that$ \ell\in L $ is a$ s $ -fact and$ \text{source}(\ell) $ . The pre-processing (denoted$ {\boldsymbol{S}}_{\ell}({s})=\emptyset $ ) applies the following procedure as long as possible.$ \text{PRE}({\cal{S}}_{\cal{D}}) $ For each$ * $ such that$ s_\ell\in A $ is not attacked by any$ s_\ell $ : remove$ S\subseteq A\setminus \{s_\ell\} $ ,$ s $ for each$ s_j $ , as well as each attack to and from$ j\in L $ and$ s $ .$ s_j $ We repeat this procedure until convergence. Once a fixed point has been reached, the remaining arguments in
are all defended. Interestingly, after the pre-processing, removing the arguments with self-attacks results in a unique naive extension, which is also stable and preferred. In fact, this naive extension corresponds to the unique repair of the instance$ A $ (see Remark 3.8). In the following, we also denote by$ {\cal{D}} $ the SETAF obtained after applying the pre-processing on$ \text{PRE}({\cal{S}}_{\cal{D}}) $ . Notice that$ {\cal{S}}_{\cal{D}} $ is basically an adaptation to the SETAFs of the previously presented procedure for AFs and originates from the well-known algorithm for finding a maximal satisfying subteam for inclusion logic formulas[28], Lem. 12.$ \text{PRE} $ Lemma 3.10. Let
be a fixed set of LTGDs,$ L $ be a constrained database, and$ {\cal{D}}=\langle{\cal{T}}, L\rangle $ denote the SETAF generated by$ {\cal{S}}_{\cal{D}} $ . Then$ {\cal{D}} $ can be computed from$ \text{PRE}({\cal{S}}_{\cal{D}}) $ in polynomial time. Moreover,$ {\cal{S}}_{\cal{D}} $ has a unique naive extension which is also stable and preferred.$ \text{PRE}({\cal{S}}_{\cal{D}}) $ Proof The procedure
removes recursively all the arguments corresponding to facts$ \text{PRE}({\cal{S}}_{\cal{D}}) $ such that$ s $ for some$ {\boldsymbol{S}}_{\ell}({s})=\emptyset $ and$ \ell\in L $ is a$ s $ -fact. Notice that$ \text{source}(\ell) $ can be computed for each$ {\boldsymbol{S}}_{\ell}({s}) $ and$ \ell\in L $ -fact$ \text{source}(\ell) $ in polynomial time for a fixed set$ s $ of LTGDs. Then,$ L $ stores in a data structure (such as a queue) all the arguments$ \text{PRE} $ for which$ s $ . Finally, each argument$ {\boldsymbol{S}}_{\ell}({s})=\emptyset $ in this queue can be processed turn by turn, adding possibly new arguments when$ s $ triggers the removal of certain arguments from$ \text{PRE} $ and hence from$ A $ for some$ {\boldsymbol{S}}_{\ell}({t}) $ . A fixed point is reached when every element in the queue has been processed, this gives the size of$ t\in A $ as the total number of iterations. Consequently,$ A $ runs in polynomial time in the size of$ \text{PRE} $ .$ {\cal{S}}_{\cal{D}} $ Let
denote the SETAF generated by the pre-processing. To prove the equivalence between extensions, notice that the set of arguments$ \text{PRE}({\cal{S}}_{\cal{D}}) = (A',R') $ without self-attacks in$ S $ forms a naive extension since$ A' $ is conflict-free and every argument in$ S $ contains self-attacks. Moreover,$ A'\setminus S $ is also admissible since$ S $ for every argument$ {\boldsymbol{S}}_{\ell}({s})\neq \emptyset $ corresponding to a$ s\in S $ -fact$ \text{source}(\ell) $ . Furthermore, since$ s $ only includes auxiliary arguments, those are all attacked by$ A'\setminus S $ and therefore$ S $ is stable. Finally,$ S $ is the only naive extension in the reduced AF since$ S $ is the maximal conflict-free in$ S $ and arguments in$ \text{PRE}({\cal{S}}_{\cal{D}}) $ contain self-attacks.$ A'\setminus S $ This establishes the correctness of the lemma together with Theorem 3.9.
□ As a consequence of Lemma 3.10, we can also determine
and$ \exists {\text{-}}{\rm{REP}} $ for each$ \forall {\text{-}}{\rm{REP}} $ , once the pre-processing has terminated, resulting in$ s\in {\cal{T}} $ .$ \text{PRE}({\cal{S}}_{\cal{D}}) $ Remark 3.11 Let
be a constrained database involving a set$ {\cal{D}}=\langle{\cal{T}},L\rangle $ of LTGDs and$ L $ denote the SETAF generated by$ {\cal{S}}_{\cal{D}} $ . Then,$ {\cal{D}} $ and$ \exists {\text{-}}{\rm{REP}} $ is true for every$ \forall {\text{-}}{\rm{REP}} $ iff$ s\in {\cal{T}} $ . As a consequence, both problems are decidable in polynomial time in data complexity.$ s\in \text{PRE}({\cal{S}}_{\cal{D}}) $ 3.3. Simulating DCs and LTGDs via SETAFs
-
Consider an instance
with a database$ {\cal{D}}= \langle {\cal{T}},B \rangle $ and a collection$ {\cal{T}} $ of DCs ($ B= D\cup L $ ) and LTGDs ($ D $ ). We first understand the role of applying pre-processing in the presence of both ICs. Removing those facts from$ L $ failing some LTGD reduces the number of arguments in the resulting SETAF without affecting the connection between extensions and repairs. The removed facts are limited to those that cannot belong to any repair since we are in the setting of subset-repairs. However, one still cannot directly answer$ {\cal{T}} $ or$ \exists {\text{-}}{\rm{REP}} $ (as done in Remark 3.11) for all facts$ \forall {\text{-}}{\rm{REP}} $ even after applying this pre-processing. Moreover, in the presence of both types of ICs, one may want to see the effect of the failure of LTGDs and DCs separately for certain facts. In other words, one can distinguish a fact violating an LTGD since it does not have a supporting fact in$ s\in{\cal{T}} $ from another fact violating an LTGD since all of its supporting facts also violate some DCs. In this case, the pre-processing allows to distinguish these facts even if they are not removed from the resulting SETAF.$ {\cal{T}} $ In the following, we do not apply pre-processing and instead consider all the arguments for facts in the database. The framework
generated by$ {\cal{S}}_{\cal{D}} := (A,R_{{\rm{D}}}\cup R_{{\rm{L}}}) $ is specified as below.$ {\cal{D}} $ Definition 3.12 Let
be a constrained database including a database$ {\cal{D}} = \langle {\cal{T}}, B\rangle $ and a collection$ {\cal{T}} $ of DCs$ B=D\cup L $ and LTGDs$ D $ . Then, we construct the SETAF$ L $ as follows.$ {\cal{S}}_{\cal{D}} = (A,R_D\cup R_L) $ ●
,$ A := \{s \mid s\in {\cal{T}} \} \cup \{s_\ell \mid s{{\ is\ a }}\ \text{source}(\ell)-{\rm{fact\ for }}\ \ell\in L\} $ ●
,$ R_D := \{(C\setminus\{t\}, t) \mid C\in{\rm{Conf}}({\cal{D}}), t\in C\} $ ●
.$ R_L := \{(s_\ell,s), (s_\ell,s_\ell) \mid s{{\ is\ a }}\ \text{source}(\ell)-{\rm{fact\ for }}\ \ell\in L \}\cup \{(S,s_\ell) \mid S \in {\boldsymbol{S}}_{\ell}({s}) \ {\rm{for }}\ \ell\in L\} $ As before, we call
the SETAF generated by$ {\cal{S}}_{\cal{D}} $ .$ {\cal{D}} $ A consequence of allowing both types of ICs (DCs and LTGDs) is that the preferred and naive extensions do not coincide in general. Moreover, both
and$ \exists {\text{-}}{\rm{REP}} $ are non-trivial and distinct (cf. Remarks 3.5 and 3.11). Furthermore, in the presence of both types of ICs, the repairs correspond to somewhat costly (that is, preferred) SETAF-semantics.$ \forall {\text{-}}{\rm{REP}} $ Theorem 3.13. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, B \rangle $ includes DCs and LTGDs. Further, let$ B $ denote the SETAF generated by$ {\cal{S}}_{\cal{D}} $ . Then for every subset$ {\cal{D}} $ ,$ {\cal{P}}\subseteq {\cal{T}} $ iff$ {\cal{P}} \in \text{repairs}({\cal{D}}) $ .$ {\cal{P}} \in \text{pref}({\cal{S}}_{\cal{D}}) $ Proof The correctness follows from the proofs of Theorems 3.4 and 3.9. The conflict-freeness and admissibility of
implies that each DC and LTGD in$ {\cal{P}} $ , respectively, is true in$ B $ . The converse follows the same line of argument. Finally, the maximality of repairs in$ {\cal{P}} $ corresponds to the maximality of extensions in the resulting SETAF$ {\cal{D}} $ .$ {\cal{S}}_{\cal{D}} $ □ Next, we establish that allowing DCs and LTGDs renders the data complexity for repair existence (
), as well as credulous ($ {\rm{REP}} $ ) and skeptical ($ \exists {\text{-}}{\rm{REP}} $ ) reasoning for facts, same as, respectively, the existence, credulous, and skeptical reasoning for preferred semantics for AFs. These lower bounds are proven for the case of FDs and IDs (see Theorems 4.13 and 4.16). Here, we prove that the upper bounds hold even if we extend FDs to DCs and IDs to LTGDs, respectively. However, the set of ICs has to be fixed.$ \forall {\text{-}}{\rm{REP}} $ Theorem 3.14. The problems
and$ {\rm{REP}} $ are both NP-complete in the data complexity for DCs and LTGDs.$ \exists {\text{-}}{\rm{REP}} $ Proof We prove that
and$ {\rm{REP}}_{{\rm{B}}} $ are both in$ \exists {\text{-}}{\rm{REP}}_{{\rm{B}}} $ for any fixed set$ {\bf{NP}} $ of DCs and LTGDs. Let$ B $ be a constrained database involving a database$ {\cal{D}} = \langle {\cal{T}}, B \rangle $ . For membership, one needs to guess a repair for$ {\cal{T}} $ that is non-empty, respectively contains$ {\cal{D}} $ . The verification can be done in P since$ s $ is a fixed set[39]. Notice that we do not need to check the maximality, since if there is a non-empty subset of$ B $ satisfying every IC in$ {\cal{T}} $ (resp., a subset containing$ B $ ) then there is also a non-empty repair for$ s $ (containing$ {\cal{D}} $ ).$ s $ Hardness follows from the case of FDs and IDs proved in Theorem 4.13. To be precise, we construct a fixed set
(resp.,$ B $ ) of FDs and IDs for which the problem$ B' $ ($ {\rm{REP}}_{{\rm{B}}} $ ) is$ \exists {\text{-}}{\rm{REP}}_{{{\rm{B}}}'} $ -hard.$ {\bf{NP}} $ □ Theorem 3.15. The data complexity of
is$ \forall {\text{-}}{\rm{REP}} $ -complete for DCs and LTGDs.$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ Proof For membership, we prove that
is in$ \forall {\text{-}}{\rm{REP}}_{{\rm{B}}} $ for any fixed set$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ of DCs and LTGDs. To this aim, we present the following$ B $ procedure for the complement of$ {\boldsymbol{\Sigma}}_2^{\rm{P}} $ . Let$ \forall {\text{-}}{\rm{REP}}_{{\rm{B}}} $ be a constrained database involving a database$ {\cal{D}} = \langle {\cal{T}}, B \rangle $ . One can guess a set$ {\cal{T}} $ of facts in$ {\cal{P}} $ satisfying each IC in$ {\cal{T}} $ as a counter-example for$ B $ , that is,$ s $ and$ s\not\in {\cal{P}} $ is a (candidate) repair for$ {\cal{P}} $ , which can be decided in P since$ {\cal{D}} $ is fixed[39]. However, one has to use oracle calls to determine whether$ B $ is a repair (hence maximal). Then,$ {\cal{P}} $ is true for$ \forall {\text{-}}{\rm{REP}} $ if there exists no$ s $ such that (i)$ {\cal{P}}\subseteq {\cal{T}} $ satisfies each IC in$ {\cal{P}} $ , (ii)$ B $ , and (iii)$ s\not\in {\cal{P}} $ is a repair. This gives the stated upper bound of$ {\cal{P}} $ .$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ For hardness, we prove that there exists a set
of DCs and LTGDs such that the problem$ B $ is$ \forall {\text{-}}{\rm{REP}}_{{\rm{B}}} $ -hard. We prove this claim for the case of FDs and IDs in Theorem 4.16.$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ □ We conclude this section by noting that the combined complexity of
,$ {\rm{REP}} $ , and$ \exists {\text{-}}{\rm{REP}} $ remains open for now, although the hardness transfer from the data complexity.$ \forall {\text{-}}{\rm{REP}} $ -
In this section, we consider FDs and IDs, which are restricted classes of ICs inside DCs and LTGDs, respectively. The two sub-cases are interesting due to the fact that one only requires binary conflicts/supports. As a result, the classical Dung's AFs with binary attacks suffice for encoding repairs into extensions.
Following the same theme as in the section "Simulating DCs and LTGDs via SETAFs", the first two subsections translate instances containing only one type of ICs to AFs. Then, we combine both FDs and IDs in the third subsection. As before, we adopt the construction for FDs from Bienvenu & Bourgaux[13], but without fact priorities, thus resulting in the need for a weaker AF-semantics to capture repairs.
Having established that both FDs and IDs can be modeled in AFs via binary attacks, the section "The role of self-attacking arguments" generalizes this approach by allowing both types of dependencies. The primary result of this section is noteworthy: it demonstrates that the integrity constraints can be restricted from (1) DCs to FDs and (2) LTGDs to IDs, while the corresponding encoding into argumentation frameworks preserves the exact semantics, modulo the transition from SETAFs to AFs.
4.1. Simulating FDs via AFs
-
We transform an instance
with database$ {\cal{D}} = \langle {\cal{T}},D \rangle $ and a collection$ {\cal{T}} $ of FDs to an AF$ D $ . In the case of FDs, each conflict involves two facts failing some FD$ {\cal{F}}_{\cal{D}} $ . As a result, this conflict can be modeled in an AF by drawing a bi-directional attack between the two corresponding arguments. For this reason, we adhere to AFs rather than SETAFs. Recall that each FD is defined over a single relation$ d\in D $ in the schema of$ T $ .$ {\cal{D}} $ Definition 4.1 Let
be a constrained database including a database$ {\cal{D}} =\langle {\cal{T}}, D\rangle $ and a collection$ {\cal{T}} $ of FDs. Then,$ D $ denotes the following AF.$ {\cal{F}}_{{\cal{D}}} $ ●
, that is, each$ A := {\cal{T}} $ is seen as an argument,$ s\in {\cal{T}} $ ●
.$ R := \{(s,t),(t,s) \mid s,t \in {\cal{T}} \ {\rm{and }}\ \{s,t\}\not\models d {{\ for\ some}}\ d \in D\} $ We call
the argumentation framework generated by$ {\cal{F}}_{\cal{D}} $ and call$ {\cal{D}} $ the conflict graph for$ R $ .$ {\cal{D}} $ Note that, for a given constrained database
, the framework$ {\cal{D}} $ can be generated in polynomial time. The attack relation$ {\cal{F}}_{\cal{D}} $ is constructed for each$ R $ over$ d\in D $ in the schema of$ T $ by taking each pair$ {\cal{D}} $ of$ s,t $ -facts in turn and checking whether$ T $ or not. Moreover, the set$ \{s,t\}\models d $ of FDs does not have to be fixed, as in the case of DCs.$ D $ Example 4.2 Consider
with database$ {\cal{D}} = \langle T,D \rangle $ as depicted inside table in Fig. 6 and FDs$ T=\{s,t,u,v\} $ ,$ \{\text{dep}({{Emp\_ID}}; {{Dept}}) $ over$ \text{dep}({{Sup\_ID}}; {{Building}})\} $ . Informally, each employee is associated with a unique department, and employees supervised by the same supervisor work in the same building. Observe that,$ T $ ,$ \{s,t\}\not\models \text{dep}({{Emp\_ID}}; {{Dept}}) $ , and$ \{u,v\}\not\models \text{dep}({{Emp\_ID}}; {{Dept}}) $ . The resulting AF$ \{t,v\}\not\models \text{dep}({{Sup\_ID}}; {{Building}}) $ is depicted on the right side of Fig. 6. The preferred (as well as naive and stable) extensions of$ {\cal{F}}_{\cal{D}} $ include$ {\cal{F}}_{\cal{D}} $ and$ \{s,v\}, \{t,u\} $ . Clearly, these three are the only repairs for$ \{s,u\} $ .$ {\cal{D}} $ ◁ It is easy to observe that any subset
that satisfies each$ {\cal{P}} \subseteq {\cal{T}} $ contains precisely those facts in$ d \in D $ that are not pairwise conflicting. As a result, such subsets correspond to the naive extensions (maximal conflict-free sets) of$ {\cal{T}} $ . Moreover, since the attack relation in$ {\cal{F}}_{\cal{D}} $ is symmetric, i.e.,$ {\cal{F}}_{\cal{D}} $ iff$ (s,t)\in R $ , the preferred, stable and naive extensions coincide[41], Prop. 4 & 5.$ (t,s) \in R $ Observe that every FD is also a DC and hence the AF
coincides with the SETAF$ {\cal{F}}_{\cal{D}} $ for the constrained database$ {\cal{S}}_{\cal{F}} $ . As a consequence, we have the following corollary due to Theorem 3.4. In particular, each conflict set$ {\cal{D}} $ (see proof of Theorem 3.4) has size two for FDs.$ C $ Corollary 4.3. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, D \rangle $ is a set of FDs and let$ D $ denote the argumentation framework generated by$ {\cal{F}}_{\cal{D}} $ . Then for every subset$ {\cal{D}} $ ,$ {\cal{P}}\subseteq {\cal{T}} $ iff$ {\cal{P}} \in \text{repairs}({\cal{D}}) $ for$ {\cal{P}}\in \sigma({\cal{F}}_{\cal{D}}) $ .$ \sigma \in \{\text{naive}, \text{stab}, \text{pref}\} $ Corollary 4.3 reproves that a subset-repair for
can be computed in polynomial time[40]. Moreover, similar to the case of DCs, we can decide if a given fact$ {\cal{D}} $ is in some (or all) repairs, in polynomial time. In fact, it follows from the basic properties of FDs that$ s\in {\cal{T}} $ is true for every$ \exists {\text{-}}{\rm{REP}} $ , and$ s\in {\cal{T}} $ is true for a fact$ \forall {\text{-}}{\rm{REP}} $ iff$ s\in {\cal{T}} $ for each$ \{s,t\} \models d $ and$ t\in {\cal{T}} $ . Furthermore, the latter problem can be decided in polynomial time for an input$ d\in D $ where the set$ {\cal{D}} $ of FDs does not have to be fixed (see Remark 3.5).$ D $ We conclude this section by observing that adding a size restriction on repairs renders the
problem$ {\rm{REP}} $ -hard. Observe that the hardness follows due to a one-to-one correspondence between repairs and maximal independent sets of the conflict graph[5]. However, we strengthen this result and note that the hardness already holds for propositional databases involving a single relation, that is, for a database$ {\bf{NP}} $ with$ T $ . The following result was proven in the context of team-semantics and maximal satisfying subteams for propositional dependence logic.$ \text{dom}(T)=\{0,1\} $ Proposition 4.4. Mahmood[29], Theorem 3.32. There is a constrained database
including a propositional database$ {\cal{D}} $ and FDs$ T $ , such that given$ D $ , the problem to decide whether there is a repair$ k\in \mathbb N $ for$ P\subseteq T $ such that$ {\cal{D}} $ is$ |P|\geq k $ -complete.$ {\bf{NP}} $ 4.2. Simulating IDs via AFs
-
Let
be a constrained database with a database$ {\cal{D}} = \langle {\cal{T}},I\rangle $ and collection$ {\cal{T}} $ of IDs. Similar to the case of LTGDs, for an ID$ I $ (say,$ i\in I $ ), we call$ i := T[{\boldsymbol{x}}]\subseteq T'[{\boldsymbol{y}}] $ the source of$ T $ . Moreover, we call$ i $ the target of$ T' $ . For$ i $ and a$ i \in I $ -fact$ \text{source}(i) $ , let$ s $ be$ t $ -fact such that$ \text{target}(i) $ . Then we say that$ \{s,t\}\models i $ supports$ t $ for the ID$ s $ , and$ i\in I $ denotes the set of all such supporting facts for$ {\boldsymbol{S}}_{i}({s}) $ and an ID$ s $ . Notice that for each$ i $ and$ i\in I $ -fact$ \text{source}(i) $ , we have that$ s $ . Thus, the elements in$ {\boldsymbol{S}}_{i}({s})\subseteq \text{target}(i) $ are facts instead of sets of facts as in the case of LTGDs. Clearly,$ {\boldsymbol{S}}_{i}({s}) $ if and only if$ {\cal{D}}\models i $ for each$ {\boldsymbol{S}}_{i}({s})\neq\emptyset $ -fact$ \text{source}(i) $ . As for LTGDs, we create auxiliary argument$ s $ for each$ s_i $ -fact$ \text{source}(i) $ , which can be attacked by arguments corresponding to$ s $ -facts in$ \text{target}(i) $ . In the following, we formalize this notion and simulate the semantics for IDs via AFs.$ {\boldsymbol{S}}_{i}({s}) $ Definition 4.5 Let
be a constrained database including a database$ {\cal{D}} =\langle {\cal{T}},I \rangle $ and a collection$ {\cal{T}} $ of IDs. Then$ I $ is the following AF.$ {\cal{F}}_{\cal{D}} $ ●
,$ A := {\cal{T}} \cup \{s_i \mid s {{\ is\ a }}\ \text{source}(i)-{\rm{fact\ for }}\ i\in I\} $ ●
.$ R := \{(s_i,s), (s_i,s_i) \mid s {{\ is\ a }}\ \text{source}(i)-{\rm{fact\ for }}\ i\in I \} \cup \{(t,s_i)\mid t\in {\boldsymbol{S}}_{i}({s}) \ {\rm{for }}\ i\in I\} $ The intuition behind our encoding remains the same as for the case of LTGDs. That is, the attack
models that the ID$ (s_i,s) $ must be satisfied for the$ i\in I $ -fact$ \text{source}(i) $ and the self-attacks$ s $ enforce extensions to only contain arguments corresponding to facts. However, we only need attacks between arguments (instead of attacks from sets of arguments) as$ (s_i,s_i) $ for each$ {\boldsymbol{S}}_{i}({s})\subseteq \text{target}(i) $ and$ i\in I $ -fact$ \text{source}(i) $ .$ s $ Example 4.6 Consider
with database$ {\cal{D}} = \langle T,I \rangle $ and IDs$ T=\{s,t,u,v\} $ . For brevity, we denote IDs by$ I := \{{{Sup\_ID}\subseteq {Emp\_ID}}, {{Covers\_For}\subseteq {Dept}}\} $ . The database and the supporting facts$ I= \{1,2\} $ for each$ {\boldsymbol{S}}{i}{w} $ are depicted in the table inside Fig. 7. Informally, a supervisor is also an employee, and each employee is assigned a department to cover if that department is short on employees. For example,$ i\in I, w\in T $ ,$ s({Sup\_ID})=t({Emp\_ID}) $ , and therefore$ s({Covers\_For})=t({Dept})= u({Dept}) $ ,$ {\boldsymbol{S}}_{1}({s})=\{t\} $ . Then we have the AF$ {\boldsymbol{S}}_{2}({s})=\{t,u\} $ as depicted in Fig. 7. The AF$ {\cal{F}}_{\cal{D}} $ has a unique preferred extension, given by$ {\cal{F}}_{\cal{D}} $ . Clearly, this is also the only repair for$ \{s,t\} $ .$ {\cal{D}} $ ◁
Figure 7.
The AF $ {\cal{F}}_{\cal{I}} $ modelling $ {\cal{I}} $ in Example 4.6: the red self-loops together with blue arcs depict the attacks for each fact $ w\in T $ due to IDs $ i\in I $ and the black arcs model the attacks due to the support set $ {\boldsymbol{S}}_i(w) $.
It is worth mentioning that
constitutes a naive extension for$ \{s,t,u,v\} $ in Example 4.6, although this is not a repair for$ {\cal{F}}_{\cal{D}} $ . Clearly, the semantics for IDs in$ {\cal{D}} $ requires admissibility (defending against attacking arguments).$ {\cal{F}}_{\cal{D}} $ Similar to the case of FDs, we observe that every ID is also an LTGD and hence the AF
coincides with the SETAF$ {\cal{F}}_{\cal{D}} $ for the constrained database$ {\cal{S}}_{\cal{D}} $ . As a consequence, the results for LTGDs transfer to IDs, modulo a translation from SETAFs to AFs. In particular, this allows us to apply Theorem 3.9, which establishes the following claim.$ {\cal{D}} $ Corollary 4.7. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, I \rangle $ is a set of IDs and let$ I $ denote the argumentation framework generated by$ {\cal{F}}_{\cal{D}} $ . Then for$ {\cal{D}} $ ,$ {\cal{P}}\subseteq {\cal{T}} $ iff$ {\cal{P}} \in \text{repairs}({\cal{D}}) $ . Moreover,$ {\cal{P}}\in \text{pref}({\cal{F}}_{\cal{D}}) $ has exactly one preferred extension.$ {\cal{F}}_{\cal{D}} $ The observation for LTGDs that some frameworks may not have any stable extension also applies to the special case of IDs and their corresponding AFs. As before, this holds because some arguments can neither be accepted in an extension nor attacked by arguments in an extension. The argument corresponding to the fact
in Example 4.6 depicts such an argument. Regarding the pre-processing, we still obtain the unique preferred extension, which is also naive and stable. Importantly, the set$ v $ of IDs does not have to be fixed to require the polynomial-time pre-processing. Following Remark 3.11,$ I $ and$ \exists {\text{-}}{\rm{REP}} $ is true for every$ \forall {\text{-}}{\rm{REP}} $ such that$ s\in {\cal{T}} $ .$ s\in \text{PRE}({\cal{F}}_{\cal{D}}) $ Example 4.8 (Continued) Reconsider the constrained database
from Example 4.6. Observe that the argument$ {\cal{D}}= \langle T, I\rangle $ is not defended against$ v $ and therefore cannot be in a repair. The pre-processing removes$ v_2 $ and all the edges to/from arguments in this set. This has the consequence that all the arguments which are only defended by$ \{v,v_1,v_2\} $ are no longer defended (e.g.,$ v $ ). Consequently, the arguments$ u $ have to be removed as well. After repeating the same process for$ \{u,u_1,u_2\} $ , we notice that no further argument needs to be removed. Hence, the set$ u $ yields a repair for$ \{s,t\} $ as well as a$ {\cal{D}} $ -extension in the reduced AF for$ \sigma $ .$ \sigma\in\{\text{naive},\text{stab},\text{pref}\} $ ◁ Our construction of AFs for IDs relies on self-attacking arguments. However, these self-attacks are restricted to only auxiliary arguments and allow us to avoid taking these arguments in any extension. This results in obtaining a precise connection between repairs of a DB and extensions of the resulting AF. Without self-attacking arguments, one gets extensions that may contain auxiliary arguments, and thus, a precise connection between repairs and extensions might be lost. This is further highlighted in the following example.
Example 4.9 Consider a single binary relation
in the schema, a constrained database$ T(x,y) $ with database$ {\cal{D}} = \langle T, I\rangle $ and a single ID$ T=\{s, t, u, v\} $ . The database table, as well as its resulting AF$ T[x] \subseteq T[y] $ (without self-attacks for auxiliary arguments), is depicted in Fig. 8. Observe that$ {\cal{F}}_{\cal{D}} $ admits the following four preferred extensions:$ {\cal{F}}_{\cal{D}} $ . However, there is a unique repair for$ \{\{s,t, u_1, v\}, \{s,t, u_1, v_1\}, \{s_1,t_1, u_1, v\}, \{s_1,t_1, u_1, v_1\}\} $ given as$ {\cal{D}} $ .$ \{s, t, v\} $
Figure 8.
Argumentation framework without self-attacks for modelling IDs in Example 4.9. The auxiliary arguments are highlighted in red for convenience.
Toward the end of our paper, in the next section, we will discuss how and whether we can model IDs via another translation that avoids self-attacking arguments.
4.3. Simulating FDs and IDs via AFs
-
Consider an instance
of a database$ {\cal{D}} = \langle {\cal{T}}, B\rangle $ and a collection$ {\cal{T}} $ of FDs$ B = D\cup I $ and IDs$ D $ . We construct the AF$ I $ as follows.$ {\cal{F}}_{\cal{D}}=(A,R_{\rm{D}}\cup R_{\rm{I}}) $ ●
,$ A := \{s \mid s\in {\cal{T}} \} \cup \{s_i \mid s {\rm{\ is\ a }}\ \text{source}(i)-{\rm{fact\ for }}\ i\in I\} $ ●
,$ R_{\rm{D}} := \{(s,t),(t,s) \mid s,t \in {\cal{T}} \ {\rm{and }}\ \{s,t\}\not\models d {\rm{\ for\ some}}\ d \in D\} $ ●
.$ R_{{\rm{I}}} := \{(s_i,s), (s_i,s_i) \mid s {\rm{\ is\ a }}\ \text{source}(i)-{\rm{fact\ for }}\ i\in I \}\cup \{(t,s_i)\mid t\in {\boldsymbol{S}}_{i}({s}) \ {\rm{for }}\ i\in I\} $ As before, one may apply the pre-processing as a first step, thereby removing those facts from
failing some$ {\cal{T}} $ . However, the discussion regarding the case of LTGDs still applies for IDs. The following example illustrates that even if we apply pre-processing, some facts may not be accepted in combination with each other due to the presence of FDs.$ i\in I $ Example 4.10 Consider
with database$ {\cal{D}} = \langle T,B \rangle $ and ICs$ T=\{s,t,u\} $ where$ B= D\cup I $ and$ D= \{\text{dep}({{S up\_ID}}; {{Building}})\} $ . Moreover, the database$ I=\{{{Covers\_For}\subseteq {{Dept}}}\} $ and the support$ T $ for each$ {\boldsymbol{S}}_{{{Covers\_For}}\subseteq{{{Dept}}}}({w}) $ is depicted in the table inside Fig. 9. Then,$ w\in T $ , and$ \{s,t\}\not\models \text{dep}({{S up\_ID}}; {{Building}}) $ $ \{t,u\}\not\models \text{dep}({{S up\_ID}}; $ . The resulting AF$ {{Building}})$ is shown in Fig. 9, where the edges due to the IDs are depicted in red and blue. The only preferred extension for$ {\cal{F}}_{\cal{D}} $ is$ {\cal{F}}_{\cal{D}} $ . Also, the only repair for$ \{t\} $ is$ {\cal{D}} $ . Further, although$ \{t\} $ is preferred for$ \{s,u\} $ where$ {\cal{F}}_{{\cal{D}}^{\prime}} $ (ignoring red and blue arcs), and$ {\cal{D}}' =\langle T,D\rangle $ is preferred for$ \{s,t, u\} $ where$ {\cal{F}}_{{\cal{D}}^{"}} $ (ignoring black arcs), none of them is preferred for$ {\cal{D}}" =\langle T,I\rangle $ .$ {\cal{F}}_{\cal{D}} $ ◁
Figure 9.
Argumentation framework for modelling dependencies in Example 4.10. Black arcs depict conflicts due to functional, and blue ones due to inclusion dependency.
Similar to their expressive counterparts, allowing both types of ICs (FDs and IDs) has the effect that the preferred and naive extensions do not coincide in general. Moreover, the repairs correspond to preferred semantics for AFs.
Example 4.11 (Cont.) Reconsider the constrained database
from Example 4.10. Then,$ {\cal{D}} $ is a naive extension for$ \{s,u\} $ but not preferred. Moreover,$ {\cal{F}}_{\cal{D}} $ is the only fact for which$ t $ and$ \exists {\text{-}}{\rm{REP}} $ is true.$ \forall {\text{-}}{\rm{REP}} $ ◁ Corollary 4.12. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, B \rangle $ includes FDs and IDs. Further, let$ B $ denote the argumentation framework generated by$ {\cal{F}}_{\cal{D}} $ . Then for every subset$ {\cal{D}} $ ,$ {\cal{P}}\subseteq {\cal{T}} $ iff$ {\cal{P}} \in \text{repairs}({\cal{D}}) $ .$ {\cal{P}} \in \text{pref}({\cal{F}}_{\cal{D}}) $ Next, we establish the data and combined complexity results for
and$ {\rm{REP}}, \exists {\text{-}}{\rm{REP}} $ . Observe that a fixed collection of integrity constraints suffices for establishing the hardness results (see Table 1). Whereas, the membership in each case also applies to the case when the set of constraints is given as input (hence not fixed).$ \forall {\text{-}}{\rm{REP}} $ Theorem 4.13. The problems
and$ {\rm{REP}} $ are in$ \exists {\text{-}}{\rm{REP}} $ for constraints that consist of FDs and IDs. Moreover, there exists a set$ {\bf{NP}} $ of FDs and IDs such that the problems$ B $ and$ {\rm{REP}}_{{\rm{B}}} $ are both NP-hard.$ \exists {\text{-}}{\rm{REP}}_{{\rm{B}}} $ Proof The membership follows analogous to the proof of Theorem 3.14 in both cases. Let
be a constrained database where$ {\cal{D}} = \langle {\cal{T}}, B \rangle $ consists of FDs and IDs. Further, let$ B $ be a fact. Observe that for constraints involving FDs and IDs, the verification that a guessed set of facts satisfies$ s\in {\cal{T}} $ can be performed in polynomial time given$ B $ as input. Therefore, the$ {\cal{D}} $ -membership applies to$ {\bf{NP}} $ and$ {\rm{REP}} $ .$ \exists {\text{-}}{\rm{REP}} $ For hardness, we reduce from
to$ {\rm{SAT}} $ and$ \exists {\text{-}}{\rm{REP}}_{{\rm{B}}} $ simultaneously for a fixed set$ {\rm{REP}}_{{\rm{B}}} $ of constraints. Let$ B $ be a propositional formula in conjunctive normal form over propositions$ \varphi := \{c_i\mid {i\leq m}\} $ . We construct a database with two relations (We find it convenient to write explicit attribute names for each relation.): (i) a$ X= \{p_1,\ldots, p_n\} $ -ary relation$ 4 $ , and (ii) a binary relation$ F(t_0,u_0,t_1,u_1) $ . Intuitively,$ C(t_2,u_2) $ encodes the positive and negative participation of propositions in the clauses of$ F $ . Precisely, a fact$ \varphi $ encodes that the proposition$ F(x,v,c_i,{\rm{sat}}) $ appears positively in clause$ x $ when$ c_i $ , and negatively when$ v=1 $ . The value "sat" appears in each fact to enforce a non-empty set of facts in a repair. The relation$ v=0 $ is used to encode the set of clauses. With the help of IDs, we aim to enforce that if any$ C $ -fact belong to a repair, then all of the$ C $ -facts (a "chain") must belong to such a repair, which in turn forces (via further IDs) a repair of$ C $ to include$ {\cal{T}} $ -facts in such a way that their corresponding literals satisfy every clause.$ F $ Formally, we will define
and$ F $ such that$ G $ and$ \text{dom}(F)\subseteq\{c_i \mid i\leq m\}\cup\{p_1,\ldots, p_n\}\cup\{0,1,{\rm{sat}}\} $ . Our database consists of the following facts:$ \text{dom}(C)=\{c_i \mid i\leq m\}\cup\{{\rm{sat}}\} $ $ \begin{aligned} {\cal{T}} = \quad & \{F(x,1,c_i,{\rm{sat}}) \mid x \in c_i, c_i\in\varphi\}\cup \{F(x,0,c_i,{\rm{sat}}) \mid \neg x \in c_i, c_i\in\varphi\} \\ & \cup \{F({\rm{sat}}, {\rm{sat}}, {\rm{sat}}, {\rm{sat}})\} \cup \{C({\rm{sat}}, c_1), C(c_m, {\rm{sat}})\} \\ & \cup \{C(c_i, c_{i+1}) \mid 1\leq i \lt m\}. \end{aligned} $ As ICs, we consider a collection
of FDs and IDs over the schema$ B $ using$ \{F,C\} $ as the set of attributes (Recall that our notation for FDs and IDs uses attributes as names for the corresponding argument positions of the relation (here$ V := \{t_j,u_j \mid 0\leq j \leq 2\} $ and$ F(t_0,u_0,t_1,u_1) $ )). Precisely, we let$ C(t_2,u_2) $ $ B= \{\text{dep}({t_0};{u_0})\} \cup \{F[u_1]\subseteq C[u_2], C[u_2]\subseteq C[t_2], C[t_2]\subseteq F[t_1], F[u_1]\subseteq F[t_1]\}. $ The FD
over$ \text{dep}({t_0};{u_0}) $ ensures that each proposition (corresponding to facts in a repair) takes at most one value in$ F $ . The IDs in$ \{0,1\} $ ensure that each clause$ B $ is satisfied by modeling the following intuition. (I) The ID$ c_i\in\varphi $ , together with a dummy fact$ F[u_1]\subseteq C[u_2] $ (referred to as$ F({\rm{sat}}, {\rm{sat}}, {\rm{sat}}, {\rm{sat}}) $ ), encodes that any repair for$ s_d $ containing$ {\cal{T}} $ triggers a non-empty subset of$ s_d $ -facts in a repair. (II) The ID$ C $ triggers a chain of$ C[u_2]\subseteq C[t_2] $ -facts in a repair and thus enforces that either$ C $ , or all$ \emptyset $ -facts are considered in a repair. (III) The ID$ C $ encodes that all clauses must be satisfied if a repair contains any$ C[t_2]\subseteq F[t_1] $ -fact. Moreover, (IV) the ID$ C $ is used in the reduction for$ F[u_1]\subseteq F[t_1] $ to enforce that a valid repair must contain the dummy fact$ {\rm{REP}}_{{\rm{B}}} $ . Notice that the collection$ s_d $ does not depend on the formula$ B $ , hence it is fixed.$ \varphi $ We next highlight some observations before delving into the correctness proof. Clearly,
is inconsistent due to the presence of at least one pair of facts$ {\cal{D}} $ and the FD$ F(x,1,c_i,{\rm{sat}}), F(x,0,c_j,{\rm{sat}}) $ (based on the fact that at least one variable$ \text{dep}({t_0};{u_0}) $ appears positively in one clause$ x $ and negatively in another clause$ c_i $ , since otherwise$ c_j $ is trivially satisfiable). Then, a set$ \varphi $ of$ P_X $ -facts satisfies$ F $ if for each proposition$ \text{dep}({t_0};{u_0}) $ :$ x\in X $ contains facts of the form either$ P_X $ or$ F(x,1,*,{\rm{sat}}) $ but not both (here$ F(x,0,*,{\rm{sat}}) $ indicates the occurrence of any value in a fact). For$ * $ to be a candidate repair among$ P_X $ -facts, it additionally has to contain facts of the form$ F $ for each$ F(x,*,*,*) $ . Moreover, a set$ x\in X $ of$ P_c $ -facts satisfies the ID$ C $ iff either$ C[u_2]\subseteq C[t_2] $ or$ P_c=\emptyset $ contains all$ P_c $ -facts. Next, we consider a set$ C $ of$ P_X $ -facts containing the fact$ F $ and let$ s_d $ . It follows that$ {\cal{P}}= P_X \cup P_c $ iff$ {\cal{P}}\models F[u_1]\subseteq C[u_2] $ and hence we let$ P_c\neq \emptyset $ contain all$ P_c $ -facts. Finally,$ C $ iff for each$ {\cal{P}}\models C[t_2]\subseteq F[t_1] $ ,$ c_i\in\varphi $ contains at least one fact$ P_X $ such that$ F(x,v,c_i,{\rm{sat}}) $ if$ v=1 $ and$ x\in c_i $ if$ v=0 $ . This is guaranteed since$ \neg x\in c_i $ contains facts of the form$ {\cal{P}} $ for each clause$ C(*, c ) $ and thus there must exist$ c\in\varphi $ -facts in$ F $ also of the form$ {\cal{P}} $ for each clause$ F(*,*,c,*) $ . We prove the correctness via the following claim.$ c\in \varphi $ Claim 4.14.
is satisfiable if and only if$ \varphi $ is true for the fact$ \exists {\text{-}}{\rm{REP}} $ .$ s_d $ Proof of claim "
". Suppose$ \Longrightarrow $ is satisfiable and let$ \varphi $ be a satisfying assignment. We let$ \theta $ where$ {\cal{P}} := \{F(x,1,c_i,{\rm{sat}}) \mid \theta(x)=1, \ {\rm{for }}\ x\in X \ {\rm{and }}\ i\leq m\} \cup \{F(x,0,c_i,{\rm{sat}}) \mid \theta(x)=0, \ {\rm{for }}\ x\in X \ {\rm{and }}\ i\leq m\} \cup \{s_d\} \cup P_c $ contains all$ P_c $ -facts in$ C $ . Then$ {\cal{T}} $ because for any$ {\cal{P}}\models \text{dep}({t_0};{u_0}) $ :$ x\in X $ contains either facts of the form$ {\cal{P}} $ or$ F(x,1,*,*) $ , since$ F(x,0,*,*) $ is an assignment over$ \theta $ . Next, we have that (I)$ X $ since$ {\cal{P}}\models F[u_1]\subseteq C[u_2] $ , and (II)$ P_c \neq \emptyset $ since$ {\cal{P}}\models C[u_2]\subseteq C[t_2] $ contains all$ {\cal{P}} $ -facts. Finally,$ C $ contains at least one fact of the form$ {\cal{P}} $ for each clause$ F(*,*,c,*) $ since$ c\in \varphi $ for at least one literal$ \theta(\ell)=1 $ in each$ \ell\in c $ . This holds because for every clause$ c\in \varphi $ ,$ c\in \varphi $ contains a fact$ {\cal{P}} $ for some variable$ F(x,v, c, {\rm{sat}}) $ appearing in$ x $ . The value$ c $ in this fact depends on how the assignment$ v $ satisfies$ \theta $ , that is,$ c $ if$ v=1 $ makes$ \theta(x)=1 $ true, and$ c $ if$ v=0 $ does. As a consequence,$ \theta(x)=0 $ . Observe that$ {\cal{P}}\models C[t_2]\subseteq F[t_1] $ follows due to the fact$ {\cal{P}}\models F[u_1]\subseteq F[t_1] $ . To see why$ s_d\in {\cal{P}} $ is a repair (i.e., subset-maximal), we note that the only facts not in$ {\cal{P}} $ are of the form$ {\cal{P}} $ for some$ F(x,v,c,{\rm{sat}}) $ and$ v\in\{0,1\} $ such that$ c\in\varphi $ due to the way$ F(x,1-v,c,{\rm{sat}})\in {\cal{P}} $ is defined. However, adding such a fact would violate the FD. Therefore,$ {\cal{P}} $ is indeed a repair. We conclude by observing that$ {\cal{P}} $ .$ s_d \in {\cal{P}} $ "
". Let$ \Longleftarrow $ be a repair and$ {\cal{P}} $ . From$ s_d \in {\cal{P}} $ , it follows that$ {\cal{P}}\models F[u_1]\subseteq C[u_2] $ must contain at least one$ {\cal{P}} $ -fact as$ C $ , and from$ s_d\in{\cal{P}} $ , it follows that$ {\cal{P}}\models F[u_1]\subseteq C[u_2] $ actually contains all$ {\cal{P}} $ -facts. We define an assignment$ C $ over$ \theta $ by setting$ X $ if$ \theta(x)= 1 $ contains$ {\cal{P}} $ and$ F(x,1,*,*) $ if it contains$ \theta(x)= 0 $ . Since$ F(x,0,*,*) $ , the assignment$ {\cal{P}}\models \text{dep}({t_0};{u_0}) $ is well-defined, i.e., there is no$ \theta $ for which we assign both$ x\in X $ and$ \theta(x)=1 $ . Now,$ \theta(x)=0 $ is defined for all the propositions in$ \theta $ since$ X $ is subset-maximal (hence, it contains fact of the form either$ {\cal{P}} $ or$ F(x,0,*,*) $ for each$ F(x,1,*,*) $ ). Now, we prove that$ x\in X $ . To this aim, let$ \theta\models\varphi $ be any clause. Since$ c\in\varphi $ ,$ {\cal{P}}\models C[t_2]\subseteq F[t_1] $ contains at least one fact of the form$ {\cal{P}} $ for some variable$ F(x,v,c,{\rm{sat}}) $ and$ x $ , such that$ v\in\{0,1\} $ if$ v=1 $ and$ x\in c $ if$ v=0 $ (by definition of how$ \neg x\in c $ -facts are constructed). Therefore, we must have set$ F $ if$ \theta(x)=1 $ (hence$ v=1 $ ) and$ x\in c $ if$ \theta(x)=0 $ ($ v=0 $ ). As a result,$ \neg x\in c $ for each$ \theta\models c $ . This proves that$ c\in\varphi $ and our claim follows.$ \theta\models \varphi $ ■ To reduce
into$ {\rm{SAT}} $ , we observe that$ {\rm{REP}}_{{\rm{B}}} $ iff either$ {\cal{P}}\models F[u_1]\subseteq F[t_1] $ contains no$ {\cal{P}} $ -fact, or it contains the fact$ F $ . However, there cannot be a repair for$ s_d $ without any$ {\cal{D}} $ -fact but still containing$ F $ -facts, since it violates the ID$ C $ . As a result, one cannot construct a non-empty repair for$ C[t_2]\subseteq F[t_1] $ by excluding$ {\cal{D}} $ . Therefore, every repair$ s_d $ for$ {\cal{P}} $ necessarily contains$ {\cal{D}} $ , thereby proving the equivalence as before. In other words, there is a non-empty repair for$ s_d $ iff$ {\cal{D}} $ is satisfiable.$ \varphi $ This completes the proof for both cases.
□ We provide an example for a better understanding of the reductions from the proof of Theorem 4.13.
Example 4.15 (Example with fixed ICs) Let
be a propositional formula. Our reduction for$ \varphi := \{x \lor y, \neg x \lor \neg y, \neg x \lor y\} $ gives a database$ \exists {\text{-}}{\rm{REP}} $ with two tables$ {\cal{T}} $ and$ F $ for the collection$ C $ of dependencies.$ B := \{\text{dep}({t_0};{u_0})\}\cup \{F[u_1]\subseteq C[u_2], C[u_2]\subseteq C[t_2], C[t_2]\subseteq F[t_1]\} $ Observe that the only satisfying assignment for
is given by$ \varphi $ , which corresponds to the repair$ \{x\mapsto 0, y\mapsto 1\} $ for$ \{S, \bar{x}_2, \bar{x}_3, y_1, y_3\}\cup \{s_c,s_1,s_2,s_3\} $ containing$ {\cal{D}} $ . Consequently$ S $ is true for the fact$ \exists {\text{-}}{\rm{REP}} $ .$ s_d $ ◁ Next, we prove that
is even harder and$ \forall {\text{-}}{\rm{REP}} $ -complete.$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ Table 3. The database corresponding to the formula $ \varphi $ from Example 4.15.
$ F $ $ t_0 $ $ u_0 $ $ t_1 $ $ u_1 $ $ \begin{array}{c|cc}C & t_2 & u_2 \\\hline s_c & \text { sat } & c_1 \\s_1 & c_1 & c_2 \\s_2 & c_2 & c_3 \\s_3 & c_3 & \text { sat }\end{array} $ $ s_d $ sat sat sat sat $ x_1 $ $ x $ 1 $ c_1 $ sat $ {\bar{x}_2} $ $ x $ 0 $ c_2 $ sat $ {\bar{x}_3} $ $ x $ 0 $ c_3 $ sat $ y_1 $ $ y $ 1 $ c_1 $ sat $ {\bar{y}_2} $ $ y $ 0 $ c_2 $ sat $ y_3 $ $ y $ 1 $ c_3 $ sat Theorem 4.16. The problem
is contained in$ \forall {\text{-}}{\rm{REP}} $ for FDs and IDs. Moreover, there exists a set$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ of FDs and IDs such that the problem$ B $ is$ \forall {\text{-}}{\rm{REP}}_{{\rm{B}}} $ -hard.$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ Proof The membership follows analogously to the proof of Theorem 3.15. The only difference here is that one can check in polynomial time whether a set of facts satisfies each IC in the input. As a result, the membership holds for
(i.e., in the combined complexity).$ \forall {\text{-}}{\rm{REP}} $ For hardness, we build on the same idea as in the proof of Theorem 4.13. Here, we reduce from an instance
of the$ \Phi $ -complete problem$ {\boldsymbol{\Pi}}_2^{{\bf{P}}} $ . The problem$ {\rm { 2QBF }} $ is defined as follows: given a propositional formula$ {\rm { 2QBF }} $ where$ \Phi = \forall Y \exists Z \varphi(Y,Z) $ is a CNF formula, determine whether$ \varphi := \{c_i \mid 1\leq i\leq m\} $ is true (i.e., whether for every assignment to the variables in$ \Phi $ , there exists an assignment to the variables in$ Y $ that satisfies$ Z $ ). We let$ \varphi $ and construct a constrained database$ X=Y\cup Z $ with three relations: (i) a$ {\cal{D}} $ -ary relation$ 4 $ , (ii) a binary relation$ F(t_0,u_0,t_1,t_\exists) $ , and another (iii) binary-relation$ S(u_1,u_\exists) $ . Moreover, we consider a collection$ C(t_2,u_2) $ of FDs and IDs over the schema of$ B $ using a set$ {\cal{T}} $ of attributes.$ V := \{t_j,u_j \mid 0\leq j\leq 2 \}\cup \{t_\exists,u_\exists\} $ contains one FD$ B $ similar to the proof of Theorem 4.13. Due to the change in database relations, we adapt the collection of IDs and consider the set$ \text{dep}({t_0};{u_0}) $ to encode whether each clause$ \{S[u_1]\subseteq C[u_2], C[u_2]\subseteq C[t_2], C[t_2]\subseteq F[t_1]\} $ is satisfied. Moreover, we require an additional ID$ c_i\in \varphi $ to encode the existentially quantified variables$ F[t_{\exists}]\subseteq S[u_{\exists}] $ . As a result, we obtain$ Z $ as our fixed collection of ICs.$ B= \{\text{dep}({t_0};{u_0})\} \cup \{ S[u_1]\subseteq C[u_2], C[u_2]\subseteq C[t_2], C[t_2]\subseteq F[t_1], F[t_{\exists}]\subseteq S[u_{\exists}]\} $ For the database relations, we let
,$ \text{dom}(F)\subseteq\{c_i \mid i\leq m\}\cup X\cup \{0,1, {\rm{exists}}, d\} $ and$ \text{dom}(C)=\{c_i \mid i\leq m\}\cup\{d\} $ . Then our encoding works mostly similar to that in the proof of Theorem 4.13, except for the minor differences outlined below.$ \text{dom}(S)=\{c_1, {\rm{exists}}, d\} $ 1. We include an
-fact to trigger a non-empty set of$ S $ -facts in any repair. We obtain this by adding the fact$ C $ together with the fact$ S(c_1, {\rm{exists}}) $ . Here, we do not need the fact$ C(c_{m}, c_1) $ as in the proof of Theorem 4.13. The remaining$ C({\rm{sat}},c_1) $ -facts$ C $ are added as before.$ \{C(c_i, c_{i+1})\mid i< m\} $ 2. We use
and$ s^d := S(d,d), y^d := F(d,d,d,d) $ as dummy facts to simulate the effect that any assignment over$ c^d := C(d,d) $ yields a collection of facts in$ Y $ that trivially satisfies all the ICs. This is required to simulate the$ {\cal{T}} $ quantification over$ \forall $ .$ Y $ 3. If a literal
does not appear in even a single clause, we still add its corresponding$ \ell \in {\rm {Lit}}(Y) $ -fact following the same intuition as before, i.e., for such a literal$ F $ : we add$ \ell $ if$ F(y, 1, d, d) $ and$ \ell =y $ if$ F(y, 0, d, d) $ . Moreover, the dummy value$ \ell = \neg y $ in this case encodes that$ d $ does not satisfy any clause. As a result of this, we can connect repairs to all assignments over universally quantified variables in$ \ell $ . For the ease of notation, we write$ Y $ for a literal over$ \ell \in c_0 $ that does not appear in any clause.$ Y $ 4. The attributes
encode that the$ \{t_{\exists}, u_{\exists}\} $ -fact$ S $ supports facts involving propositions$ s_{{\rm{sat}}} := S(c_1,{\rm{exists}}) $ via the inclusion dependency$ z\in Z $ . This is achieved by letting facts$ F[t_{\exists}] \subseteq S[u_{\exists}] $ for each$ F(z,*,*,{\rm{exists}}) $ together with the fact$ z \in Z $ . However, all facts corresponding to variables$ s_{{\rm{sat}}} $ take the form$ y\in Y $ for the dummy value$ F(y,*,*,d) $ .$ d $ Observe that the construction in (3) and (4) requires us to distinguish facts based on variables in
and$ Y $ . Formally, our database consists of the following facts:$ Z $ $ \begin{aligned} {\cal{T}} = \quad & \{F(y,1,c_i,d) \mid y \in Y \cap c_i, c_i\in\varphi\}\cup \{F(y,0,c_i,d) \mid y\in Y, \neg y \in c_i, c_i\in\varphi\} \\ & \cup \{F(y,1,d,d) \mid \text{ no clause in } \varphi \text{ contains the literal } y\in Y\} \\ & \cup \{F(y,0,d,d) \mid \text{ no clause in } \varphi \text{ contains the literal } \neg y \ {\rm{for }}\ y\in Y\} \\ &\cup \{F(z,1,c_i,{\rm{exists}}) \mid z \in Z\cap c_i, c_i\in\varphi\}\cup \{F(z,0,c_i,{\rm{exists}}) \mid \\&z\in Z, \neg z \in c_i, c_i\in\varphi\} \\ & \cup \{F(d,d,d,d)\} \cup \{S(c_1,{\rm{exists}}), S(d,d))\} \\ & \cup \{C(c_i, c_{i+1}) \mid 1\leq i \lt m\} \cup \{C(c_m, c_1), C(d,d)\}. \end{aligned} $ For correctness, notice that every assignment
over$ I_Y $ (seen as a subset of$ Y $ ) corresponds to a set$ Y $ of$ P_Y =\{ F(y,1,c_i, d) \mid y\in I_Y \ {\rm{and }}\ y\in c_i \ {\rm{for }}\ 0\leq i\leq m \} \cup \{F(y,0,c_i, d) \mid y \not \in I_Y \ {\rm{and }}\ \neg y\in c_i \ {\rm{for }}\ 0\leq i\leq m\} $ -facts in$ F $ . Moreover,$ {\cal{T}} $ since$ P_Y\models \text{dep}({t_0};{u_0}) $ is an assignment over$ I_Y $ and thus for each$ Y $ ,$ i\neq j\leq m $ includes facts of the form either$ P_Y $ or$ F(y,1,c_i, d) $ but not both, for each variable$ F(y,0,c_j, d) $ and clause$ y\in Y $ . Furthermore, it is easy to observe that taking the dummy facts, i.e.,$ c_i, c_j $ the collection$ P_D = \{y^d, s^d, c^d\} $ satisfies the IDs$ P_Y\cup P_D $ and$ S[u_1]\subseteq C[u_2] $ . Now, we let$ C[u_2]\subseteq C[t_2] $ . We have that$ {\cal{P}}_Y = P_Y\cup P_D $ . In order to extend$ s_{{\rm{sat}}} \not \in {\cal{P}}_Y $ by adding$ {\cal{P}}_Y $ or$ F(z,1,c_i, {\rm{exists}}) $ for any$ F(z,0,c_i, {\rm{exists}}) $ and$ z\in Z $ ,$ i\leq m $ must be added as well due to the ID$ s_{{\rm{sat}}} $ . However, in order to include$ F[t_{\exists}]\subseteq S[{u_{\exists}}] $ in any repair, we have to find$ s_{{\rm{sat}}} $ and$ I_Y $ that together satisfy$ I_Z $ due to the remaining IDs, in particular due to$ \varphi $ . As a result, for any interpretation$ C[t_2]\subseteq F[t_1] $ over$ I_Y $ , there is an interpretation$ Y $ over$ I_Z $ such that:$ Z $ if and only if$ I_Y \cup I_Z \models \varphi $ is not a repair for$ {\cal{P}}_Y $ (since it can be extended by adding facts$ {\cal{D}} $ for such an interpretation$ P_Z =\{ F(z,1,c_i, d) \mid z\in I_Z \ {\rm{and }}\ z\in c_i \ {\rm{for }}\ 0\leq i\leq m \} \cup \{F(z,0,c_i, d) \mid z \not \in I_Z \ {\rm{and }}\ \neg z\in c_i \ {\rm{for }}\ 0\leq i\leq m\} $ in this case). Equivalently, there is a repair for$ I_Z $ not containing$ {\cal{D}} $ if and only if the formula$ s_{{\rm{sat}}} $ is false. We conclude by observing that$ \Phi $ is true if and only if every repair for$ \Phi $ contains$ {\cal{D}} $ if and only if$ s_{{\rm{sat}}} $ is true for$ \forall {\text{-}}{\rm{REP}} $ .$ s_{{\rm{sat}}} $ □ We provide an example for a better understanding of the reduction from the proof of Theorem 4.16.
Example 4.17 Let
be a$ \Phi = \forall x\forall y \exists z\exists w((x \lor y \lor z) \land (y \lor \neg z \lor \neg w) \land (y \lor z \lor w)) $ . Then, our reduction yields a database$ {\rm { 2QBF }} $ with three database tables as depicted in Table 4 and the (fixed) collection$ {\cal{T}} $ of dependencies. The reader can verify that the formula$ B := \{\text{dep}({t_0};{u_0})\}\cup \{ S[u_1]\subseteq C[u_2], C[u_2]\subseteq C[t_2], C[t_2]\subseteq F[t_1], F[t_{\exists}]\subseteq S[u_{\exists}]\} $ is true and that for$ \Phi $ ,$ s_{\rm{sat}} $ is true as well. For instance, the assignment$ \forall {\text{-}}{\rm{REP}} $ results in$ \{x\mapsto0, y\mapsto 0\} $ and thus$ I_Y=\emptyset $ . Then, although$ P_Y= \{\bar{x}_0, \bar{y}_0\} $ satisfies each dependency in$ P_Y\cup\{y^d, s^d, c^d\} $ , it is not a repair since it is not subset-maximal. A repair is obtained by adding further the facts$ B $ .$ \{z_1,z_3, \bar{w}_2\}\cup \{S,s_1,s_2,s_3\} $ ◁ Table 4. The database corresponding to the $ {\rm { 2QBF }} $ instance $ \Phi $ from Example 4.17.
$\begin{array}{l|c|c} S & u_1 & u_{\exists} \\\hline s_{{\rm{sat}}} & c_1 & \text { exists } \\ s^d & d & d \end{array} $ $\begin{array}{l|cc|c|c} F & t_0 & u_0 & t_1 & t_{\exists} \\\hline y^d & d & d & d & d \\\hline x_1 & x & 1 & c_1 & d \\\bar{x}_0 & x & 0 & d & d \\\hline y_1 & y & 1 & c_1 & d \\ y_2 & y & 1 & c_2 & d \\ y_3 & y & 1 & c_3 & d \\\bar{y}_0 & y & 0 & d & d \\\hline z_1 & z & 1 & c_1 & \text { exists } \\\bar{z}_2 & z & 0 & c_2 & \text { exists } \\ z_3 & z & 1 & c_3 & \text { exists } \\\hline \bar{w}_2 & w & 0 & c_2 & \text { exists } \\ w_3 & w & 1 & c_3 & \text { exists }\end{array} $ $\begin{array}{c|c|c} C & t_2 & u_2 \\\hline s_1 & c_1 & c_2 \\ s_2 & c_2 & c_3 \\ s_3 & c_3 & c_1 \\ c^d & d & d \end{array} $ -
Overview. We simulated the problem of finding repairs of an inconsistent database under various families of ICs by Dung's (set-based) argumentation frameworks. Our main results (see Table 1) indicate that subset-maximal repairs correspond to naive extensions when only one type of dependency is allowed, whereas only preferred extensions yield all the repairs when both types are allowed. Note that the case of LTGDs (or IDs) requires a polynomial-time pre-processing to eliminate all the non-accepted arguments from the resulting (SET)AFs. The result of this yields a unique preferred extension that is also stable and naive.
Moreover, the following interesting facts can be derived: "FDs can be modeled via AFs" in a similar way in which "DCs can be modeled via SETAFs". Analogous results hold when we replace FDs and DCs by (1) IDs and LTGDs, respectively, or (2) FDs + IDs and DCs + LTGDs, respectively. Furthermore, for the problem to determine whether a tuple is in some (resp., every) repair, we establish the same complexity bounds as the complexity of credulous (skeptical) reasoning for preferred semantics in AFs. Interestingly, the combined complexity with FDs+IDs remains the same as the data complexity with DCs+LTGDs for the considered problems.
5.1. The role of self-attacking arguments
-
Observe that our construction of (SET)AFs for LTGDs and IDs relies on self-attacking auxiliary arguments. Our motivation lies in avoiding those arguments in any extension of the resulting (SET)AF and connecting repairs to extensions directly. In the absence of self-attacking arguments, extensions may contain auxiliary arguments and therefore a precise connection between repairs and extensions cannot be established (see Example 4.9).
We find it worth highlighting that considerable thought has been given to how LTGDs/IDs can be modeled in an argumentation framework. Intuitively, the semantics of inclusion dependencies closely resemble the notion of "necessary support" in the argumentation literature[42,43,37]. If a DB instance contains only one inclusion dependency (
) per relation, we can simply model the set of supporting facts in$ i $ for a fact$ {\boldsymbol{S}}_{i}({s}) $ via the support relation between arguments. However, we observed that this does not apply to the case when an instance$ s $ contains multiple IDs with the same relation as their source. Modeling this requires as many (distinct) support relations as the number of IDs. This holds since for each fact$ {\cal{D}} $ , one would have to distinguish the satisfaction of individual IDs (i.e., the sets$ s $ and$ {\boldsymbol{S}}_{i}({s}) $ for IDs$ {\boldsymbol{S}}_{j}({s}) $ ) which a single support relation cannot offer. Our translation captures the same essence of supporting arguments via auxiliary attackers, with the benefit that one can distinguish supporters and attackers corresponding to each inclusion dependency. As future work, we aim to think further in this direction and explore ideas that might lead to improved translations for IDs and LTGDs.$ i\neq j $ 5.2. Discussion and future work
-
We would like to point out that, although a correspondence between subset-maximal repairs in the presence of functional dependencies (resp., denial constraints) and extensions for (SET)AFs is known[13], the main contributions of our work establish the correspondence when inclusion dependencies or LTGDs are also allowed. This novel contribution opens up several directions for future work. First and foremost, the authors believe that the connection between repairs in the setting of inconsistent databases and extensions in AFs is stronger than what is established here. Intuitively, one can model the attack relationship via functional dependencies and defense/support via inclusion dependencies. A transformation based on this intuition was recently presented in ref.[37], showing that AFs can be simulated via inconsistent databases considering FDs and IDs.
Further future work may consider whether the connection between inconsistent databases and argumentation can be generalized to other well-known types of expressive ICs. This is particularly interesting, keeping in mind that the current paper extends an earlier work for FDs and IDs[38] to certain expressive ICs toward both sides of Fig. 1. Currently, the authors believe that to model arbitrary (or full) tuple-generating dependencies, one needs the so-called hyper argumentation frameworks[44], allowing attacks between two sets of arguments. Furthermore, one can also target the richer setting of universal constraints and the symmetric difference repairs[26]. Another interesting question is to explore whether the lower bounds for complexity also apply to the sub-classes of FDs and IDs, namely keys and foreign keys, as well as the particular case of acyclic dependencies. Moreover, we would like to explore whether consistent query answering (CQA) under inconsistency-tolerant semantics can also be tackled via the argumentation approach. Finally, one can consider incorporating information about priorities among tuples into the resulting AFs, that is, extending the translations presented in this work to the setting of prioritized repairing and consistent query answering[23,24,45]. Here, ref.[13] has already considered FDs and DCs, thus the question remains open only for the case of IDs and LTGDs.
Another promising direction to consider next is the exploration of an explainability dimension, similar to that in the setting of ontological KBs[8,10,46]. Given an instance
including a database$ {\cal{D}} $ and a collection$ {\cal{T}} $ of dependencies, then the proposed AF$ B $ lets one determine the causes why some tuples are not in some repair (or all repairs). We note that, for IDs, the auxiliary arguments modeling each dependency in$ {\cal{F}}_{\cal{D}} $ can serve this purpose. For FDs, we believe that annotating arguments (or the attack relation between a pair of arguments) by the FDs involved in the conflict can achieve the goal. As a result, one can look at the AF$ B $ and read from it the FDs or IDs that a tuple$ {\cal{F}}_{\cal{D}} $ failing$ s $ or$ \exists {\text{-}}{\rm{REP}} $ participates in. Then, subsets of the atoms and/or possibly tuples in a database can be considered as explanations. Such explanations seem interesting in modeling scenarios where the data (database) has higher confidence than the dependencies; for example, if dependencies are mined over some part of the existing data. An explanation then informs that the data (and hence tuples therein) should be kept, whereas dependencies need to be screened and further analyzed.$ \forall {\text{-}}{\rm{REP}} $ -
All authors contributed to the discussions. The first three authors contributed significantly to the technical writing phase of the paper.
-
Data sharing not applicable as the paper does not include an experimental evaluation.
-
We thank all anonymous reviewers for their valuable feedback. The manuscript has undergone substantial revision in response to their detailed comments, which have significantly improved the quality of the work. Research was funded by the German Research Foundation (DFG), grants TRR 318/3 2026–438445824 and VI 1045-1/1–432788559, the Ministry of Culture and Science of North Rhine-Westphalia (MKW NRW) within the project WHALE (LFN 1-04) funded under the Lamarr Fellow Network programme and project SAIL, grant NW21-059D, and by the German Federal Ministry of Research, Technology and Space (BMFTR) within the project KI-Akademie OWL under grant 16IS24057B.
-
The authors declare that they have no conflict of interest.
- Copyright: © 2026 by the author(s). Published by Maximum Academic Press, Fayetteville, GA. This article is an open access article distributed under Creative Commons Attribution License (CC BY 4.0), visit https://creativecommons.org/licenses/by/4.0/.
-
About this article
Cite this article
Mahmood Y, Virtema J, Barlag T, Ngomo ACN. 2026. Inconsistent databases and argumentation frameworks with collective attacks. The Knowledge Engineering Review 41: e005 doi: 10.48130/ker-0026-0006
Inconsistent databases and argumentation frameworks with collective attacks
- Received: 12 December 2025
- Revised: 12 December 2025
- Accepted: 10 March 2026
- Published online: 29 June 2026
Abstract: The connection between subset-maximal repairs for inconsistent databases involving various integrity constraints (ICs) and acceptable sets of arguments within argumentation frameworks (AFs) has recently drawn growing interest. In this paper, we contribute to this domain by establishing a new connection when ICs include denial constraints and local-as-view tuple-generating dependencies. It turns out that set-based AFs (SETAFs), an extension of Dung's AFs allowing collective attacks, is needed. It is known that subset-maximal repairs under denial constraints correspond to the naive extensions, which also coincide with the preferred and stable extensions in the resulting SETAFs. Our main findings establish that repairs under the considered fragment of tuple-generating dependencies correspond to the preferred extensions. Moreover, for these dependencies, an additional pre-processing allows us to compute a unique extension that is stable and naive. Allowing both types of constraints breaks this relationship, and even the pre-processing does not help, as only preferred semantics captures these repairs. Finally, while it is known that functional dependencies do not require set-based attacks, we prove the same regarding inclusion dependencies. Thus, one can translate inconsistent databases under these restricted classes of ICs to plain AFs with attacks only between arguments.





