literals or modal K*-atoms* while atoms of the form not A **are called** *negative literals* or *modal* not*-atoms***. A rule** r is *positive* if m **= 0 and a** *fact* if n = m **= 0. A** *program* P **is a finite set of MKNF rules and a** *hybrid MKNF knowledge base* K **is a pair** (O,P).

In Definition 1, the modal operators of MKNF logics are only applied to **atoms in**
the rules, which might indicate that it would suffice to use a simpler logic that does not deal with the application of the modal operators to complex formulae. However, for defining the meaning of these hybrid knowledge bases, modal operators do need to be applied to complex formulas, namely to the whole ontology O **(cf. Definition** 7). Intuitively, a hybrid knowledge base specifies that: for each rule of the form (5)
in P, the atom H is known if all the Ai are known and none of the Bj **is known; and**
that the whole ontology O is known (i.e. K O**). As such, using the more general**
MKNF logic eases the definition of the semantics of hybrid knowledge bases, so similarly to (Motik and Rosati 2007) and (Knorr et al. 2008), we resort to the full MKNF logic (Lifschitz 1991).

For decidability DL-safety is assumed, which basically constrains the **use of**
rules to individuals actually appearing in the knowledge base under consideration. Formally, an MKNF rule r is *DL-safe* if every variable in r **occurs in at**
least one non-DL-atom K B occurring in the body of r**. A hybrid MKNF knowledge base** K is *DL-safe* **if all its rules are DL-safe (for more details we refer to**
(Motik and Rosati 2007)).

The well-founded MKNF semantics, *MKNF*W F S **, presented in (Knorr et al. 2008),**
and further developed in (Knorr et al. 2011), is based on a complete **three-valued**
extension of the original MKNF semantics. However here, as we are **only interested in querying for literals and conjunctions of literals, we limit ourselves to the**
computation of what is called the well-founded partition in (Knorr et al. 2008): basically the atoms that are true or false. For that reason, and in correspondence to logic programming, we name this partition the well-founded model. First, we recall some notions from (Knorr et al. 2008) which will be useful in the definition of the operators for obtaining that well-founded model.

## Definition 2

Consider a hybrid MKNF knowledge base K = (O,P**). The** set of K*-atoms of* K,
written KA(K), is the smallest set that contains (i) all modal K**-atoms occurring in**
P, and (ii) a modal atom K ξ for each modal atom not ξ **occurring in** K.

Furthermore, for a set of modal atoms S, SDL **is the subset of DL-atoms of** S
(Definition 1), and Sb = {ξ | K ξ ∈ S}.

Basically KA(K**) collects all modal atoms of predicates appearing in the rules, and**
Sb just removes K **operators from the argument set** S.

To guarantee that all atoms that are false in the ontology are also false by default in the rules, we introduce new positive DL atoms that represent first-order false DL atoms, along with a program transformation making these new modal atoms available for reasoning with the respective rules.