# ASP for Minimal Entailment in a Rational Extension of SROEL

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.

• 21 publications
• 13 publications
03/23/2018

### Defeasible Reasoning in SROEL: from Rational Entailment to Rational Closure

In this work we study a rational extension SROEL^R T of the low complexi...
11/03/2015

### Bound Your Models! How to Make OWL an ASP Modeling Language

To exploit the Web Ontology Language OWL as an answer set programming (A...
06/08/2020

### An ASP approach for reasoning in a concept-aware multipreferential lightweight DL

In this paper we develop a concept aware multi-preferential semantics fo...
07/07/2016

### Mapping Data to Ontologies with Exceptions Using Answer Set Programming

In ontology-based data access, databases are connected to an ontology vi...
09/17/2021

### Weighted Conditional EL^bot Knowledge Bases with Integer Weights: an ASP Approach

Weighted knowledge bases for description logics with typicality have bee...
06/28/2021

### Reasoning on DL-Lite_ R with Defeasibility in ASP

Reasoning on defeasible knowledge is a topic of interest in the area of ...
09/28/2018

### On Rational Entailment for Propositional Typicality Logic

Propositional Typicality Logic (PTL) is a recently proposed logic, obtai...

## 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 , a preferential extension has been proposed in [Giordano et al. (2007), Giordano et al. (2009a)], introducing a typicality operator in the language, which allows defeasible inclusions (“the typical elements are s”) to be expressed. A rational extension of has been developed in [Britz et al. (2008)] allowing defeasible inclusions of the form , based on ranked interpretations (i.e., modular preferential interpretations). Preferential 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 whatdoes and developed for 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 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 of the low-complexity description logic [Krötzsch (2010a)], an extension of [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 , 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 is not adequate to capture some knowledge bases in , and we introduce an alternative minimal model semantics, by weakening the requirement that models have to be canonical, defining the notions of -complete and -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, -minimal models capture the same defeasible inferences as minimal canonical models.

In this paper we exploit ASP for reasoning in the -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 “” occurring in the KB. Relying on this result, we define an ASP encoding for any normalized 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 knowledge bases. The ASP encoding builds on the materialization calculus for 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 -minimal entailment is a -complete problem and we use the ASP encoding of the KB to compute the answer sets corresponding to -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 , defined by Krötzsch KrotzschJelia2010, adding typicality concepts (we refer to [Krötzsch (2010a)] for a detailed description of the syntax and semantics of ). We let be a set of concept names, a set of role names and a set of individual names. A concept in is defined as follows:

where , and . We introduce a notion of extended concept as follows:

where is a concept. Hence, any concept of is also an extended concept; a typicality concept is an extended concept and can occur in conjunctions and existential restrictions, but it cannot be nested.

A KB is a triple . contains a finite set of general concept inclusions (GCI) , where and are extended concepts; contains a finite set of role inclusions of the form , , , and , where and are concepts, . contains individual assertions of the form and , where , and 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

:

: ,

is intended to select the most typical instances of and can occur anywhere except from being nested in a operator (as it can be seen from the semantics below, the operator 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 (), or to state that there are typical Italian students: , where is the universal role (). As inclusion is strict and 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 [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 , i.e., the instances of , are the instances of that are minimal with respect to . As here we consider a rational extension of , we assume the preference relation to be modular as in [Britz et al. (2008), Giordano et al. (2015)].

###### Definition 1

A interpretation is any structure where:

• is a domain; is an interpretation function that maps each concept name to set , each role name to a binary relation , and each individual name to an element . The interpretation function is extended to complex concepts as usual:
;        ;        ;        = ;
= ;        = .

• is an irreflexive, transitive, well-founded and modular111An irreflexive and transitive relation is well-founded if, for all , for all , either or such that . It is modular if, for all , implies or . relation over .

• Let and s.t. ; the interpretation of concept is defined as follows:

As in [Lehmann and Magidor (1992)], modularity in preferential models can be equivalently defined by postulating the existence of a rank function , where is a totally ordered set. Hence, modular preferential models are called . The preference relation can be defined from as follows: if and only if . In the following, we assume that a rank function is always associated with any model . We also define the rank, of a concept in the model as (if , then has no rank and we write ). Given an interpretation the notions of satisfiability and entailment are defined as usual:

###### Definition 2 (Satisfiability and rational entailment)

An interpretation satisfies:
a concept inclusion if  ;
a role inclusion if  ;
a generalized role inclusion if   (where and    , for some );
a role conjunction if  ;
a concept product axiom if  ;
a concept product axiom if  ;
an assertion if ;
an assertion if .

Given a KB , an interpretation satisfies (resp., , ) if satisfies all axioms in (resp., , ), and we write (resp., , ). An interpretation is a model of (and we write ) if satisfies all the axioms in , and .

Let a query be either a concept inclusion , where and are extended concepts, or an individual assertion. is rationally entailed by , written , if for all models of , satisfies .

As shown in [Giordano et al. (2009a)] for the preferential extension of , the meaning of can be split into two parts: for any element , when (i) , and (ii) there is no such that . 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. Well-foundedness of ensures that typical elements of exist whenever , avoiding infinitely descending chains of elements. The interpretation of in is as follows: for every , if then The following result, from [Giordano et al. (2009a)], works as well for typicality based on the rational semantics and for , and will be exploited in Section 4 to define an encoding of in ASP:

###### Proposition 1

Given a model , a concept and an element :

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 under a minimal model semantics, assuming the knowledge base is in normal form.

A KB in is in normal form if it admits the axioms of a KB in normal form:

(where , and ) and, in addition, it admits axioms of the form:   and    with . Extending the results in [Baader et al. (2005)] and in [Krötzsch (2010a)], it is easy to see that, given a 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 KBs, rational entailment can be computed in polynomial time, exploiting a Datalog encoding extending the materialization calculus for in [Krötzsch (2010a)].

A small rank result can also be proved for . Let be a knowledge base in and let be the set of the concepts such that occurs in . We prove that, if is satisfiable, then there is a model of such that the rank of each element in is less than the number of concepts in .

###### Theorem 1 (Small Rank)

Let be a normalized knowledge base. Given any model of , there exists a model of (over the extended language) such that, for all : (i) ; (ii) for all , iff ; and (iii) for all , iff .

The proof can be found in Appendix A. As a consequence of this result, we can restrict our consideration to models of the KB such that .

## 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 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 is preferred to () if: ; for all (non-extended) concepts ; for all , , and there exists such that .

Given a query (where can be an assertion or or an inclusion or ) we say that is minimally entailed by a knowledge base if is satisfied in all the minimal models of .

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 containing the inclusions (c), (d), (e) (f) from Example 1. With the above notion of minimality, is not entailed by , 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 of 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 .

The explanation that 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 consistent with the KB (where the ’s are non-extended concepts occurring in KB or their negations). For and 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 plus typicality (which is a fragment of ). In the general case, a KB in may have multiple minimal models with incomparable ranking functions. Consider the following example:

###### Example 2

Let be a knowledge base such that: , , and contains the inclusions (1)  ,  (2)  ,  (3)  ,  (3)  .  Observe that, by the inclusion, each element is in relation with all elements and, by inclusion (2) in , it is not the case that two elements of rank 0 (the rank of typical elements) can be in the relation . So, it is not possible that a element and a element have both rank and, in all minimal canonical models, either has rank and has rank , 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 has no canonical model at all. This problem was already pointed out for expressive logics such as [Giordano et al. (2014)]. For instance, if a KB contains the inclusion , it cannot have a canonical model. In fact, while the two sets of concepts and are both consistent with the KB, there is no canonical model which contains an instance of and one of (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 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 such that occurs in the KB (or in the query), an instance of is required to exist in the model, when is satisfiable in (i.e., if there is a model of such that ). We call such models -complete. Let be a KB and a query. Let = occurs in or in and is satisfiable in }. When the query has the form , also includes the two concepts and when satisfiable in .

###### Definition 3

A model is -complete (wrt , ) if, for all , .

Among -complete models, we select the minimal ones according to the following preference relation over the set of ranked interpretations. An interpretation is preferred to (wrt , ), written , if, for all ,  , and there exists such that .

###### Definition 4

is a -minimal model of if it is a -complete model of (wrt ) and it is minimal among the -complete models of wrt the preference relation (wrt ).

###### Definition 5 (T-minimal entailment)

Given a knowledge base in , a query is -minimally entailed by , written , if, for all -minimal models of (wrt ), satisfies .

It can be proved that there is a correspondence between -minimal models and minimal canonical models for knowledge bases such that: (i) a canonical model of exists and (ii) the ranking of each canonical model of is the same as the one determined by the Rational Closure construction. Let be the minimal entailment based on the minimal canonical models semantics [Giordano et al. (2015)].

###### Theorem 2

Let be a knowledge base satisfying conditions (i) and (ii) above and an inclusion (where and are non extended concepts). Then, iff .

The proof can be found in Appendix A. In particular, the -minimal models semantic and the minimal canonical models semantic coincide for simple KBs in the intersection of and (i.e., in plus ). 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, -minimal models can be defined also for KBs for which no canonical model exists (for instance, the KB in Example 1 has a unique -minimal model). In particular, the presence in a KB of an inclusion , does not cause the KB to have no -minimal models, unless the KB contains other inclusions such as, for instance, and , which would require a -complete model to contain instances of and of , which is not possible.

In Section 4 we show that for a normalized 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 -complete answer sets of the KB. The following result, proved in Appendix B, provides a lower bound on the complexity of -minimal entailment:

###### Theorem 3

Instance checking in under -minimal model semantics is -hard.

While we have introduced the -minimal model semantics to capture the minimization of the rank of concepts, the -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 -minimal semantics, the preference wrt ABox in [Giordano et al. (2015)] (Def. 26), i.e., by selecting among -minimal models those which assign the lowest rank to individual names.

We define a preference between -minimal models, as follows. Let be the named individuals occurring in and let and be two -minimal models of (wrt , ). We have that , if, for all ,  , and there exists such that . We call -minimal the -minimal models that have no -preferred -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 of an example dealing with the rational closure of ABox in from [Giordano et al. (2015)]. The reformulation is actually in the fragment plus typicality.

###### Example 3

Normally computer science courses () are taught by academics (), whereas business courses () are normally taught by consultants (), while consultants and academics are disjoint, i.e., we have , and . In the -minimal models of the KB, all atomic concepts have rank . Observe, however, that there is no -minimal model in which both and have rank , otherwise, 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 -minimal models of either has rank and has rank , or vice-versa.

## 4 Models as answer sets

We map a normalized KB to an ASP program, extending the calculus by Krötzsch KrotzschJelia2010 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 , then there is an answer set corresponding to a small model of the KB, which preserves the relative ranks of the concepts in (according to the small rank result above).

We show that a small number of auxiliary constants (namely, one constant for each concept occurring in the knowledge case) need to be introduced in the ASP program, besides the auxiliary constants 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 or with . In Section 5 we address minimal entailment.

Given a normalized knowledge base , we define , the ASP program associated with , as the union of the following components:

1. , the representation of in ASP, which is based on the input translation in [Krötzsch (2010a)] of a KB in normal form, with minor additions for the extended syntax of ;

2. , the inference rules in [Krötzsch (2010a)], and additional inference rules for the extended syntax of inclusions with concepts;

3. , containing rules and constraints to enforce the semantics;

Part 1. is the representation of 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, , , and , are intended as ASP constants corresponding to the same class/role names in . In this representation, , , are used for , , , and, for example (the complete set of rules from [Krötzsch (2010a)] is reported in Appendix C):

• , , are used for , , ;

• is used for ;

In the translation of , is a new constant, different for each axiom of this form. The ASP program identifies such names with a fact . The additional mapping for the extended syntax of the normal form is:

Also, we need to add to the input specification; moreover, for any concept occurring in , the program includes a fact where is a new constant, used in the following as a (name of) a representative typical , in case is non-empty.

Part 2. contains, with a small variant, the inference rules in [Krötzsch (2010a)] (see rules (1-29) in Appendix C), for example: Note that for means [Krötzsch (2010b)] that , i.e., and represent the same domain element. contains additional inference rules for inclusions with extended concepts:

Part 3. , i.e. the set of rules and constraints to enforce the semantics, is as follows. The rules and constraint (where are ASP variables, as well as used in the next group of rules): define (32-34) the extended set of individual names; assign (35-37) to each individual name a rank between and , where is the number (asserted as ), of concepts in the and the query; without loss of generality, state (38-39) that if no individual has rank , no other individual has rank (and then, any ); this is useful to reduce combinations of rank assignments in case less than different ranks can be used.

The following constraints and rules rely on the correspondence in Proposition 1 between and , and, using to represent that holds for individuals at rank , relate it to membership of individuals to and to the semantics of typical instances as maximally preferred instances of a concept: Note that rules (35-37) assign a rank also to the additional individuals . The constraint (40) states that if an has rank , can only hold at ranks ; rule (41) states that if holds at some rank, it also holds at lower ranks, where (due to rule 42) individuals are not instances of . Rule (43) states that if has rank , and it is indeed an instance of , then holds at , and (rule 44) at higher ranks. Rule (45) is for the case where is not an instance of ; in this case, all domain elements are not elements and 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 holds at , instances of at rank are typical instances; (49) if there is a typical instance at rank , holds at ; (50) holds at the rank of ; (51) is an instance of if there is an (other) instance; (52) and (53) allow to assume that is either an instance of or not, in case there are no other instances. Rule (54) removes answer sets in which the concept has an instance.

The representation of a query of the form or (with ) is as follows: for a query of the form , is ; if is of the form , is . If is , then is assumed to be in .

We establish a correspondence between models of a knowledge base falsifying a query and answer sets of , i.e., the answer sets of not containing . First we show that answer sets of correspond to models of falsifying .

###### Proposition 2

Given a knowledge base in normal form and a query , if there is an answer set of the ASP program , then there is a model of such that is not satisfied in .

The next proposition shows that if there is a model of falsifying a query, then there exists an answer set of . As, by Proposition 2, such an answer set corresponds to a small model of , Propositions 2 and 3 together provide a small model result for . Their proofs can be found in Appendix D.

###### Proposition 3

For a knowledge base in normal form and a query , if is a model of falsifying a query , then there exists an answer set of the ASP program .

## 5 Computing minimal entailment

The -minimality condition on models can be reformulated for the answer sets of the ASP encoding. For a knowledge base and a query of the form or