Academia.eduAcademia.edu

ASP for Minimal Entailment in a Rational Extension of SROEL

2016, arXiv (Cornell University)

In this paper we exploit Answer Set Programming (ASP) for reasoning in a rational extension SROEL(⊓, ×) R T of the low complexity description logic SROEL(⊓, ×), which underlies the OWL EL ontology language. In the extended language, a typicality operator T is allowed to define concepts T(C) (typical C's) under a rational semantics. It has been proven that instance checking under rational entailment has a polynomial complexity. To strengthen rational entailment, in this paper we consider a minimal model semantics. We show that, for arbitrary SROEL(⊓, ×) R T knowledge bases, instance checking under minimal entailment is Π P 2-complete. Relying on a Small Model result, where models correspond to answer sets of a suitable ASP encoding, we exploit Answer Set Preferences (and, in particular, the asprin framework) for reasoning under minimal entailment. The paper is under consideration for acceptance in Theory and Practice of Logic Programming.

arXiv:1608.02450v1 [cs.AI] 8 Aug 2016 1 ASP for Minimal Entailment in a Rational Extension of SROEL Laura Giordano and Daniele Theseider Dupré DISIT - Università del Piemonte Orientale, Alessandria, Italy (e-mail: [email protected], [email protected]) Abstract In this paper we exploit Answer Set Programming (ASP) for reasoning in a rational extension SROEL(⊓, ×)R T of the low complexity description logic SROEL(⊓, ×), which underlies the OWL EL ontology language. In the extended language, a typicality operator T is allowed to define concepts T(C) (typical C’s) under a rational semantics. It has been proven that instance checking under rational entailment has a polynomial complexity. To strengthen rational entailment, in this paper we consider a minimal model semantics. We show that, for arbitrary SROEL(⊓, ×)R T knowledge bases, instance checking under minimal entailment is ΠP2 -complete. Relying on a Small Model result, where models correspond to answer sets of a suitable ASP encoding, we exploit Answer Set Preferences (and, in particular, the asprin framework) for reasoning under minimal entailment. The paper is under consideration for acceptance in Theory and Practice of Logic Programming. 1 Introduction In the context of work that aims at the convergence of description logics (DLs) and rule-based languages (see, e.g., the invited talk by Hitzler at ICLP 2013), some combinations of DLs and LP languages have been proposed, for instance under the answer set semantics (Eiter et al. 2008), under the MKNF semantics (Knorr et al. 2012), as well as in Datalog +/- (Gottlob et al. 2014). Many extensions of DLs have also been proposed (Straccia 1993; Baader and Hollunder 1995; Donini et al. 2002; Giordano et al. 2007; Eiter et al. 2008; Ke and Sattler 2008; Britz et al. 2008; Bonatti et al. 2009; Casini and Straccia 2010; Motik and Rosati 2010; Knorr et al. 2012; Casini et al. 2013; Giordano et al. 2013; Bonatti et al. 2015) in order to deal with defeasible reasoning, to allow for prototypical properties of concepts, and to deal with defeasible inheritance. In this paper we show that a non-trivial form of defeasible reasoning in DLs can be mapped to Answer Set Programming (ASP) (Gelfond and Leone 2002). In particular, we focus on rational extensions of DLs developed along the lines of the preferential semantics introduced by Kraus, Lehmann and Magidor (Kraus et al. 1990; Lehmann and Magidor 1992) and, specifically on ranked interpretations. These extensions model typical, defeasible, properties of individuals besides strict ones, extending DLs semantics with a preference relation among domain individuals. For the logic ALC, a preferential extension has been proposed in (Giordano et al. 2007; Giordano et al. 2009a), introducing a typicality operator T in the language, which allows defeasible inclusions T(C) ⊑ D (“the typical C elements are Ds”) to be expressed. A rational extension of ALC has been developed in (Britz et al. 2008) allowing defeasible inclusions of the form C⊏D, based on ranked interpretations (i.e., modular preferential interpretations). Prefere ential description logics have been used as the basis of stronger non-monotonic constructions, such as the rational closure construction, originally defined by Lehmann and Magidor (1992) 2 L.Giordano and D.Theseider Dupré and developed for ALC in (Straccia 1993; Casini et al. 2013; Giordano et al. 2015). In particular, in (Giordano et al. 2015) a rational closure construction has been presented which is based on a rational extension of ALC with the typicality operator, and which is characterized semantically by the minimal (canonical) rational models of the knowledge base (KB). In this work we consider a rational extension SROEL(⊓, ×)R T of the low-complexity description logic SROEL(⊓, ×) (Krötzsch 2010a), an extension of EL++ (Baader et al. 2005), with local reflexivity, conjunction of roles and concept products, which is at the basis of OWL EL. It has been shown in (Giordano and Theseider Dupré 2016) that, in SROEL(⊓, ×)R T, instance checking under rational entailment can be solved in polynomial time, defining a Datalog translation for normalized knowledge bases which builds on the materialization calculus in (Krötzsch 2010a). However, it is widely recognized that rational entailment only allows a rather weak kind of inference, and minimal and canonical model semantics have been developed to capture stronger non-monotonic inferences (Lehmann and Magidor 1992). We show that the notion of minimal canonical model introduced in (Giordano et al. 2015) as a semantic characterization of the rational closure for ALC is not adequate to capture some knowledge bases in SROEL(⊓, ×)R T, and we introduce an alternative minimal model semantics, by weakening the requirement that models have to be canonical, defining the notions of T-complete and T-minimal model of a KB. We show that, for the KBs for which there are minimal canonical models, all determining the same ranking of concepts as the rational closure, T-minimal models capture the same defeasible inferences as minimal canonical models. In this paper we exploit ASP for reasoning in the T-minimal models of a KB. Exploiting the fact that, in modular preferential interpretations, the preference relation can be equivalently formulated by a rank function, we provide a Small Rank theorem that ensures that the number of different ranks to be considered in rational models of a KB can be limited by the number of the concepts “T(C)” occurring in the KB. Relying on this result, we define an ASP encoding for any normalized SROEL(⊓, ×)R T KB, showing that the answer sets of the ASP encoding correspond to the ranked models of the KB. This result also provides a Small Model Theorem for normalized SROEL(⊓, ×)R T knowledge bases. The ASP encoding builds on the materialization calculus for SROEL(⊓, ×) presented in (Krötzsch 2010a). Reasoning under minimal entailment requires reasoning on the (possibly multiple) minimal models of a KB. We show that deciding instance checking under T-minimal entailment is a ΠP2 -complete problem and we use the ASP encoding of the KB to compute the answer sets corresponding to T-minimal models. In particular, we exploit optimization by multi-shot ASP solving in the asprin framework for Answer Set Preferences (Brewka et al. 2015). This approach can be easily adapted to deal with ABox minimization, by minimizing the ranks of named individuals. This strictly relates to the rational closure of ABox in (Giordano et al. 2015). 2 A rational extension of SROEL(⊓, ×) In this section we extend the notion of concept in SROEL(⊓, ×), defined by Krötzsch (2010a), adding typicality concepts (we refer to (Krötzsch 2010a) for a detailed description of the syntax and semantics of SROEL(⊓, ×)). We let NC be a set of concept names, NR a set of role names and NI a set of individual names. A concept in SROEL(⊓, ×) is defined as follows: C := A | ⊤ | ⊥ | C ⊓C | ∃R.C | ∃R.Sel f | {a} where A ∈ NC , R ∈ NR and a ∈ NI . We introduce a notion of extended concept CE as follows: ASP for Minimal Entailment in a Rational Extension of SROEL 3 CE := C | T(C) | CE ⊓CE | ∃R.CE where C is a SROEL(⊓, ×) concept. Hence, any concept of SROEL(⊓, ×) is also an extended concept; a typicality concept T(C) is an extended concept and can occur in conjunctions and existential restrictions, but it cannot be nested. A KB is a triple (TBox, RBox, ABox). TBox contains a finite set of general concept inclusions (GCI) C ⊑ D, where C and D are extended concepts; RBox contains a finite set of role inclusions of the form S ⊑ T , R ◦ S ⊑ T , S1 ⊓ S2 ⊑ T , C × D ⊑ T and R ⊑ C × D, where C and D are concepts, R, S, S1 , S2 , T ∈ NR . ABox contains individual assertions of the form C(a) and R(a, b), where a, b ∈ NI , R ∈ NR and C is an extended concept. Restrictions are imposed on the use of roles as in (Krötzsch 2010a). Consider the following example of KB, stating that: typical Italians have black hair; typical students are young; they hate math, unless they are nerd (in which case they love math); all Mary’s friends are typical students. We also assert that Mary is a student, that Mario is an Italian student and a friend of Mary, Luigi is a typical Italian student, and Paul is a typical young student. Example 1 TBox: (a) T(Italian) ⊑ ∃hasHair.{Black} (b) T(Student) ⊑ Young (c) T(Student) ⊑ MathHater (d) T(NerdStudent) ⊑ MathLover (e) NerdStudent ⊑ Student ( f ) MathLover ⊓ MathHater ⊑ ⊥ (g) ∃friendOf .{mary} ⊑ T(Student) (h) ∃hasHair.{Black} ⊓ ∃hasHair.{Blond} ⊑ ⊥ ABox: Student(mary), friendOf (mario, mary), (Student⊓Italian)(mario), T(Student⊓Italian) (luigi), T(Student ⊓ Young)(paul), T(NerdStudent ⊓ Tall)(bob) T(C) is intended to select the most typical instances of C and can occur anywhere except from being nested in a T operator (as it can be seen from the semantics below, the operator T is idempotent). Occurrence of typicality on the r.h.s. of inclusions can be used, e.g., to state that typical working students inherit properties of typical students (T(Student ⊓ Worker) ⊑ T(Student)), or to state that there are typical Italian students: ⊤ ⊑ ∃U.T(Student ⊓ Italian), where U is the universal role (⊤ × ⊤ ⊑ U). As inclusion ⊑ is strict and T(C) is a concept, by standard DL inference we can conclude that Mario is a typical student (by (g)) and young (by (b)). Moreover, we expect that, according to desired properties of defeasible inclusions, Paul, who is a typical young student, inherits the property of typical students of being math haters, while for Bob the more specific property of typical nerd students of being math lovers should prevail. Following (Giordano et al. 2009a; Giordano et al. 2015), a semantics for the extended language is defined, adding to interpretations in SROEL(⊓, ×) (Krötzsch 2010a) a preference relation < on the domain, which is intended to compare the “typicality” of domain elements. The typical instances of a concept C, i.e., the instances of T(C), are the instances of C that are minimal with respect to <. As here we consider a rational extension of SROEL(⊓, ×), we assume the preference relation < to be modular as in (Britz et al. 2008; Giordano et al. 2015). Definition 1 A SROEL(⊓, ×)R T interpretation M is any structure h∆, <, ·I i where: • ∆ is a domain; ·I is an interpretation function that maps each concept name A to set AI ⊆ ∆, each role name r to a binary relation RI ⊆ ∆ × ∆, and each individual name a to an element aI ∈ ∆. The interpretation function ·I is extended to complex concepts as usual: ⊤I = ∆; ⊥I = 0; / {a}I = {aI }; (C ⊓ D)I = CI ∩ DI ; I I I (∃R.C) = {x ∈ ∆ | ∃y ∈ C : (x, y) ∈ R }; (∃R.Sel f )I = {x ∈ ∆ | (x, x) ∈ RI }. 4 L.Giordano and D.Theseider Dupré • < is an irreflexive, transitive, well-founded and modular1 relation over ∆. • Let Min< (S) = {u : u ∈ S and ∄z ∈ S s.t. z < u}; the interpretation of concept T(C) is defined as follows: (T(C))I = Min< (CI ) As in (Lehmann and Magidor 1992), modularity in preferential models can be equivalently defined by postulating the existence of a rank function kM : ∆ 7−→ Ω, where Ω is a totally ordered set. Hence, modular preferential models are called ranked models. The preference relation < can be defined from kM as follows: x < y if and only if kM (x) < kM (y). In the following, we assume that a rank function kM is always associated with any model M . We also define the rank, kM (C), of a concept C in the model M as kM (C) = min{kM (x) | x ∈ CI } (if CI = 0, / then C has no rank and we write kM (C) = ∞). Given an interpretation M the notions of satisfiability and entailment are defined as usual: Definition 2 (Satisfiability and rational entailment) An interpretation M = h∆, <, ·I i satisfies: • a concept inclusion C ⊑ D if CI ⊆ DI ; • a role inclusion S ⊑ T if SI ⊆ T I ; • a generalized role inclusion R ◦ S ⊑ T if RI ◦ SI ⊆ T I (where RI ◦ SI = {(x, z) | (x, y) ∈ RI and (y, z) ∈ SI , for some y ∈ ∆}); • a role conjunction S1 ⊓ S2 ⊑ T if S1I ∩ S2I ⊆ T I ; • a concept product axiom C × D ⊑ T if CI × DI ⊆ T I ; • a concept product axiom R ⊑ C × D if RI ⊆ CI × DI ; • an assertion C(a) if aI ∈ CI ; • an assertion R(a, b) if (aI , bI ) ∈ RI . Given a KB K = (TBox, RBox, ABox), an interpretation M =h∆, <, ·I i satisfies TBox (resp., RBox, ABox) if M satisfies all axioms in TBox (resp., RBox, ABox), and we write M |= TBox (resp., RBox, ABox). An interpretation M = h∆, <, ·I i is a model of K (and we write M |= K) if M satisfies all the axioms in TBox, RBox and ABox. Let a query F be either a concept inclusion C ⊑ D, where C and D are extended concepts, or an individual assertion. F is rationally entailed by K, written K |=sroelrt F, if for all models M =h∆, <, ·I i of K, M satisfies F. As shown in (Giordano et al. 2009a) for the preferential extension of ALC, the meaning of T can be split into two parts: for any element x ∈ ∆, x ∈ (T(C))I when (i) x ∈ CI , and (ii) there is no y ∈ CI such that y < x. The latter can be expressed by introducing a Gödel-Löb modality  and interpreting the preference relation < as the accessibility relation of this modality. Wellfoundedness of < ensures that typical elements of CI exist whenever CI 6= 0, / avoiding infinitely descending chains of elements. The interpretation of  in M is as follows: (C)I = {x ∈ ∆ | for every y ∈ ∆, if y < x then y ∈ CI }. The following result, from (Giordano et al. 2009a), works as well for typicality based on the rational semantics and for SROEL(⊓, ×)R T, and will be exploited in Section 4 to define an encoding of SROEL(⊓, ×)R T in ASP: Proposition 1 Given a model M , a concept C and an element x ∈ ∆: x ∈ (T(C))I iff x ∈ (C ⊓ ¬C)I 1 An irreflexive and transitive relation < is well-founded if, for all S ⊆ ∆, for all x ∈ S, either x ∈ Min< (S) or ∃y ∈ Min< (S) such that y < x. It is modular if, for all x,y,z ∈ ∆, x < y implies x < z or z < y. ASP for Minimal Entailment in a Rational Extension of SROEL 5 In the rest of the paper, we mainly focus on the problem of instance checking. In particular, we propose an inference method in ASP for instance checking in SROEL(⊓, ×)R T under a minimal model semantics, assuming the knowledge base is in normal form. A KB in SROEL(⊓, ×)R T is in normal form if it admits the axioms of a SROEL(⊓, ×) KB in normal form: C(a) R(a, b) A⊑⊥ ∃R.A ⊑ C A ⊑ ∃R.B R⊑T R◦S ⊑ T ⊤⊑C {a} ⊑ C R⊓S ⊑ T A ⊑ {c} A⊑C A⊓B ⊑C ∃R.Self ⊑ C A ⊑ ∃R.Self A×B ⊑ R R ⊑C×D (where A, B,C, D ∈ NC , R, S, T ∈ NR and a, b, c ∈ NI ) and, in addition, it admits axioms of the form: A ⊑ T(B) and T(B) ⊑ C with A, B,C ∈ NC . Extending the results in (Baader et al. 2005) and in (Krötzsch 2010a), it is easy to see that, given a SROEL(⊓, ×)R T KB, a semantically equivalent KB in normal form (over an extended signature) can be computed in linear time. For details we refer to (Giordano and Theseider Dupré 2016), where it is proved that, for normalized SROEL(⊓, ×)R T KBs, rational entailment can be computed in polynomial time, exploiting a Datalog encoding extending the materialization calculus for SROEL(⊓, ×) in (Krötzsch 2010a). A small rank result can also be proved for SROEL(⊓, ×)R T. Let K be a knowledge base in SROEL(⊓, ×)R T and let CK be the set of the concepts C such that T(C) occurs in K. We prove that, if K is satisfiable, then there is a model of K such that the rank of each element in M ′ is less than the number maxK of concepts in CK . Theorem 1 (Small Rank) Let K = (TBox, RBox, ABox) be a normalized SROEL(⊓, ×)R T knowledge base. Given any model ′ M = (∆, <, ·I ) of K, there exists a model M ′ = (∆, <′ , ·I ) of K (over the extended language) ′ such that, for all x ∈ ∆: (i) kM ′ (x) ≤ maxK ; (ii) for all C ∈ NC , x ∈ CI iff x ∈ CI ; and (iii) for all ′ C ∈ CK , x ∈ (T(C))I iff x ∈ (T(C))I . The proof can be found in Appendix A. As a consequence of this result, we can restrict our consideration to models M of the KB such that kM : ∆ 7−→ {0 .. maxK }. 3 Minimal entailment In Example 1, we cannot conclude using rational entailment that all typical young Italians have black hair (and that Luigi has black hair), as we do not know whether there is some typical Italian who is young. To support such a stronger nonmonotonic inference, a minimal model semantics can be used to select the interpretations where individuals are as typical as possible. While restricting to minimal models allows the typicality of domain individuals to be maximised, some alternative notions of minimality have been considered in the literature (Giordano et al. 2013; Casini et al. 2013; Giordano et al. 2015). In particular, in (Giordano et al. 2015) a notion of minimality is considered for ALC with typicality where models with the same domains and the same interpretations of concepts are compared and the ones minimizing the ranks of domain elements are preferred. Namely, an interpretation M =h∆, <, Ii is preferred to M ′ = h∆′ , <′ , I ′ i (M ≺ M ′ ) if: ∆ = ∆′ ; ′ CI = CI for all (non-extended) concepts C; for all x ∈ ∆, kM (x) ≤ kM ′ (x), and there exists y ∈ ∆ such that kM (y) < kM ′ (y). Given a query Q (where Q can be an assertion C(a) or T(C)(a) or an inclusion C ⊑ D or 6 L.Giordano and D.Theseider Dupré T(C) ⊑ D) we say that Q is minimally entailed by a knowledge base K if Q is satisfied in all the minimal models of K. It has been observed (Giordano et al. 2015), that this notion of minimality alone fails to select the intended minimal models. For instance, consider a K containing the inclusions (c), (d), (e) (f) from Example 1. With the above notion of minimality, T(NerdStudent ⊓ Tall) ⊑ MathLover is not entailed by K, i.e. we cannot conclude that all the typical tall nerd students are math lovers (something we would like to conclude, given the irrelevance of being tall with respect to being nerd students). Indeed, there is a minimal model M of K in which a typical tall nerd student is not a math lover, as there is no tall nerd student which is also a math lover in M . The explanation that M does not contain sufficiently many individuals has led to restrict the consideration to models, called canonical, that include a domain individual for any set of concepts {C1 , . . . ,Cn } consistent with the KB (where the Ci ’s are non-extended concepts occurring in KB or their negations). For ALC and SHIQ it has been shown (Giordano et al. 2015; Giordano et al. 2014) that minimal canonical models provide a semantic characterization of the rational closure of TBox which, however, is defined only for KBs where typicality concepts only occur on the l.h.s. of inclusions (we call them simple KBs). This holds in particular for EL⊥ plus typicality (which is a fragment of ALC). In the general case, a KB in SROEL(⊓, ×)R T may have multiple minimal models with incomparable ranking functions. Consider the following example: Example 2 Let K be a knowledge base such that: RBox = {C × D ⊑ R}, ABox = 0, / and TBox contains the inclusions (1) C ⊓ D ⊑ ⊥, (2) T(⊤) ⊓ ∃R.T(⊤) ⊑ ⊥, (3) T(C) ⊑ E, (3) T(D) ⊑ E. Observe that, by the RBox inclusion, each C element is in relation R with all D elements and, by inclusion (2) in T Box, it is not the case that two elements of rank 0 (the rank of typical ⊤ elements) can be in the relation R. So, it is not possible that a C element and a D element have both rank 0 and, in all minimal canonical models, either C has rank 0 and D has rank 1, or vice-versa. The existence of alternative minimal models for a KB with free occurrences of typicality was observed in (Booth et al. 2015) for Propositional Typicality logic (PTL), a propositional language with negation. While the existence of alternative minimal canonical models is not per se a problem, it may happen that a KB in SROEL(⊓, ×)R T has no canonical model at all. This problem was already pointed out for expressive logics such as SHOIQ (Giordano et al. 2014). For instance, if a KB contains the inclusion {bob} ⊓ Student ⊓ Worker ⊑ ⊥, it cannot have a canonical model. In fact, while the two sets of concepts {{bob}, Student} and {{bob}, Worker} are both consistent with the KB, there is no canonical model which contains an instance of {bob} ⊓ Student and one of {bob} ⊓ Worker (as bob can be a student or a worker, but not both). Examples like this one suggest that an alternative requirement to the canonical model condition would be needed to extend the minimal model semantics to a larger set of SROEL(⊓, ×)R T KBs. In essence, the canonical model condition requires that a model must contain instances of all (the sets of) concepts occurring in the KB that are consistent with it. This condition can be weakened by requiring that only for the concepts C such that T(C) occurs in the KB K (or in the query), an instance of C is required to exist in the model, when C is satisfiable in K (i.e., if there is a model ′ M ′ of K such that CI 6= 0). / We call such models T-complete. Let K be a KB and Q a query. Let TK,Q = {C | T(C) occurs in K or in Q and C is satisfiable in K}. When the query has the form T(C) ⊑ D, TK,Q also includes the two concepts C ⊓ D and C ⊓ ¬D when satisfiable in K. Definition 3 A model M is T-complete (wrt K, Q) if, for all C ∈ TK,Q , CI 6= 0. / ASP for Minimal Entailment in a Rational Extension of SROEL 7 Among T-complete models, we select the minimal ones according to the following preference relation ≺T over the set of ranked interpretations. An interpretation M =h∆, <, Ii is preferred to M ′ = h∆′ , <′ , I ′ i (wrt K, Q), written M ≺T M ′ , if, for all C ∈ TK,Q , kM (C) ≤ kM ′ (C), and there exists D ∈ TK,Q such that kM (D) < kM ′ (D). Definition 4 M is a T-minimal model of K if it is a T-complete model of K (wrt Q) and it is minimal among the T-complete models of K wrt the preference relation ≺T (wrt Q). Definition 5 (T-minimal entailment) Given a knowledge base K in SROEL(⊓, ×)R T, a query Q is T-minimally entailed by K, written K |=Tmin Q, if, for all T-minimal models M of K (wrt Q), M satisfies Q. It can be proved that there is a correspondence between T-minimal models and minimal canonical models for knowledge bases K such that: (i) a canonical model of K exists and (ii) the ranking KM of each canonical model M of K is the same as the one determined by the Rational Closure construction. Let |=min be the minimal entailment based on the minimal canonical models semantics (Giordano et al. 2015). Theorem 2 Let K be a knowledge base satisfying conditions (i) and (ii) above and Q an inclusion T(C) ⊑ D (where C and D are non extended concepts). Then, K |=Tmin T(C) ⊑ D iff K |=min T(C) ⊑ D. The proof can be found in Appendix A. In particular, the T-minimal models semantic and the minimal canonical models semantic coincide for simple KBs in the intersection of ALC + TR and SROEL(⊓, ×)R T (i.e., in EL⊥ plus T). For this fragment minimal canonical models provide a semantic characterization of rational closure of simple KBs (Giordano et al. 2015), so that conditions (i) and (ii) hold. In addition, T-minimal models can be defined also for KBs for which no canonical model exists (for instance, the KB in Example 1 has a unique T-minimal model). In particular, the presence in a KB of an inclusion {bob} ⊓ Student ⊓ Worker ⊑ ⊥, does not cause the KB to have no T-minimal models, unless the KB contains other inclusions such as, for instance, T({bob} ⊓ Student) ⊑ E and T({bob} ⊓ Worker) ⊑ F, which would require a T-complete model to contain instances of {bob}⊓ Student and of {bob} ⊓ Worker, which is not possible. In Section 4 we show that for a normalized SROEL(⊓, ×)R T KB we can restrict our attention to small models, whose size is linear in the KB size, and that we can generate such models as the answer sets of an ASP encoding of the KB. In Section 5 we introduce a notion of preference among answer sets, to define minimal T-complete answer sets of the KB. The following result, proved in Appendix B, provides a lower bound on the complexity of T-minimal entailment: Theorem 3 Instance checking in SROEL(⊓, ×)R T under T-minimal model semantics is ΠP2 -hard. While we have introduced the T-minimal model semantics to capture the minimization of the rank of concepts, the T-minimal semantics can be extended as well to maximize the typicality of named individuals. Indeed, in Example 1 we cannot conclude that Mary is a typical student and hence she hates math, unless we assume that Mary is as typical as possible by preferring those models in which named individuals have the lowest rank. A new notion of preference between models can indeed be defined by reformulating, for the T-minimal semantics, the preference wrt ABox in (Giordano et al. 2015) (Def. 26), i.e., by selecting among T-minimal models those which assign the lowest rank to individual names. 8 L.Giordano and D.Theseider Dupré We define a preference ≺ABox between T-minimal models, as follows. Let NI,K be the named individuals occurring in K and let M =h∆, <, Ii and M ′ = h∆′ , <′ , I ′ i be two T-minimal models of K (wrt K, Q). We have that M ≺ABox M ′ , if, for all a ∈ NI,K , kM (aI ) ≤ kM ′ (aI ), and there exists b ∈ NI,K such that kM (bI ) < kM ′ (bI ). We call ≺ABox-minimal the T-minimal models that have no ≺ABox -preferred T-minimal model. It is easy to see that also simple KBs satisfying conditions (i) and (ii) of Theorem 2, having a unique minimal ranking assignment to concepts, may have multiple minimal ranking for named individuals. Consider the following reformulation in SROEL(⊓, ×)R T of an example dealing with the rational closure of ABox in ALC + TR from (Giordano et al. 2015). The reformulation is actually in the fragment EL⊥ plus typicality. Example 3 Normally computer science courses (CS) are taught by academics (A), whereas business courses (B) are normally taught by consultants (C), while consultants and academics are disjoint, i.e., we have T Box = { ∃is Teacher o f .T(CS) ⊑ A, ∃is Teacher o f .T(B) ⊑ C, C ⊓ A ⊑ ⊥}, ABox = {CS(c1), B(c2), is Teacher of (joe, c1), is Teacher of (joe, c2)} and RBox = 0. / In the T-minimal models of the KB, all atomic concepts have rank 0. Observe, however, that there is no T-minimal model in which both c1I and c2I have rank 0, otherwise, joe would be a teacher of both a typical computer science course and a typical business course, hence he would be both an academic and a consultant, which is inconsistent. In the ≺ABox -minimal models of K either c1I has rank 0 and c2I has rank 1, or vice-versa. 4 Models as answer sets We map a normalized SROEL(⊓, ×)R T KB to an ASP program, extending the calculus by Krötzsch (2010a) with a set of predicates to record the ranks of domain elements as well as the minimal ranks for concepts in a ranked model, thus providing the interpretation of typicality concepts in the model. Alternative models of the KB, with different rank assignments, correspond to alternative answer sets of the ASP program. In particular, we show that if the KB has a model M , then there is an answer set corresponding to a small model of the KB, which preserves the relative ranks of the concepts in TK,Q (according to the small rank result above). We show that a small number of auxiliary constants (namely, one constant auxC for each concept T(C) occurring in the knowledge case) need to be introduced in the ASP program, besides the auxiliary constants auxA⊑∃R.C used by the calculus in (Krötzsch 2010a) to deal with existential restriction. Generation of (small) models of the KB provides the basis for computing minimal models, and then minimal entailment. We can show that, in order to reason with minimal entailment, we can restrict, without loss of generality, to models over a domain containing named individuals plus the auxiliary constants, i.e. to the domain of the models of the ASP encoding. In this section, we consider the problem of verifying whether, for a given normalized KB, there is a model of the KB satisfying a query of the form T(C)(a) or C(a) with C ∈ NC . In Section 5 we address minimal entailment. Given a normalized knowledge base K, we define Π(K), the ASP program associated with K, as the union of the following components: 1. ΠK , the representation of K in ASP, which is based on the input translation in (Krötzsch 2010a) of a SROEL(⊓, ×) KB in normal form, with minor additions for the extended syntax of SROEL(⊓, ×)R T; ASP for Minimal Entailment in a Rational Extension of SROEL 9 2. ΠIR , the inference rules in (Krötzsch 2010a), and additional inference rules for the extended syntax of inclusions with T(C) concepts; 3. ΠT , containing rules and constraints to enforce the SROEL(⊓, ×)R T semantics; Part 1. ΠK is the representation of K in ASP according to rules that include the ones in (Krötzsch 2010a), where, to keep a DL-like notation, we do not follow the ASP convention where variable names start with uppercase; in particular, A, C, and R, are intended as ASP constants corresponding to the same class/role names in K. In this representation, nom(a), cls(A), rol(R) are used for a ∈ NI , A ∈ NC , R ∈ NR , and, for example (the complete set of rules from (Krötzsch 2010a) is reported in Appendix C): • subClass(a, C), subClass(A, c), subClass(A, C) are used for C(a), A ⊑ {c}, A ⊑ C; • supEx(A, R, B, auxi) is used for A ⊑ ∃R.B; In the translation of A ⊑ ∃R.B, auxi is a new constant, different for each axiom of this form. The ASP program identifies such names with a fact auxsupex(auxi). The additional mapping for the extended syntax of the SROEL(⊓, ×)R T normal form is: A ⊑ T(B) 7→ supTyp(A, B) T(B) ⊑ C 7→ subTyp(B, C) Also, we need to add top(⊤) to the input specification; moreover, for any concept C occurring in K, the program includes a fact auxtc(auxC , C) where auxC is a new constant, used in the following as a (name of) a representative typical C, in case C is non-empty. Part 2. ΠIR contains, with a small variant, the inference rules in (Krötzsch 2010a) (see rules (1-29) in Appendix C), for example: inst(x, x) ← nom(x) inst(x, z) ← subClass(y, z), inst(x, y) inst(x, z) ← subEx(v, y, z), triple(x, v, x′ ), inst(x′ , y) Note that inst(c, d) for c, d ∈ NI means (Krötzsch 2010b) that {c} ⊑ {d}, i.e., c and d represent the same domain element. ΠIR contains additional inference rules for inclusions with extended concepts: (30) typ(x, z) ← supTyp(y, z), inst(x, y) (31) inst(x, z) ← subTyp(y, z), typ(x, y) Part 3. ΠT , i.e. the set of rules and constraints to enforce the SROEL(⊓, ×)R T semantics, is as follows. The rules and constraint (where h, j, k, k1, n are ASP variables, as well as auxy used in the next group of rules): (32) ind(X) ← nom(X) (33) ind(X) ← auxsupex(X) (34) ind(X) ← auxtc(X, C) (35) possrank(0..n) ← upperbound(n) (36) rank(x, k) ← ind(x), possrank(k), not hasdiffrank(x, k) (37) hasdiffrank(x, k) ← possrank(k), rank(x, j), j! = k (38) some at(k) ← rank(x, k) (39) ← some at(k1), k1 = k + 1, possrank(k), not some at(k) define (32-34) the extended set of individual names; assign (35-37) to each individual name a rank between 0 and n, where n is the number (asserted as upperbound(n)), of T(C) concepts in 10 L.Giordano and D.Theseider Dupré the KB and the query; without loss of generality, state (38-39) that if no individual has rank k, no other individual has rank k + 1 (and then, any h > k); this is useful to reduce combinations of rank assignments in case less than n + 1 different ranks can be used. The following constraints and rules rely on the correspondence in Proposition 1 between T(C) and (C ⊓ ¬C), and, using box neg(k, C) to represent that ¬C holds for individuals at rank k, relate it to membership of individuals to T(C) and to the semantics of typical instances as maximally preferred instances of a concept: (40) ← −box neg(k, y), auxtc(auxy, y), rank(auxy , h), k ≤ h (41) box neg(k1, y) ← box neg(k, y), possrank(k1), k1 = k − 1 (42) −inst(x, y) ← box neg(k, y), rank(x, k1), k1 = k − 1 (43) −box neg(k1, y) ← auxtc(auxy, y), rank(auxy , k), inst(auxy , y), k1 = k + 1 (44) −box neg(k1, y) ← −box neg(k, y), possrank(k1), k1 = k + 1 (45) box neg(n, y) ← auxtc(auxy , y), −inst(auxy , y), upperbound(n) (46) rank(y, h) ← nom(y), inst(x, y), rank(x, h) (47) inst(x, y) ← typ(x, y) (48) typ(x, y) ← inst(x, y), rank(x, k), box neg(k, y) (49) box neg(k, y) ← typ(x, y), rank(x, k) (50) box neg(k, y) ← auxtc(auxy, y), rank(auxy , k) (51) inst(auxy , y) ← auxtc(auxy, y), inst(x, y) (52) −inst(auxy , y) ← auxtc(auxy, y), not inst(auxy , y) (53) inst(auxy , y) ← auxtc(auxy, y), not − inst(auxy , y) (54) ← bot(z), inst(u, z) Note that rules (35-37) assign a rank also to the additional individuals auxC . The constraint (40) states that if an auxC has rank h, ¬¬C can only hold at ranks > h; rule (41) states that if ¬C holds at some rank, it also holds at lower ranks, where (due to rule 42) individuals are not instances of C. Rule (43) states that if auxC has rank k, and it is indeed an instance of C, then ¬¬C holds at k + 1, and (rule 44) at higher ranks. Rule (45) is for the case where auxC is not an instance of C; in this case, all domain elements are not C elements and ¬C holds for elements at the highest rank (and then at all ranks). The remaining rules state that: (46) the same rank is assigned to constants representing the same individual; (47) typical members of a concept are members; (48) if ¬C holds at k, instances of C at rank k are typical instances; (49) if there is a typical instance at rank k, ¬C holds at k; (50) ¬C holds at the rank of auxC ; (51) auxC is an instance of C if there is an (other) instance; (52) and (53) allow to assume that auxC is either an instance of C or not, in case there are no other instances. Rule (54) removes answer sets in which the concept ⊥ has an instance. The representation πQ of a query Q of the form T(C)(a) or C(a) (with C ∈ NC ) is as follows: for a query Q of the form T(C)(a), πQ is typ(a,C); if Q is of the form C(a), πQ is inst(a,C)). If Q is T(C)(a), then auxtc(auxC , C) is assumed to be in Π(K). We establish a correspondence between models of a knowledge base K falsifying a query Q and answer sets of Π(K) ∪ {−πQ }, i.e., the answer sets of Π(K) not containing πQ . First we show that answer sets of Π(K) ∪ {−πQ } correspond to models of K falsifying Q. Proposition 2 Given a knowledge base K in normal form and a query Q, if there is an answer set S of the ASP program Π(K) ∪ {−πQ}, then there is a model M of K such that Q is not satisfied in M . ASP for Minimal Entailment in a Rational Extension of SROEL 11 The next proposition shows that if there is a model of K falsifying a query, then there exists an answer set of Π(K) ∪ {−πQ }. As, by Proposition 2, such an answer set corresponds to a small model of K, Propositions 2 and 3 together provide a small model result for SROEL(⊓, ×)R T. Their proofs can be found in Appendix D. Proposition 3 For a SROEL(⊓, ×)R T knowledge base K in normal form and a query Q, if M is a model of K falsifying a query Q, then there exists an answer set S of the ASP program Π(K) ∪ {−πQ}. 5 Computing minimal entailment The T-minimality condition on models can be reformulated for the answer sets of the ASP encoding. For a knowledge base K and a query Q of the form C(a) or T(C)(a), we let AuxK,Q = {auxC | T(C) occurs in K or Q}. Definition 6 An answer set S of Π(K) is T-complete wrt K, Q if inst(auxC , C) ∈ S for all concepts C satisfiable in K and such that auxC ∈ AuxK,Q . Given two answer sets S1 and S2 of Π(K), S1 T S2 wrt K, Q if, for all auxC ∈ AuxK,Q : (a) if {rank(auxC , h1 ), inst(auxC , C)} ⊆ S1 and rank(auxC , h2 ) ∈ S2 , then h1 ≤ h2 ; (b) if inst(auxC , C) 6∈ S1 , then inst(auxC , C) 6∈ S2 . An answer set S of of Π(K) S is T-minimal wrt K, Q if S is minimal, for T wrt K, Q, among the answer sets of Π(K) which are T-complete wrt K, Q. In the definition of T , note that (b) always holds for T-complete answer sets. It is easy to see (using Propositions 2 and 3) that for any T-minimal model of K falsifying Q there is a Tminimal answer set of Π(K) not containing πQ , and vice-versa (see Appendix E, Proposition 5). Then K |=Tmin Q if and only if πQ is in all the T-minimal answer sets of Π(K) wrt K, Q. In order to make the answer sets of the encoding T-complete wrt K, Q, the following rules: (55) inst(x, y) ← occurs(y), auxtc(x, y), satisfiable(y) (56) satisfiable(y) ← occurs(y), cls(y), not unsatisfiable(y) (57) unsatisfiable(y) ← occurs(y), cls(y), cls(z), inst s(x, z, y), bot(z) (58) inst s(y, y, y) ← occurs(y) are added, and a fact occurs(c) is asserted for all concepts C such that auxC ∈ AuxK,Q . Rule (55), for all such Cs, makes the auxiliary constant, representative of typical C’s, indeed an instance of C, in case C is satisfiable. Satisfiability is verified using, as done in (Krötzsch 2010a) for subsumption checking, a version of the basic calculus with an additional parameter. In rule (57), predicate inst s is a version of inst where the third parameter, a concept name y, represents the assumption that the concept is not empty; as in (Krötzsch 2010a), the name of the concept itself is used for a hypothetical instance of the concept, and rule (58) provides this membership. Rule (57) then concludes that a concept is not satisfiable if assuming its non-emptiness leads to infer that ⊥ has some instance. The basic calculus, which is extended with the extra parameter, is, in our case, the Datalog calculus for rational entailment showing that instance checking under |=sroelrt can be performed in polynomial time (Giordano and Theseider Dupré 2016). Such a calculus includes the basic calculus in (Krötzsch 2010a) (see Appendix C), and a set ΠRT of rules to deal with typicality, using typ(a,C) to represent T(C)(a) as in section 4, and including rules (30-31); however, 12 L.Giordano and D.Theseider Dupré unlike ΠT in section 4, rules in ΠRT do not assign a rank to each individual, only using predicates leqRank(x, y), sameRank(x, y) to constrain the ranks of two individuals. The extra parameter is added as follows: in all rules, occurs(q) is added to the antecedent; in all literals for predicates inst, triple, self , occurs, typ, leqRank, sameRank, predicate names are replaced with inst s, triple s, self s, occurs s, typ s, leqRank s, sameRank s, and q is added as last parameter. The T-minimal answer sets are computed using the asprin framework (Brewka et al. 2015) for Answer Set Preferences, which uses multi-shot ASP solving. The framework allows a user to specify preferences, also using a library of preferences, including ways for composing basic preferences. The T-minimal answer sets can be selected adding a preference specification that relies on such a library and is composed of a statement: #preference(pi, less(weight)){X, X :: rank(auxi, X) : possrank(X)} for each auxi ∈ AuxK,Q , that defines a preference, named pi , for a smaller rank of auxi ; and the statements: #preference(p-tbox, pareto){name(p1); . . . ; name(pn)} #optimize(p-tbox) which require an optimal solution with respect to the preference defined as the pareto combination of the preferences pi 2 . Then, given ΠTmin (K, Q) , which is Π(K) with the additional rules and preference statements described in this section, K |=Tmin Q if and only if πQ is in all the optimal solutions computed by asprin for ΠTmin (K, Q). Observe that deciding the existence of a T-minimal answer set of Π(K) falsifying πQ is a problem in ΣP2 (see Appendix E, Proposition 6) and it could also be solved by direct encoding in Disjunctive Datalog with negation (Eiter et al. 1997) under the stable model semantics. By Proposition 5 in Appendix E, checking whether K |=Tmin Q is then in ΠP2 , and, given the hardness result in Theorem 3, it is ΠP2 -complete. In a similar way, answer set preferences in the asprin framework allow to capture ABox minimization, i.e. minimization of the ranks of named individuals (assigning an higher priority to concept rank minimization). In particular, this can be done introducing a statement: #preference(pai , less(weight)){X, X :: rank(ai , X) : possrank(X)} for each ai ∈ NI,K , that defines a preference, named pai , for a smaller rank of a; and replacing #optimize(p-tbox) with the statements: #preference(p-abox, pareto){name(pa1 ); . . . ; name(pan )} #preference(p-lex, lexico){2 :: name(p-tbox); 1 :: name(p-abox)} #optimize(p-lex) which require an optimal solution with respect to the lexicographic combination p-lex of the pareto combination p-tbox of the minimization of concept ranks, and, with smaller priority, the pareto combination p-abox of the minimization of individual ranks. In Table 1 we report some results about the actual execution of the framework in asprin. We use Example 1 as a basis, using also minimization of the rank of individuals, as described above. We report the running times (in seconds) for variants of the example as the ABox grows, replicating 2 Such statements also minimize the rank of an auxi whose corresponding concept is not satisfiable, but this is irrelevant; such a constant will not be instance of any concept, then any rank can be assigned to it. ASP for Minimal Entailment in a Rational Extension of SROEL 1x 2x 4x 6x 8x Replication of ABox 0.82 1.01 1.34 1.63 1.90 Replication of KB 0.82 1.96 3.87 27.28 40.62 13 Table 1. Some scalability results for Example 1 (up to 8 times) the ABox of Example 1, i.e., adding Student(mary′ ), friendOf (mario′ , mary′ ), and so on; and running times for variants where the whole KB grows, replicating, again up to 8 times, the entire example KB, i.e., adding T(Italian′ ) ⊑ ∃hasHair′ .{Black′ }, . . . as well as Student′(mary′ ), and so on. It can be seen that the basic example requires a small but non-negligible running time (0.82 seconds); the approach scales up well (first row) with respect to the ABox, and not equally well in case (second row) both the ABox and TBox grow. 6 Conclusions and Related Work In this paper we have shown that Answer Set Programming can be used for reasoning under a minimal model semantics in a rational extension of the low complexity description logic SROEL(⊓, ×), which underlies the OWL EL ontology language. In particular, we have defined an ASP encoding Π(K) of a knowledge base K so that the answer sets of Π(K) correspond to small (finite and polynomial) models of K. The encoding is based on the materialization calculus for instance checking in Datalog by Krötzsch (2010a) for the logic SROEL(⊓, ×). We propose a T-minimal model semantics which is an alternative to the minimal canonical model semantics in (Giordano et al. 2015), but which coincides with it when minimal canonical models of the KB exist and their ranking of concepts agrees with the ranking computed by rational closure. The advantage of the T-minimal model semantics is that it can be defined also for some KBs for which no minimal canonical model exists. We show that instance checking under T-minimal entailment in SROEL(⊓, ×)R T is ΠP2 -complete and we use the asprin framework (Brewka et al. 2015) for Answer Set Preferences to compute minimal entailment. The approach is extended to deal with ABox minimization, by minimizing the ranks of individual names, and can be used to experiment alternative notions of minimization. Tableaux-based proof methods for a preferential extension of low complexity DLs including EL⊥ have been studied in (Giordano et al. 2009b), based on interpretations that are not required to be modular, and on minimizing ¬✷¬C concepts. For such a logic, in (Giordano et al. 2011) it is shown that minimal entailment is E XP T IME-hard already for simple KBs, similarly to circumscriptive KBs (Bonatti et al. 2011). Nonmonotonic extensions of DLs include the formalisms for combining DLs with logic programming rules, such as for instance, (Eiter et al. 2008), (Motik and Rosati 2010), (Knorr et al. 2012) and Datalog +/- (Gottlob et al. 2014). In (Bonatti et al. 2015) a non monotonic extension of DLs is proposed based on a notion of overriding and supporting normality concepts. In particular, it preserves the tractability of low complexity DLs, including EL++ and DL-lite. In (Knorr et al. 2012) a general DL language is introduced, which extends SROIQ with nominal schemas and epistemic 14 L.Giordano and D.Theseider Dupré operators as defined in (Motik and Rosati 2010), and encompasses some of the most prominent nonmonotonic rule languages, including ASP. The CKR framework (Bozzato et al. 2014), based on SROIQ-RL, allows for defeasible axioms with local exceptions. It is shown that instance checking over a CKR reduces to (cautious) inference under the answer sets semantics. The work in this paper could provide a starting point for devising more effective approaches for computing T-minimal entailment or alternative notions of defeasible entailment in low complexity DLs. In particular, for the fragment of SROEL(⊓, ×)R T for which T-minimal entailment provides a characterization of the rational closure of the KB, that we expect to be larger than the intersection with ALC + TR , computing T-minimal entailment can be made more efficient through the rational closure construction, since rational entailment is polynomial (Giordano and Theseider Dupré 2016). To this purpose, a combination with the polynomial Datalog encoding of entailment in SROEL(⊓, ×)R T in (Giordano and Theseider Dupré 2016) can be exploited. Future work may also include optimizations based on modularity as in (Bonatti et al. 2015), as well as considering refinements of the rational closure, such as the lexicographic closure, introduced by Lehmann (1995) and extended to ALC in (Casini and Straccia 2012), and the relevant closure proposed in (Casini et al. 2014). The combination of low complexity DLs and rule languages can provide a convenient setting in which alternative approaches to the definition of exceptions in DLs can be compared, and can as well be a source of challenging problems for ASP solvers. Acknowledgement. This research has been partially supported by INDAM - GNCS Project 2016 Ragionamento Defeasible nelle Logiche Descrittive. References BAADER , F., B RANDT, S., AND L UTZ , C. 2005. Pushing the E L envelope. In Proc IJCAI 2005. 364–369. BAADER , F. AND H OLLUNDER , B. 1995. Priorities on defaults with prerequisites, and their application in treating specificity in terminological default logic. J. of Automated Reasoning 15, 1, 41–68. B ONATTI , P. A., FAELLA , M., P ETROVA , I., AND S AURO , L. 2015. A new semantics for overriding in description logics. Artif. Intell. 222, 1–48. B ONATTI , P. A., FAELLA , M., AND S AURO , L. 2011. Defeasible inclusions in low-complexity dls. J. Artif. Intell. Res. (JAIR) 42, 719–764. B ONATTI , P. A., L UTZ , C., AND W OLTER , F. 2009. The Complexity of Circumscription in DLs. J. of Artificial Intelligence Research 35, 717–773. B ONATTI , P. A., P ETROVA , I. M., AND S AURO , L. 2015. Optimizing the computation of overriding. In Proc. ISWC 2015. 356–372. B OOTH , R., C ASINI , G., M EYER , T., AND VARZINCZAK , I. J. 2015. On the entailment problem for a logic of typicality. In Proc. IJCAI 2015. 2805–2811. B OZZATO , L., E ITER , T., AND S ERAFINI , L. 2014. Contextualized knowledge repositories with justifiable exceptions. In DL 2014. 112–123. B REWKA , G., D ELGRANDE , J. P., ROMERO , J., AND S CHAUB , T. 2015. asprin: Customizing answer set preferences without a headache. In Proc. AAAI 2015. 1467–1474. B RITZ , K., H EIDEMA , J., AND M EYER , T. 2008. Semantic preferential subsumption. In Proc. KR 2008, G. Brewka and J. Lang, Eds. 476–484. C ASINI , G., M EYER , T., M OODLEY, K., AND N ORTJE , R. 2014. Relevant closure: A new form of defeasible reasoning for description logics. In JELIA 2014. LNCS 8761. Springer, 92–106. C ASINI , G., M EYER , T., VARZINCZAK , I. J., , AND M OODLEY, K. 2013. Nonmonotonic Reasoning in Description Logics: Rational Closure for the ABox. In Proc. DL 2013. 600–615. C ASINI , G. AND S TRACCIA , U. 2010. Rational Closure for Defeasible Description Logics. In Proc. JELIA 2010. LNAI 6341. Springer, 77–90. ASP for Minimal Entailment in a Rational Extension of SROEL 15 C ASINI , G. AND S TRACCIA , U. 2012. Lexicographic closure for defeasible description logics. In Proc. Australasian Ontology Workshop. 28–39. D ONINI , F. M., NARDI , D., AND ROSATI , R. 2002. Description logics of minimal knowledge and negation as failure. ACM Transactions on Computational Logic (ToCL) 3, 2, 177–225. E ITER , T. AND G OTTLOB , G. 1995. On the computational cost of disjunctive logic programming: Propositional case. Annals of Mathematics and Artificial Intelligence 15, 3-4, 289–323. E ITER , T., G OTTLOB , G., AND M ANNILA , H. 1997. Disjunctive datalog. ACM Trans. Database Syst. 22, 3, 364–418. E ITER , T., I ANNI , G., L UKASIEWICZ , T., S CHINDLAUER , R., AND T OMPITS , H. 2008. Combining answer set programming with description logics for the semantic web. Artif. Intell. 172, 12-13, 1495– 1539. G ELFOND , M. AND L EONE , N. 2002. Logic programming and knowledge representation - the A-Prolog perspective. Artif. Intell. 138, 1-2, 3–38. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2007. Preferential Description Logics. In Proceedings of LPAR 2007. LNAI, vol. 4790. Springer-Verlag, 257–272. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2009a. ALC+T: a preferential extension of Description Logics. Fundamenta Informaticae 96, 1–32. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2009b. Prototypical reasoning with low complexity description logics: Preliminary results. In Proc. LPNMR 2009. 430–436. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2011. Reasoning about typicality in low complexity DLs: the logics E L ⊥ Tmin and DL-Litec Tmin . In Proc. IJCAI 2011. Barcelona, 894–899. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2013. A NonMonotonic Description Logic for Reasoning About Typicality. Artificial Intelligence 195, 165–202. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2014. Rational Closure in SHIQ. In DL2014. CEUR Workshop Proceedings, vol. 1193. 1–13. G IORDANO , L., G LIOZZI , V., O LIVETTI , N., AND P OZZATO , G. L. 2015. Semantic characterization of rational closure: From propositional logic to description logics. Artif. Intell. 226, 1–33. G IORDANO , L. AND T HESEIDER D UPR É , D. 2016. Reasoning in a Rational Extension of SROEL. In DL2016. CEUR Workshop Proceedings, vol. 1577. Extended version in CILC 2016, CEUR Workshop Proceedings, vol. 1645. G OTTLOB , G., H ERNICH , A., K UPKE , C., AND L UKASIEWICZ , T. 2014. Stable model semantics for guarded existential rules and description logics. In Proc. KR 2014. H ORROCKS , I., S ATTLER , U., AND T OBIES , S. 2000. Practical reasoning for very expressive description logics. Logic Journal of the IGPL 8, 3, 239–263. K E , P. AND S ATTLER , U. 2008. Next Steps for Description Logics of Minimal Knowledge and Negation as Failure. In Proc. DL 2008. CEUR Workshop Proceedings, vol. 353. K NORR , M., H ITZLER , P., AND M AIER , F. 2012. Reconciling OWL and non-monotonic rules for the semantic web. In ECAI 2012. 474479. K RAUS , S., L EHMANN , D., AND M AGIDOR , M. 1990. Nonmonotonic reasoning, preferential models and cumulative logics. Artif. Intell. 44, 1-2, 167–207. K R ÖTZSCH , M. 2010a. Efficient inferencing for OWL EL. In Proc. JELIA 2010. 234–246. K R ÖTZSCH , M. 2010b. Efficient inferencing for the description logic underlying OWL EL. Tech. Rep. 3005, Institute AIFB, Karlsruhe Institute of Technology. L EHMANN , D. AND M AGIDOR , M. 1992. What does a conditional knowledge base entail? Artificial Intelligence 55, 1, 1–60. L EHMANN , D. J. 1995. Another perspective on default reasoning. Ann. Math. Artif. Intell. 15, 1, 61–82. M OTIK , B. AND ROSATI , R. 2010. Reconciling Description Logics and rules. J. ACM 57, 5. S TRACCIA , U. 1993. Default inheritance reasoning in hybrid KL-ONE-style logics. In Proc. IJCAI 1993. 676–681. 16 L.Giordano and D.Theseider Dupré Appendix A Proofs of Theorems 1 and 2 Theorem 1 (Small Rank) Let K=(TBox,RBox,ABox) be a normalized SROEL(⊓, ×)R T knowledge base. Given any model ′ M = (∆, <, ·I ) of K, there exists a model M ′ = (∆, <′ , ·I ) of K (over the extended language) ′ such that, for all x ∈ ∆′ : (i) kM ′ (x) ≤ maxK ; (ii) for all C ∈ NC , x ∈ CI iff x ∈ CI ; and (iii) for all ′ I I C ∈ CK , x ∈ (T(C)) iff x ∈ (T(C)) . Proof ′ We define the model M ′ over the domain ∆ by letting ·I = ·I , while changing the rank of the elements in ∆. What is preserved from M is the relative order of the ranks of the typical C elements, for C ∈ CK . Remember that, from the definition of the rank of a concept in a model, kM (C) is equal to the rank of all the typical C’s in M (which must have all the same rank). Let us partition the set CK according to the ranks of the concepts in M : H0 = { C ∈ CK | there is no D ∈ CK with kM (D) < kM (C)} Hi = { C ∈ CK − (H0 ∪ . . . ∪ Hi−1 ) | there is no D ∈ CK − (H0 ∪ . . . ∪ Hi−1 ) with kM (D) < kM (C)} As the set CK is finite and its cardinality is maxK , there is some minimum n < maxK , such that Hn+1 = 0. / We define the relation <′ by setting the rank of all the domain elements in M ′ between 0 and n + 1. In particular, we want to let the rank of all the typical C elements to be i, if C ∈ Hi . For all x ∈ ∆: - if kM (x) ≤ kM (C) for some C ∈ H0 , then let kM ′ (x) = 0; - if kM (B) < kM (x) ≤ kM (C) for some B ∈ Hi−1 and C ∈ Hi (0 < i ≤ n), then let kM ′ (x) = i; - if kM (B) < kM (x) for some B ∈ Hn , then let kM ′ (x) = n + 1. In particular, we let the rank of all the typical C elements to be i, if C ∈ Hi . In fact, if x ∈ (T(C))I then kM (x) = kM (C). In case C ∈ Hi , then kM ′ (x) = i. Changing the ranks as above cannot make a domain element, which is a typical C (for some C ∈ CK ), become a nontypical C element. In fact, if x ∈ (T(C))I , then for all y such that kM (y) < kM (x), y 6∈ C. Suppose a typical C element x gets the rank i in M ′ (as C ∈ Hi ). Some y can get in M ′ the same rank as x if kM (B) < kM (y) ≤ kM (C), for some B ∈ Hi−1 . However, even if the rank of y becomes i, x remains a typical C element. Also, it is not the case that a nontypical C element z (for C ∈ CK ) can become a typical C element. In fact, one such z must have a rank kM (z) greater than the rank of any typical C element x, i.e., kM (x) < kM (z). If x gets rank i in M ′ , since C ∈ Hi , then (by definition of M ′ ) z gets a rank higher then i. Of course, this is not true for the concepts C 6∈ CK . However, we can include as well in the set CK all the concepts C such that T(C) might occur in a query. Theorem 2 Let K be a knowledge base satisfying the following conditions: (i) a canonical model of K exists; (ii) the ranking KM of each canonical model M of K is the same as the one determined by the Rational Closure construction; and let Q be an inclusion T(C) ⊑ D (where C and D are non-extended concepts). Then, K |=Tmin T(C) ⊑ D iff K |=min T(C) ⊑ D. Proof (If) By contraposition. Suppose that K 6|=Tmin Q, i.e. there is a T-minimal model M of K which falsifies Q. Let us consider any minimal canonical model M ′ of K (there is one by (i)). M ′ must ASP for Minimal Entailment in a Rational Extension of SROEL 17 give the same ranks as M to the concepts C ∈ TK,Q . First it is not the case that M ′ ≺T M , otherwise M would not be a T-minimal model. Also, it is not the case that there is a concept C ∈ TK,Q such that kM (C) < kM ′ (C) = rank(C), as the rank of a concept in any model of K cannot be lower than rank(C), the rank of C in the Rational Closure3 (this property holds for SROEL(⊓, ×)R T as it holds for ALC + TR (Giordano et al. 2015) and for SHIQR T (Giordano et al. 2014)). If there is a concept C ∈ TK,Q such that kM ′ (C) < kM (C) = rank(C), then as we have excluded that M ′ ≺T M , there must be a concept C′ ∈ TK,Q such that kM (C′ ) < kM ′ (C′ ) = rank(C′ ), (i.e., the two models M and M ′ must be incomparable wrt. ≺T ). But we have already seen that it not possible that the rank of C′ in a model is lower than the rank of C′ in the rational closure. Thus, the minimal canonical model M ′ assigns to the concepts in TK,Q the same rank as M . We have to show that M ′ falsifies the query Q. Let Q be T(C) ⊑ D. As M falsifies T(C) ⊑ D, there is an element x ∈ ∆ such that x ∈ (T (C))I (x is a typical C element in M ) and x 6∈ DI . Hence, x ∈ (C ⊓ ¬D)I . Let kM (x) = i (and hence kM (C) = i). As M ′ is a canonical model, M ′ must ′ contain a domain element y ∈ (C ⊓ ¬D)I . Clearly, kM ′ (C ∧ ¬D) ≥ kM ′ (C). If kM ′ (C ∧ ¬D) = i, ′ then y ∈ T(C)I (as C has the same rank i in M and in M ′ ), and M ′ falsifies Q. We show that assuming that kM ′ (C ∧ ¬D) = j > i, leads to a contradiction. By hypothesis (ii) M ′ assigns to concepts the same rank as the rational closure, hence rank(C ∧ ¬D) = j > i in the rational closure. This contradicts the fact that kM (C ∧ ¬D) = i, as the rank of a concept in a model of K cannot be lower than the rank of that concept in the Rational Closure. (Only If) By contraposition. Let M is a minimal canonical model of K falsifying Q. We want to show that there is a T-minimal model M ′ falsifying Q. We can show that M is itself a T-minimal model of K (falsifying Q). Clearly, M is a T-complete model of K. If M were nonminimal wrt. ≺T , there would be a model M ′ ≺T M . In this case, there would be a C ∈ TK,Q such that kM ′ (C) < kM (C). This is not possible, due to the property that the rank of a concept C in a model of K cannot be lower than rank(C), the rank of the concept C in the Rational Closure. As, from hypothesis (ii), kM (C) = rank(C), it is not the case that kM ′ (C) < kM (C). Appendix B Proof of Theorem 3: Lower Bound for T-minimal entailment In this section we show that the problem of deciding instance checking under the T-minimal model semantics is a ΠP2 -hard problem for SROEL(⊓, ×)R T knowledge bases. To show this, we provide a reduction of the minimal entailment problem of positive disjunctive logic programs, which has been proved to be a ΠP2 -hard problem by Eiter and Gottlob in (Eiter and Gottlob 1995). A similar reduction has been used to prove ΠP2 -hardness of entailment for Circumscribed Left Local EL⊥ knowledge bases in (Bonatti et al. 2011). Let PV = {p1 , . . . , pn } be a set of propositional variables. A clause is formula l1 ∨ . . . ∨ lh , where each literal l j is either a propositional variable pi or its negation ¬pi . A positive disjunctive logic program (PDLP) is a set of clauses S = {γ1 , . . . , γm }, where each γ j contains at least one positive literal. A truth valuation for S is a set I ⊆ PV , containing the propositional variables which are true. A truth valuation is a model of S if it satisfies all clauses in S. For a literal l, we write S |=min l if and only if every minimal model (with respect to subset inclusion) of S satisfies 3 Observe that, the rank of a concept C can be determined in the rational closure construction for a KB in SROEL(⊓,×)R T, by iteratively verifying exceptionality of the concept C with respect to a set of inclusions Ei according to the iterative construction in (Giordano et al. 2015): C is exceptional wrt. Ei iff Ei |=sroelrt T(⊤) ⊓ C ⊑ ⊥. For a concept C ∧ ¬D, where C and D are non extended concepts, C ∧ ¬D is exceptional wrt. Ei iff Ei |=sroelrt T(⊤) ⊓C ⊑ D. 18 L.Giordano and D.Theseider Dupré l. The minimal-entailment problem can be then defined as follows: given a PDLP S and a literal l, determine whether S |=min l. In the following we sketch the reduction of the minimal-entailment problem for a PDLP S to the instance checking problem under T-minimal entailment, from a knowledge base K constructed from S. We define a KB K = (TBox, RBox, ABox) in SROEL(⊓, ×)R T as follows. We introduce a concept name Ph ∈ NC for each variable ph ∈ PV (h = 1, . . . , n). Also, we introduce in NC an auxiliary concept H, a concept name DS associated with the set of clauses S, and a concept name D j associated with each clause γ j in S ( j = 1, . . . , m). We let a ∈ NI be an individual name, and we define K as follows: RBox = 0, / ABox = {Ph (a), h = 1, . . . , n} ∪ {T(H)(a), DS (a)}, and TBox contains the following inclusions (where Cij and Cij are concepts associated with each literal lij occurring in γ j = l1j ∨ . . . ∨ lkj , as defined below): (1) T(⊤) ⊓ H ⊑ ⊥ (2) {a} ⊓Cij ⊑ D j for all γ j = l1j ∨ . . . ∨ lkj in S (3) {a} ⊓ D j ⊓C1 ⊓ . . . ⊓Ck ⊑ ⊥ for all γ j = l1 ∨ . . . ∨ lk in S (4) {a} ⊓ D1 ⊓ . . . ⊓ Dm ⊑ DS (5) {a} ⊓ DS ⊑ D1 ⊓ . . . ⊓ Dm for each h = 1, . . . , n, j = 1, . . . , m, and where Cij is defined as follows: ( T(Ph ) if lij = ph j Ci = j ∃U.(T(⊤) ⊓ Ph ) if li = ¬ph j j j Ci = j ( ∃U.(T(⊤) ⊓ Ph ) T(Ph ) j j if li = ph if lij = ¬ph where U is the universal role. Let us consider any model M = h∆, <, ·I i of K. Observe that, all the T(⊤) elements are all ¬H elements. Hence, aI (being a typical H) must have rank greater then 0, and it will have rank 1 in all T-minimal models. The T-minimal models of K satisfying DS (a) are intended to correspond to the (propositional) minimal interpretations J satisfying S. Roughly speaking, the concepts Ph such that aI ∈ (T(Ph ))I in M correspond to the variables ph in the minimal interpretation J satisfying S. In any T-minimal model of K, either Ph has rank 0 (and a is not a typical Ph ), or Ph has rank 1 (and a is a typical Ph ). Clearly, by T-minimality, a model of K in which the ranking of a set of Ph ’s is 0, is preferred to the models in which the ranking of some of those Ph ’s is higher (i.e. 1). This captures the subset inclusion minimality in the interpretations of the positive disjunctive logic program S. Inclusions (2)-(5) bind the truth values of the Ph (a) to the truth values of the clauses in S and of their conjunction. The assertion DS (a) in ABox is required to select only those interpretations satisfying the set S of disjunctions. Observe also that any T-minimal model must contain al least a Ph element, for each h = 1, . . . , n, as Ph is a consistent concept. In any minimal canonical model M of K satisfying DS (a): either aI ∈ (T(Ph ))I or I a ∈ (∃U.(T(⊤) ⊓ T(Ph )))I . Hence, for aI the two concepts in the definition of Cij are disjoint j j and complementary, and Ci is actually the concept representing the complement of Ci . Given a set S of clauses and a literal L, the following holds: Proposition 4 ASP for Minimal Entailment in a Rational Extension of SROEL 19 Given a set S of clauses and a literal L, S |=min L if and only if K |=Tmin CL (a) where CL is the concept associated with L, i.e., CL = T(ph ) if L = ph , and CL = ∃U.(T(⊤) ⊓ Ph) if L = ¬ph . From the reduction above and the fact that minimal entailment for PDLP is ΠP2 -hard (Eiter and Gottlob 1995), it follows that minimal entailment under T-minimal model semantics is ΠP2 -hard, i.e. Theorem 3 holds. Appendix C Calculus for instance checking in SROEL(⊓, ×) We report the calculus for SROEL(⊓, ×) instance checking from (Krötzsch 2010a) used in section 5 and, with a small variant, in section 4. The representation of a knowledge base (input translation) is as follows, where, to keep a DL-like notation, we do not follow the ASP convention where variable names start with uppercase; in particular, A, B C, and R, S, T , are intended as ASP constants corresponding to the same class/role names in K: a ∈ NI C ∈ NC R ∈ NR C(a) R(a, b) ⊤⊑C A⊑⊥ {a} ⊑ C A ⊑ {c} A⊑C A⊓B ⊑ C ∃R.Self ⊑ C A ⊑ ∃R.Self ∃R.A ⊑ C A ⊑ ∃R.B R⊑T R◦S ⊑ T R ⊑ C×D A×B ⊑ R R⊓S ⊑ T 7→ nom(a) 7 cls(C) → 7→ rol(R) 7→ subClass(a, C) 7→ supEx(a, R, b, b) 7→ top(C) 7→ bot(A) 7→ subClass(a, C) 7→ subClass(A, c) 7→ subClass(A, C) 7→ subConj(A, B, C) 7→ subSelf (R, C) 7→ supSelf (A, R) 7→ subEx(R, A, C) 7→ supEx(A, R, B, auxi) 7→ subRole(R, T) 7→ subRChain(R, S, T) 7→ supProd(R, C, D) 7→ subProd(A, B, R) 7→ subRConj(R, S, T) In the translation of A ⊑ ∃R.B, auxi is a new constant, different for each axiom of this form. The inference rules (included in ΠIR in section 4) are the following4: (1) inst(x, x) ← nom(x) (2) self (x, v) ← nom(x), triple(x, v, x) (3) inst(x, z) ← top(z), inst(x, z′ ) 4 Here, u,v,x,y,z,w, possibly with suffixes, are ASP variables. 20 L.Giordano and D.Theseider Dupré (4) ⊥ ← bot(z), inst(u, z) (5) inst(x, z) ← subClass(y, z), inst(x, y) (6) inst(x, z) ← subConj(y1, y2, z), inst(x, y1), inst(x, y2) (7) inst(x, z) ← subEx(v, y, z), triple(x, v, x′ ), inst(x′ , y) (8) inst(x, z) ← subEx(v, y, z), self (x, v), inst(x, y) (9) triple(x, v, x′ ) ← supEx(y, v, z, x′ ), inst(x, y) (10) inst(x′ , z) ← supEx(y, v, z, x′ ), inst(x, y) (11) inst(x, z) ← subSelf (v, z), self (x, v) (12) self (x, v) ← supSelf (y, v), inst(x, y) (13) triple(x, w, x′ ) ← subRole(v, w), triple(x, v, x′ ) (14) self (x, w) ← subRole(v, w), self (x, v) (15) triple(x, w, x′′ ) ← subRChain(u, v, w), triple(x, u, x′ ), triple(x′ , v, x′′ ) (16) triple(x, w, x′ ) ← subRChain(u, v, w), self (x, u), triple(x, v, x′ ) (17) triple(x, w, x′ ) ← subRChain(u, v, w), triple(x, u, x′ ), self (x′ , v) (18) triple(x, w, x) ← subRChain(u, v, w), self (x, u), self (x, v) (19) triple(x, w, x′ ) ← subRConj(v1, v2, w), triple(x, v1, x′ ), triple(x, v2, x′ ) (20) self (x, w) ← subRConj(v1, v2, w), self (x, v1), self (x, v2) (21) triple(x, w, x′ ) ← subProd(y1, y2, w), inst(x, y1), inst(x′ , y2) (22) self (x, w) ← subProd(y1, y2, w), inst(x, y1), inst(x, y2) (23) inst(x, z1) ← supProd(v, z1, z2), triple(x, v, x′ ) (24) inst(x, z1) ← supProd(v, z1, z2), self (x, v) (25) inst(x′ , z2) ← supProd(v, z1, z2), triple(x, v, x′ ) (26) inst(x, z2) ← supProd(v, z1, z2), self (x, v) (27) inst(y, z) ← inst(x, y), nom(y), inst(x, z) (28) inst(x, z) ← inst(x, y), nom(y), inst(y, z) (29) triple(z, u, y) ← inst(x, y), nom(y), triple(z, u, x) The version of the calculus in (Krötzsch 2010a), used in Section 5, contains the rule: (4b) inst(x, y) ← bot(z), inst(u, z), inst(x, z′ ), cls(y) instead of rule (4) above. Appendix D Proofs for Section 4 D.1 Proof of Proposition 2 Proposition 2. Given a normalized knowledge base K and a query Q, if there is an answer set S of the ASP program Π(K) ∪ {−πQ}, then there is a model M = (∆, <, ·I ) of K such that Q is not satisfied in M . The proof is similar to the one for Lemma 3 in (Krötzsch 2010b), which proves the completeness of the materialization calculus for SROEL(⊓, ×) by contraposition, building a model of the KB from the minimal Herbrand model of the Datalog encoding. Here, given the answer set S of the program Π(K) ∪ {−πQ} we build the model M falsifying Q exploiting the information in S. In particular, we construct the domain of M from the set Const including all the name constants c ∈ NI as well as all the auxiliary constants occurring in the ASP program Π(KB, Q), defining an equivalence relation over constants and using equivalence classes to define domain elements. For readability, we write auxA⊑∃R.C and auxC , respectively, for the constants associated ASP for Minimal Entailment in a Rational Extension of SROEL 21 with inclusions A ⊑ ∃R.C and with the typicality concepts T(C). Observe that the answer set S contains all the details about the definition of the ranking of the domain elements that can be used to build the model M . First, let us define a relation ≈ between the constants in Const: Definition 7 Let ≈ be the reflexive, symmetric and transitive closure of the relation {(c, d) | inst(c, d) ∈ S, for c ∈ Const and d ∈ NI }. It can be proved that: Lemma 1 Given a constant c such that c ≈ a for a ∈ NI , if inst(c, A) (triple(c, R, d), triple(d, R, c), sel f (c, R), rank(c, k)) is in S, then inst(a, A) (triple(a, R, d), triple (d, R, a), sel f (a, R), rank(a, k)) is in S. The proof is similar to the proof of Lemma 2 in (Krötzsch 2010b). For the predicate rank, the proof exploits rule (46). The vice-versa of Lemma 1 only holds for some of the predicates, namely: Lemma 2 Given a constant c such that c ≈ a for a ∈ NI , if inst(a, A) (triple(a, R, d), rank(a, k)) is in S, then inst(c, A) (triple(c, R, d), rank(c, k)) is in S. Now, let [c] = {d | d ≈ c} denote the equivalence class of c; we define the domain ∆ of the interpretation M as follows: ∆ = {[c] | c ∈ NI } ∪ {wA⊑∃R.C , wA⊑∃R.C | inst(auxA⊑∃R.C , e) ∈ S for 1 2 2 A⊑∃R.C 1 some e and there is no d ∈ NI such that aux ≈ d} ∪{zC , zC | inst(auxC , e) ∈ S for some e and there is no d ∈ NI such that auxC ≈ d}. Two copies of auxiliary constants are introduced, as in (Krötzsch 2010b), to handle Self statements. For each element e ∈ ∆, we define a projection ι (e) to Const as follows: - ι ([c]) = c; ) = auxA⊑∃R.C , i=1,2; - ι (wA⊑∃R.C i i - ι (zC ) = auxC , i = 1, 2; We define the interpretation of individual constants, concepts and roles over ∆ as follows: - for all c ∈ NI , cI = [c]; - for all d ∈ ∆, d ∈ AI iff inst(ι (d), A) ∈ S; - for all d, e ∈ ∆, (d, e) ∈ RI iff (triple(ι (d), R, ι (e)) ∈ S and d 6= e) or (self (ι (d), R) ∈ S and d = e). We define the rank of the domain elements in ∆ in agreement with the extension of the rank predicate in S: - for all d ∈ ∆, kM (d) = h, iff rank(ι (d), h) ∈ S. In particular, zC has rank h if rank(auxC , h) ∈ S and wA⊑∃R.C has rank h if rank (auxA⊑∃R.C , h) ∈ S. The rank function kM ([c]) is well defined. In fact, there is exactly one h such that rank(ι (d), h) ∈ S for each ι (d) (rules (36) and (37)). It is easy to see by Lemma 1 and Lemma 2 that, when auxC ≈ a (a ∈ NI ), i.e., aucC ∈ [a], we have kM ([a]) = h iff rank(auxC , h) ∈ S. As a consequence, all the concepts C such that T(C) occurs in K (or in Q) have that same rank in M and in S. To conclude the proof of Proposition 2 it suffices to prove that M is a model of KB, i.e. it satisfies all the axioms in KB. The proof is as in (Krötzsch 2010b) (see Lemma 2), except that we have to consider the additional axioms A ⊑ T(B) and T(B) ⊑ C. For A ⊑ T(B) in KB, we have supTyp(A, B) ∈ S. Let us assume that d ∈ AI . We want to prove 22 L.Giordano and D.Theseider Dupré that d ∈ (T(B))I . By construction inst(ι (d), A) ∈ S. By rule (30), typ(ι (d), B) ∈ S. By rule (47), inst(ι (d), B) ∈ S, i.e., d ∈ BI . Let rank(ι (d), h) ∈ S, i.e. kM (d) = h. To show that d is a typical B, we have to show that, for all the domain elements e with rank j < h, e 6∈ BI . Given that typ(ι (d), B) and rank(ι (d), h) are in S, from rule (49), box neg(h, B) ∈ S. From the repeated application of rule (41), box neg( j, B) ∈ S, for all j < h. Hence, from rule (42), for all e ∈ ∆ such that rank(ι (e), j) ∈ S (i.e., kM (e) = j < h) −inst(ι (e), B) ∈ S and therefore, inst(ι (e), B) 6∈ S. Thus, for all e ∈ ∆ such that kM (e) = j < h, e 6∈ BI . So, d ∈ (T(B))I . For T(B) ⊑ C in KB, we have subTyp(B, C) ∈ S. Let d ∈ (T(B))I . We have to prove that d ∈ AI . Assume that kM (d) = h, i.e., rank(ι (d), h) ∈ S. As d ∈ (T(B))I , d ∈ BI and, for all e ∈ ∆ such that kM (e) = j < h, e 6∈ BI (and hence, by construction, inst(ι (e), B) 6∈ S). From d ∈ BI , by the definition of M , inst(ι (d), B) ∈ S. Consider also the rank of auxB . Let rank(auxB, j) ∈ S. By rule (51) it must be that inst(auxB , B) ∈ S. Either j = h or j 6= h. If j = h, then from rank(auxB, h) ∈ S, we conclude by rule (50) that box neg(h, B) ∈ S, and, given that inst(ι (d), B) and rank(ι (d), h) are in S, by rule (48), typ(ι (d), B) ∈ S. Thus, by rule (31), inst(ι (d),C) ∈ S. We can exclude the case j 6= h, as both the hypothesis j < h and the hypothesis j > h lead to a contradiction. For j < h: the fact that inst(auxB, B) ∈ S contradicts the fact that, for all e ∈ ∆ such that kM (e) = j < h, inst(ι (e), B) 6∈ S. For j > h: from rank(auxB, j) ∈ S, we can conclude by (50) that box neg( j, B) ∈ S, which would imply, by (41) and (42), that ¬inst(ι (d), B) ∈ S (from the fact that rank(ι (d), h) ∈ S and h < j). Again a contradiction. Hence, M is a model of KB. For Q = C(a), from the hypothesis −inst(a,C) ∈ S, hence inst(a,C) 6∈ S and, by construction, aI 6∈ CI in M . For Q = T(C)(a), from the hypothesis −typ(a, C) ∈ S, hence typ(a,C) 6∈ S. If inst(a,C) 6∈ S then, by construction of M , aI 6∈ CI and, clearly, aI 6∈ (T(C))I . Instead, if inst(a,C) ∈ S, as typ(a, C) 6∈ S, it must be that, for rank(a, h) and rank(auxC , j) in S, h 6= j (otherwise, by rules (48) and (50), would conclude typ(a, C) ∈ S). Also, it can be seen that the hypothesis h < j leads to a contradiction. Hence, h > j and, by construction, kM (a) > kM (C) = j, so that aI 6∈ (T(C))I . This completes the proof of Proposition 2. D.2 Proof of Proposition 3 Proposition 3. For a SROEL(⊓, ×)R T knowledge base K in normal form and a query Q, if M = (∆, <, ·I ) is a model of K falsifying a query Q, then there exists an answer set S of the ASP program Π(K) ∪ {−πQ }. Proof Let Q be a query C(a) (respectively, T(C)(a)). We show that such an answer set S can be constructed from the model M such that inst(a, C) ∈ S (respectively, typ(a, C) ∈ S). Without loss of generality, we can assume that M has no more than maxK + 1 different rank values (from 0 to maxK ) and that the rank values have been made contiguous, according to Theorem 1. In the ASP program we let the upper bound n to be equal to maxK and, in the following, we let hmax be the maximum rank of domain elements in M (observe that hmax ≤ maxK ). We exploit M to construct the answer set S by assigning the ranks to the constants in NI and to the auxiliary constants auxA⊑∃R.C and auxC according to the ranks of the elements in M . Let S0 contain the following facts: 0. nom(c) for c ∈ NI ; auxsupex(c) for c = auxA⊑∃R.C ; auxtc(auxB , B) for all T(B) in K or Q; ASP for Minimal Entailment in a Rational Extension of SROEL 23 1. ind(c) for all c ∈ NI and for all c auxiliary constants; 2. rank(c, h), if kM (cI ) = h, for each c ∈ NI ; 3. rank(auxB , h), if there exists x ∈ (T(B))I and kM (x) = h; 4. rank(auxB , hmax ) if BI = 0; / 5. rank(auxA⊑∃R.C , h) if AI 6= 0/ and h = min{kM (x) | x ∈ (C ⊓ ∃R− .A))I }; 6. rank(auxA⊑∃R.C , hmax ) if AI = 0; / 7. inst(auxB , B) ∈ S, if BI 6= 0, / for B ∈ NC and T(B) occurring in K; otherwise, let −inst(auxB , B) ∈ S. 8. −inst(a, C) ∈ S, if Q = C(a); 9. −typ(a, C) ∈ S, if Q = T(C)(a); 10. L ∈ S, for any L ∈ ΠK , where L is the ASP literal representing a rule in K (according to the input translation in Section 4 (Part 1) and in Appendix C). 11. upperbound(maxK ), poss rank(0), . . . , poss rank(maxK ), some at(0), . . . , some at(hmax ) The rank of c ∈ NI is equal to the rank of cI in M . The rank of auxB is equal to the rank of any typical B element in M , if any (as all the typical B elements have the same rank in M ). auxA⊑∃R.C is given the rank hmax , when AI = 0, / otherwise it is given a minimal rank of the elements in the (C ⊓ ∃R− .A)I concept interpretation5. Also, by item 5, auxB is set to be an instance of concept B if and only if B has some instance in M . As in the proof of soundness of the materialization calculus in (Krötzsch 2010b) (see Lemma 2), we assign a concept expression κ (c) to each constant occurring in the ASP program Π(K) ∪ {−πQ }: - if c ∈ NI , then κ (c) = {c}; - if c = auxA⊑∃R.C , then κ (c) = C ⊓ ∃R− .A; - if c = auxB , then κ (c) = T(B). We say that a set of literals S is satisfied in the model M , if the following conditions hold: - for B ∈ NC , if inst(c, B) ∈ S, then M |= κ (c) ⊑ B and κ (c)I 6= 0/ - for d ∈ NI , if inst(c, d) ∈ S, then M |= κ (c) ⊑ {d} and κ (c)I 6= 0/ - for B ∈ NC , if typ(c, B) ∈ S, then M |= κ (c) ⊑ T(B) and κ (c)I 6= 0/ - for R ∈ NR , if triple(c, R, d) ∈ S, then M |= κ (c) ⊑ ∃R.κ (d) and κ (c)I 6= 0/ - for R ∈ NR , if self (c, R) ∈ S, then M |= κ (c) ⊑ ∃R.Sel f and κ (c)I 6= 0/ / then kM (κ (c)) = h - if rank(c, h) ∈ S and κ (c)I 6= 0, - if box neg(h, A) ∈ S then, for all x ∈ ∆ such that kM (x) = h, x ∈ (✷¬A)I - if −box neg(h, A) ∈ S then, for all x ∈ ∆ s.t. kM (x) = h, x 6∈ (✷¬A)I / then M 6|= κ (c) ⊑ B - for B ∈ NC , if −inst(c, B) ∈ S and κ (c)I 6= 0, - for B ∈ NC , if −typ(c, B) ∈ S and κ (c)I 6= 0, / then M 6|= κ (c) ⊑ T(B) - for B ∈ NC , if bot(B) ∈ S, then M |= B ⊑ ⊥ - for B ∈ NC , if top(B) ∈ S, then M |= ⊤ ⊑ B Notice that, from the previous conditions it is not the case that bot(B) and inst(a, B) are both in S, for some B ∈ NC , otherwise, we would have (from inst(a, B) ∈ S) M |= κ (a) ⊑ B with κ (a)I 6= 0/ and (from bot(B) ∈ S) that M |= B ⊑ ⊥. Let us consider the portion P0 the ASP program Π(K) ∪ {−πQ } containing ΠK , plus the rules (32)-(39), the rules (52), (53) and the fact −πQ . Once a unique rank is assigned to each constant c in NI and to auxiliary constants, and the rank values are all contiguous and start from 0 (as required by rules (38) and (39)), and in particular the rank of the typical B elements (if any) have 5 Notice that, although inverse roles are not in the language of SROEL(⊓,×)R T, at the semantic level the set of domain elements in (C ⊓ ∃R− .A)I is well defined, according to the usual semantics of inverse roles (Horrocks et al. 2000), i.e., (∃R− .A)I = {x ∈ ∆ | exists y ∈ AI such that (y,x) ∈ RI }. 24 L.Giordano and D.Theseider Dupré been fixed (as in M ) by introducing rank(auxB, h) in S, for some h, and inst(auxB , B) if BI 6= 0, / the set S0 satisfies the ASP rules in P0 and is supported, that is, S0 is an answer set of the program P0 . All the other rules in the program do not involve default negation and their application uniquely determines an answer set, if it exists. So if there is an answer set of the ASP program Π(K) ∪ {−πQ } it can be obtained by repeatedly applying the rules in P1 containing all the rules ΠIR (Part 2) and the rules (40)-(51), (54) in ΠT (Part 3). We can show that the application of the rule of the program preserves the property that S is satisfied in the model M . Starting from S0 , which is an answer set of the portion P0 of the program we show that the iterative application of the remaining ASP rules (those in P1 ) gives a new set S of literals that is satisfied in M . The proof can be done by induction on the number of applications of the rules used to add a given literal in S. Let S be the set of literals obtained after the exhaustive application of all the rules in P1 starting from S0 . S is satisfied by the model M of KB. Hence, S cannot contain complementary literals such as inst(b, A) and −inst(b, A), otherwise S would not be satisfied in M . Also, inst(a, C) and bot(C) cannot be in S for any a and C. Therefore, S is a consistent set of literals, and satisfies all the rules in P1 as well as in P0 . Moreover, any literal in S is supported in S because it either belongs to S0 (and is supported in P0 ), or it is derived from S0 by a sequence of rule applications. Hence, S is an answer set of Π(K) ∪ {−πQ }. By construction, −inst(a, C) ∈ S (resp., −typ(a, C) ∈ S). Appendix E Proofs for Section 5 Proposition 5 Given a normalized knowledge base K and a query Q, if there is a model M = (∆, <, ·I ) of K which is T-minimal wrt K, Q and falsifies Q, then there is an answer set S of the ASP program Π(K), which is T-minimal wrt K, Q and such that πQ 6∈ S; and vice-versa. Proof Let M = (∆, <, ·I ) of K which is T-minimal wrt K, Q and falsifies Q. By Proposition 3, there exists an answer set S of the ASP program Π(K)∪{−πQ }. As M is T-complete, by construction, S is also T-complete. Also, by construction, the ranks of the concepts C ∈ TK,Q are the same in M as in S (i.e., kM (C) = h < ∞ iff rank(auxC , h), inst(auxC , C) ∈ S). We have to show that S is T-minimal wrt K, Q. Suppose, by absurdum, that S is not T-minimal. Hence, there is a Tcomplete answer set S′ of Π(K) such that S′ T S. By Proposition 2, from S′ we can build a model M ′ of K such that the ranks of the concepts C ∈ TK,Q are the same in M ′ as in S′ (see the construction in Appendix D, Section D.1). By construction, M ′ is also T-complete. Hence, there is a T-complete model M ′ of K such that M ′ T M , which contradicts the hypothesis that M is T-minimal. Vice-versa, let S be an answer set of the ASP program Π(K), which is T-minimal wrt K, Q and such that inst(a, C) 6∈ S. By Proposition 2, from S we can build a model M of K such that the ranks of the concepts C ∈ TK,Q are the same in M as in S. By construction M is T-complete (as S is T-complete). We have to show that M is a T-minimal model of K. Suppose by absurdum that M is not T-minimal. Then, there is another T-complete model M ′ of K such that M ′ T M . By Proposition 3, there exists an answer set S′ of the ASP program Π(K) ∪ {−πQ }. By construction, ASP for Minimal Entailment in a Rational Extension of SROEL 25 S′ is T-complete and assigns to the concepts C ∈ TK,Q the same ranks as M ′ (see the construction in Appendix D, Section D.2). Hence, it must be that S′ T S, which contradicts the hypothesis that S is T-minimal. Proposition 6 The problem of deciding the existence of a T minimal answer set of Π(K) falsifying πQ is in ΣP2 . Proof This problem can be solved by nondeterministically guessing a set S of literals of polynomial size in the size of K and then verifying that: (1) S is an answer set of Π(K); (2) S is T-complete wrt K, Q; (3) πQ 6∈ S; (4) S is T-minimal wrt K, Q among the T-complete answer sets of Π(K). Verification of (1), (2) and (3) requires polynomial time in the size of K. In particular, for (1) the Gelfond and Lifschitz’ transform of Π(K) wrt S, Π(K)S (which has polynomial size and does not contain default negation), can be computed in polynomial time as well as its logical consequences. For (2), T-completeness can be verified by checking if inst(auxC , C) is in S, for all the auxC ∈ AuxK,Q such that satisfiable(C) holds (using the definition of predicate satisfiable in Section 5 based on the polynomial encoding of K in (Giordano and Theseider Dupré 2016)). (4) can be checked by calling an NP oracle which verifies that S is T-minimal among the Tcomplete answer sets of K. In fact, the verification that S is not a T-minimal answer set of K can be done by an NP algorithm which nondeterministically generates a set of literals S′ (of polynomial size in the size of K) such that S′ T S (S′ T S can be checked in polynomial time). Hence, the problem of deciding existence of T minimal answer set of Π(K) falsifying πQ is in NPNP .