Compositional Semantics for Description ... - Semantic Scholar

1 downloads 0 Views 375KB Size Report
(1-ary method) associated with husband-ofI has the value fredI at maryI. The meaning of data ...... 1] K. Apt, H. Blair, and A. Walker. Towards a theory of ...
Compositional Semantics for Description Knowledge Bases with Rules Mira Balaban Information Systems, department of industrial Engineering and Management Ben-Gurion University of the Negev P.O.B. 653, Beer-Sheva 84105, Israel [email protected] (972)-7-6472203

Abstract

Descriptions and Rules are di erent, complementary, essential forms of knowledge. Descriptions are analytic and closed; rules are contingent and open. The two forms can be integrated either by compiling one form within the other, or by constructing a hybrid framework. The hybrid solution keeps the modular independent status of each approach, but needs an underlying integration framework, in which a coherent compositional semantics can be de ned. In this paper we introduce an architecture for a hybrid knowledge base that integrates descriptions with expressive object-oriented rules. The knowledge base manages a database of explicit descriptions and facts, by consulting two separate reasoners: DL { The Description Languages reasoner, and R { The Rules reasoner. The architecture generalizes all existing hybrids of descriptions and rules. Its declarative semantics relies on F-Logic as an underlying semantics, and is consistent with the (sometimes only operational) semantics of existing hybrids. The contribution of this paper is in building compositional semantics, given as a collection of syntactic objects, for hybrid description knowledge bases. The compositional semantics conceives the role of a description knowledge base as a computational task, i.e., computing descriptions and predications (or rules). It respects the modularity of its components, allows them to operate under di erent semantical policies, and its variants enjoy di erent degrees of description-orientedness and openness.

keywords: Knowledge representation, Description languages, Rules, Hybrid knowledge bases, Compositional semantics, Object-oriented representation, F-Logic.

0

1 Introduction Descriptions and Rules are di erent, complementary, essential forms of knowledge. Descriptions are

analytic and closed; rules are contingent and open. Historically, descriptions and rules were developed along separate lines, by di erent communities. The two forms can be integrated either by compiling one form within the other, or by constructing a hybrid framework. The rst solution yields a coherent framework, but requires reconstruction of one approach within the other, and makes one approach subordinate to the other. The hybrid solution keeps the modular independent status of each approach, but needs an underlying integration framework, in which a coherent compositional semantics can be de ned. Description languages (DLs) is a collective name for knowledge representation formalisms that concentrate on the management of essential descriptive vocabulary. It rests on the observation ([10]) that the natural ontology for providing information about a domain requires the ability to de ne, organize, and use intensional entities that stand for concepts and roles in a domain. The main construct of DLs is the description, which is a complex term built on top of a xed set of description (terminological) operators, and denotes concepts or roles ( [7, 30, 42] ). The status of descriptions, and the emphasis on direct semantics is the major distinction between DLs to other logics in AI. Rules are added to Description systems on a procedural-operational basis (e.g., [36, 21]), as a means for extending their expressivity. There is no agreement on an integration framework, and the standard formal treatment is restricted to descriptions. Other approaches try to compile rules into the DL approach ([15]), or to extend a rules framework with a classi cation mechanism ([18, 14, 25]) In this paper we introduce compositional semantics for hybrid Description Knowledge Bases (DKB), i.e., description systems extended with a rules component. It respects the following principles:

 Modularity of the knowledge components: It assumes a given DL semantics DL, and a given rules semantics R.  Compositional semantics, i.e., the semantics is composed from the separate semantics of the knowledge components.

 Description oriented.  Preserve intrinsic properties of the knowledge components, e.g., openness for rules. The rules language is F(rames)-Logic ([22, 23]), a rather expressive object-oriented language. The compositional semantics is de ned as a collection of syntactic objects { description formulae and predications. The object-oriented nature of F-Logic is a key feature since both, the descriptions and the rules, are interpreted as subsets of F-logic ([6]). The rules component has the notions of concepts, roles, instances, membership, and inclusion, built into its semantics. The result is a symmetric construction, where DL depends on the description operators, R depends on the rules, and both are constructed from description formulae and predications. The compositional semantics suggests an architecture for a hybrid DKB, as described in Figure 1. The DKB includes two independent reasoners: DL { whose behavior is dictated by the description language semantics DL, and R { whose behavior is dictated by the rules semantics R. In particular, the two reasoners can operate under di erent semantical policies, e.g., the Open World Assumption (OWA) for DL, and the Closed World Assumption (CWA) for R. Problems of mismatch among the di erent components are avoided due to the common underlying semantics of F-Logic. While in query mode, the DKB manager dispatches queries to the two reasoners. The reasoners try to answer. If they succeed, they return an answer(s) to the manager. Intermediate results, obtained by one reasoner, can be used by the other. 1

R: Consults RULES

%. $

DKB MANAGER

D { A DATABASE of FACTS and DESCRIPTIONS

&$

DL : Consults DESCRIPTION OPERATORS

Figure 1: Architecture of a hybrid Descriptions KB In the rest of this paper we, rst, introduce description knowledge bases, including management of descriptions and of rules (Section 2). In Section 3, a declarative semantics for the hybrid DKB is introduced, including a short presentation of F-Logic (3.1), and of DLs as sorted F-Logic languages (3.2). Section 4 presents four di erent compositional semantics possible for the hybrid DKB framework, and compares their advantages and weaknesses, with respect to the stated above principles of hybrid integration. Section 5 is the conclusion and discussion of future research.

2 Knowledge Bases that Integrate Descriptions and Rules Descriptions are formulae that specify inclusion relations between concepts or between roles, and membership relations between individuals to concepts, and between pairs of individuals to roles. Concepts and roles are speci ed with a small set of description constructors, whose meaning is built into the speci cation language. A Descriptions Knowledge Base reasons about descriptions, based on a given terminology of concepts and roles, and by consulting a collection of rules. Another form of integration of descriptions and rules appears when a rule base is strengthened with a terminology. In the former case, the rules enable the inference of new descriptions; in the latter case, the descriptions enable the inference of new facts. In this section we introduce Description Languages, and describe the two forms of their integration with rules.

2.1 Description Languages Description languages form a spin-o of the KL-ONE school ([12, 43]), that concentrates on languages that provide constructs for management of analytic domain terminology. DLs emphasize the importance of direct, well de ned semantics, and of a limited, but tractable, inferential service. A typical terminology consists of concepts and roles, which stand for subsets and binary relations over a domain of individuals, respectively. The concepts are assumed to form a taxonomy, i.e., a partially ordered structure that is derived from the lattice of subsets. Accordingly, the alphabet of a DL includes an unlimited supply of symbols for concepts, roles and individuals, and a small set of term forming operator symbols (description constructors). Descriptive terms are formed by applying term forming operators to concept/role symbols. For example, the concept of a mechanical plant, i.e., a plant that produces only mechanical products, can be described by the concept term:

and( plant; all(produces; mechanical product)) where, and and all are description constructors, plant and mechanical plant are concept symbols, and produces is a role symbol. A typical DL knowledge base has two distinguished components: An intensional component, called Tbox, where a terminology of de ned and primitive concepts and roles is introduced, and an extensional component, called Abox, that describes individual members of concepts, and role relationships that hold between individuals. Terminological de nitions provide necessary and sucient conditions 2

D Tbox DEFs cn =: c rn =: r

Abox C members R members o2c (o1 ; o2) 2 r

PRIMITIV ES c 1  c2 r 1  r2

Figure 2: The Structure of a Typical DL KB. for membership in a concept or in a role, while primitive speci cations provide only necessary conditions. The overall structure of a typical DL knowledge base is given in Figure 2. Table 1 presents a particular descriptions KB. The Tbox includes 8 primitive concepts, 3 primitive roles, and 2 de ned concepts. The plant concept is introduced as a primitive concept, whose members can be located at only in places. The produces role is introduced as a primitive role, that can hold only between plants to products. The mechanical plant concept is de ned as a plant that produces only mechanical products, and the risky place concept is de ned as a place where some toxic waste is buried at. Description languages vary by their sets of description constructors. Henceforth, we denote a DL with a set of constructors P , by LP .

Formal De nition of a Description Language LP Syntax: Symbols of the language: Primitive concept symbols (cp), concept name symbols (cn), primitive role

symbols (rp), role name symbols (rn), object symbols (o), two special concept symbols, top and bottom, and a nite set P of concept and role forming operators. Terms: Terms are either concept terms, or role terms. Concept/role terms are all concept/role symbols, and all syntactically legal applications of a concept/role forming operator to terms, respectively. A concept term of any kind is denoted c, and a role term of any kind is denoted r. Formulae1: cn =: c; rn =: r; c1  c2; r1  r2; o 2 c; ( o1; o2) 2 r. The primitive introductions (formulae with ) allowed in the terminology component are, usually, restricted to primitive symbols alone (left side must be a primitive symbol). Semantics: Meaning of formulae is given by a set theoretic semantics. An interpretation I is a pair (D, ), of a domain D and an interpretation function , such that concept symbols are assigned subsets of D, role symbols are assigned binary relations over D2, object symbols are assigned elements of D, (top) is D, and (bottom) is ; (the empty set). The interpretation function  is augmented to all concept/role terms by building into it a xed meaning for each operator in P. For example, for P = f and, all, some, and-role, inverse g, the meaning of concept terms is de ned as follows:3

Di erent notations have been used in the DL literature. Primitive de nitions have been denoted also using v or :< ; membership have been denoted also using : or :: ; ) was also used for denoting subsumption. The above formulation follows the notation in [37]. 2 In [11], role symbols are assigned total functions from D to P (D). This interpretation of role symbols is somewhat closer to the F-Logic view of methods. 3 We view relations as set-valued functions, whenever it simpli es the presentation. For a role symbol r and a domain element d, (r)(d) denotes the set of all domain elements related to d via (r), i.e., the set f e=(d; e) 2 (r) g. 1

3

Kind No. Description in words Tbox Primitive- t1) product is a top concepts t2) place is a top t3) waste is a product t4) radioactive material is a product t5) plant is a top, located at somewhere t6) dangerous plant is a plant t7) A radioactive material that is also a waste, is a toxic waste Primitive- t8) produces is a relation between roles objects and products t9) A product may be buried at a place

De nedconcepts Abox Conceptmembers Rolemembers

t10) located at is a relation between objects and places t11) A mechanical plant is a plant that produces only mechanical products t12) A risky place has some toxic waste buried in it a1) a2) a3) a4) a5)

description

product  top place  top waste  product radioactive material  product plant  and(top; some(located at; top)) dangerous plant  plant and(radioactive material; waste);  toxic waste produces  range(product) buried at  and(domain(product); range(place) ) located at  range(place) mechanical plant =: and(plant; all(produces; mechanical product)) risky place =: some(inv(buried at); toxic waste) pl 2 mechanical plant w 2 and(waste; radioactive material) (pl; pr) 2 produces (w; dp) 2 buried at (pl; dp) 2 located at

pl is a mechanical plant w is a radioactive waste pl produces a product pr w is buried at dp (dump) pl is located at dp

Table 1: A Descriptions Data Base; intensional descriptions and extensional assertions

4

( and( c1, c2 ) ) = (c1) \ (c2) ( all( r, c ) ) = f d 2 D=(r)(d)  (c) g ( some( r, c ) ) = f d 2 D=(r)(d) \ (c) 6= ; g ( and-role( r1, r2 ) ) = (r1) \ (r2) ( inverse( r ) ) = f (d; e) 2 D  D=(e; d) 2 (r) g Satisfaction of formulae in an interpretation is de ned by interpreting =: as set equality,  as set inclusion, and 2 as membership over D. An interpretation is a model for a set of formulae if it satis es all formulae. A formula is logically implied from a terminology T, i.e., T j= , if it is satis ed in every model of the terminology. A concept term t is coherent with respect to a terminology T, if there exists a model (D; ) of T, such that (t) 6= . The main relationship between terms is the subsumption relation: Term t1 is subsumed by term t2 ( t1 v t2 ) in a terminology T, if and only if in every model (D; ) of T, (t1)  (t2 ). Equivalence of terms is de ned as two way subsumption. Proposition 2.1 t1 v t2 in T, i T j= t1  t2 . Description knowledge bases answer queries about the inter-relationships between concepts/descriptions, about the properties of concepts and individuals, and about membership of individuals in concepts. The subsumption relationship plays a major role in query answering, as most queries can be phrased as subsumption queries. For example, the query: Is a plant, necessarily located at a place? is rephrased as the subsumption query: ?plant v all(located at; place) The answer is true, since the range of the role located at is place, and a plant is located at somewhere. Similarly, the descriptions data base of Table 1 implies the subsumption risky place v place , since the domain of the role inv(buried at) is place. It also implies pr 2 mechanical product, and dp 2 risky place. The rst results from pl being an instance of mechanical plant, and producing pr. The latter holds since w is a toxic waste ((a2); (t7)), that is buried at dp (a4). In the normalize-compare approach, used in CLASSIC ([7]) and BACK ([28, 29]), the knowledge base is kept as a classi ed taxonomy of normalized concept descriptions. A query is answered by augmenting the taxonomy with the concepts of the query, and checking for their relative positions in the taxonomy. A di erent, constraints-based approach ([39], KRIS [2], CRACK [13]), reduces subsumption to the problem of coherency. Major e orts were devoted to the study of the subsumption problem in the context of di erent terminologies ([24, 34, 38, 33]), to the study of subsumption/classi cation algorithms in existing systems ([5, 31]), and to the development of subsumption algorithms ([36, 20, 39]. These research e orts show that subsumption is tractable only if the set of term constructors is severely limited. Inferencing in DLs is essentially di erent from standard inference in AI, or in logic databases, that operate under the Closed World Assumption (CWA). The main point of diversion is that DL systems consider de nitions in the vocabulary, not a temporary population in a knowledge base. For example, the above query, in a typical AI or database context, would have been formulated as a query about the individual members of plant: Are all objects to which a plant is related by the role located at, members of the place concept? DLs can be understood as operating under the Open World Assumption (OWA), where a momentary population in a knowledge base does not provide sucient evidence on essential de nitions in the terminology. DLs are unique in developing knowledge bases for essential domain vocabularies. 5

Kind No. Description in words rules r1 The MECHANICS:LTD company constructed only machnical plants during 1995. r2 If a plant is located at a risky place, it is a dangerous plant.

fact

f1

rule

X 2 mechanical plant ? constructed(X; mechanics:ltd; 1995): Y 2 dangerous plant ? Y 2 plant; (Y; X ) 2 located at; X 2 risky place: pl was constructed by MECHANICS:LTD during 1995. constructed(pl; mechanics:ltd; 1995): Table 2: A rules component

2.2 Rules A rule is a formula of the form:

A0 ? A1 ; : : :; An: (n  0) where A0 is a description formula or a rst order logic atom ( p(t0; : : :; tn ), p being a predicate symbol, and the ti s are terms ), and Ai (1  i  n) is a literal, i.e., a description formula or its negation, or an atom or its negation. Rules with n = 0 are called facts and in a hybrid integration of rules and descriptions, it

is reasonable to consider them as part of the extensional Abox. The integration of rules and descriptions is expected to extend their separate inferential capabilities. For example, consider the following integration: Descriptions data base: Table 1 without the assertion (a1). Rules: Table 2. Consider the query \Find a mechanical product that is produced by a dangerous plant": ?X 2 and( mechanical product; some(inv(produces); dangerous plant)) The answer pr holds only in the integrated knowledge base. The rules component (henceforth R) implies, using (f 1) and (r1), that pl is a mechanical plant, and the descriptions component (henceforth DL) implies, by t11, that pl is a plant, and by (t11); (a3), that pr is a mechanical product. DL infers, from (t7) and (a2), that w is a toxic waste, and from (t12), that dp is a risky place (since by (a4), (dp; w) 2 inv(buried at)). Now R can infer, using (a5) and (r2), that pl is also a dangerous plant. Eventually, DL infers, using (a3), that pr is in some(inv(produces); dangerous plant). When the description formulae are restricted to o 2 cn , or X 2 cn , or (o1 ; o2) 2 rn , or (X1; X2) 2 rn , the rules can be interpreted as in Logic Programming (see [14, 18, 25], where concept/role symbols are interpreted as 1-ary/2-ary predicate symbols, respectively). In the next section we suggest a uniform declarative semantics for the hybrid integration of descriptions and rules, based on F-Logic as an underlying semantics. In that framework, the rules are simply F-Logic rules, and are interpreted by semantic structures of F-Logic.

2.2.1 Rules in Existing Systems In this subsection we shortly describe speci c rule sets that were studied in the literature, or implemented in description based systems. 1. BACK and CLASSIC: The BACK ([28, 29]) and CLASSIC ([7]) systems allow rules of the form:

X 2 c0 ? X 2 c 1 6

In CLASSIC, the antecedent, i.e., c1 must be an already classi ed concept description. The rules in both systems do not apply to the terminology, and are not made part of the subsumption reasoning. They are used in a forward chaining manner, to propagate membership information about individuals. Rule propagation can lead to contradictions. In that case, the systems reject the membership assertion that triggered the rules. 2. AL-log [14], CARIN ([25, 26]): In these works, descriptions are added to DATALOG (function free) rules in a Constraints Logic Programming style. Rule heads cannot be description formulae, but the atoms in a rule body can be description formulae, of a restricted type. In AL-log, a rule body can include a membership in a concept formula: X 2 c, or o 2 c. In CARIN, the description formula in a rule body can also be a membership in a role formula: (X1; X2) 2 r or (o1; o2) 2 r. In these works complexity limits on the combination of rules and descriptions are studied, and inference algorithms are introduced.

3 Declarative Semantics The semantics of an integrated Descriptions + Rules knowledge base is de ned over a partially ordered domain of entities, related by a subset and membership relationships. Further relationships among entities are captured either by methods of entities, or as standard relations. The intended meaning of description operators (e.g., and, all) is not built into the semantics, and needs to be axiomatized (as an \oracle" for the DL component, see below). The main advantage of this semantics is in supporting a truly hybrid (modular) architecture: Each component is directly interpreted, independently of the other. The Rules component logically implies descriptions and facts, based on the known descriptions and facts, its set of rules, and the built-in meaning of subset, membership, and methods. The Descriptions component logically implies descriptions, based on the known descriptions, its description oracle, and the built-in meaning of subset, membership, and methods. The semantics that we suggest in this chapter is that of F-Logic ([22, 23]). Both components appear to be natural subsets of F-Logic, and can be interpreted by its semantic structures. First, we shortly describe F-Logic and de ne DLs as sorted F-Logic languages. Then we de ne a declarative semantics for the hybrid architecture.

3.1 F-Logic An F-Logic domain U consists of objects and methods. In addition, there are object constructors, which are functions de ned on objects, a partial ordering U on objects, that stands for the subset relationship, and a binary relation 2U on objects, that stands for the membership relationship. A condition set on U and 2U guarantees that membership in an object is extended to a super-class object. The underlying intensional approach assumes that the \essence" of an object lies in its behavior. Hence, objects can be just anything that we wish to talk about, like Mary , Mary 0 s car, the cars of Ben-Gurion University employees, and the role of being a mother. In particular, there is no a priori distinction between individual to class objects, i.e., an object can be both, depending on its behavior/relationship to other objects. If o1  o2, then o1 is understood as a subset of o2 ; if o1 2 o2 , then o1 is understood as a member of o2 (the subscript U is omitted, for simplicity). This approach is particularly powerful, since a collective entity can be viewed, both, as a class of objects, and as an individual object, that can be a member of another (class viewed) object. Another advantage is that a singleton is identi ed with its member. For example, the following

7

\chains" of 2,  relations can be present in U :

(

student maryAsChild  mary 2 studentCommittee  2 univCommittee Of course, a distinction between individuals to classes (concepts), and other distinctions can be enforced by imposing sorts. Methods are partial functions on objects. There are single-valued (scalar) and set-valued methods. Methods describe the behavior of objects, and provide information about objects. For example, spouse-of, children-of, and information on a bank-account, can be captured by methods. The children-of method is an example of a method that takes additional arguments: \children-of an object o1 with another object o2 ", is an application of the method on o1 , with o2 as an extra argument (or in the context of o2 ). A method like spouse-of, that does not take additional arguments (i.e., a function of one argument) is called an attribute. Name-of, age-of, address-of, are, all, attributes. Methods that describe actions, like buy, meet, treat, etc., can typically take additional arguments, for all the parameters of the actions. These are n-ary functions (n > 1). Methods are also classi ed into inheritable and non-inheritable. For example, color is an inheritable attribute of bear, averageSalary is a non-inheritable attribute of faculty , and children-of is a non-inheritable set-valued method of Mary (since various specializations of Mary , e.g., MaryAsChild need not inherit the value of children-of at Mary ). The inference machinery uses the distinction between inheritable to non-inheritable methods for propagating values of inheritable methods, down the  hierarchy, as long as no overwriting is caused. Inheritance extends also into the 2 relationship, but is blocked after one step. This way, Mary , being a student, inherits the registered-in-college attribute-value pair, while its MaryAsChild specialization does not inherit this property; studentCommittee can inherit the committeesize property of univCommittee, but inheritance does not extend to Mary. The following table summarizes the correspondence between DL roles to F-Logic methods: DLs n-ary feature n-ary role (binary) feature (binary) role

F-Logic single-valued method set-valued method single-valued attribute set-valued attribute

3.1.1 F-Logic Syntax

The terms of F-Logic are expressions that denote objects in the domain. For example, mary , 3, and(polygon, 3Sides), and(polygon, 3Angles), cars-of(employees(bgu)), are id-terms, denoting objects. The id-terms and(polygon, 3Sides) and and(polygon, 3Angles) may denote two distinct intensional objects with the same extension, i.e., the set of triangles. In the above id-terms, and, employees, and cars-of are object constructors: They denote total functions on the domain U , that map objects to objects. Variables can also appear in id-terms, as in classical rst order logic (we use capital rst letters to denote variables). The atomic formulae of F-Logic, called F-molecules, are of three kinds: is-a F-molecules, data Fmolecules, and signature F-molecules. 1. Is-a F-molecules map to the partial ordering, and to the membership relation on U . For example,4 4

We use the DL symbols  and 2 instead of the F-Logic symbols :: and :, respectively.

8

Is-a F-molecules mary 2 woman woman  person and(polygon, 3Sides)

 polygon

Meaning The object denoted by mary is 2U related to the one denoted by woman. The object denoted by woman is U related to the one denoted by person. Subset relationship (U ) between the denotations of the two id-terms.

2. Data F-molecules are assertions about the values that methods (features, roles) get on objects. For example: Data F-molecules mary[ husband-of ! fred ]

Meaning Fred is Mary's husband.

Explanation husband-of is an attribute-.

bear[ color ! grey ]

Bears are grey.

color is an inheritable attribute-.

mary[ teach !! faut., graph.g] Mary teaches aut. & graph. bear[ color @ north ! white] Northern bears are white. son(m)[children@j !! fpatg]

feature feature

teach is an attribute-role. color is an inheritable non-. attribute-feature Pat is a child of m's son with j. children is a non-attribute-role.

3. Signature F-molecules are assertions about the types of features and roles. For example, X[ husband-of ) (male) ] X[ children @ Y )) (person) ] where X and Y are assumed to be universally quanti ed, assert that values of the husband-of feature must be males, and the values of the children role must be of type person. The rule: X : and( female, married ) ? X[ husband-of ) () ] where X is assumed to be universally quanti ed, asserts that if the feature husband-of applies to an object o denoted by X, then o must be a member of the and( female, married ) class, i.e., a married female. F-Logic includes also regular predication formulae of a rst order language. Its formulae are constructed using connectives and quanti ers in the usual rst order manner.

3.1.2 Semantics Methods are rei ed by objects of the domain in a semantic structure. The rei cation is accomplished by associating, with each object, a feature (or actually, in nity of features, one for each arity), a role (again in nity), an inheritable feature (in nity), an inheritable role (in nity), a type for the feature (in nity), and a type for the role (in nity). We can think about an object d of U as an association: ( d, array-of-features, array-of-roles, array-of-inheritable-features, array-of-inheritable-roles, array-of-featuretypes, array-of-role-types ) Features, roles, and their types are always referenced indirectly, via their object-names in U , and the 9

speci ed arity. This is the \secret" behind the high-logization of F-Logic: Features, roles and types are rei ed by their object-names, and quanti cation over them is carried just over their object-names. The association is given by six functions, I! , I!! , I! , I!! , I) , and I)) , that assign to an object d the six mentioned above arrays of features, roles, inheritable-features, inheritable-roles, types-of-features, and types-of-roles, respectively. (I!(k) denotes the k+1 element of I! , for k0; the superscript corresponds to the number of additional arguments that the feature/role takes, besides d.) A semantic structure for an F-Logic language is a tuple I = hU; U ; 2U ; IF , I! ; I!! , I! ; I!! , I) ; I)) i, where (U; U ), and 2U are the partially ordered domain, and the membership relation, as described in the previous section. IF is the interpretation mapping for object constructors, a standard function mapping. The other six mappings are the associations of domain objects with features, roles, and types, as explained above. Is-a F-molecules are assertions about subset relationships (U ) and membership relationships (2U ) between objects denoted by id-terms in the molecule. Data F-molecules are assertions about the value of a feature or a role at a given object. In a data F-molecule with a non-inheritable-feature:

o[f @arg1; : : :; argn ! val]; o; f; arg1; : : :; argn; val, are id-terms. In a given semantic structure and variable assignment I, the id-terms o; arg1; : : :; argn, val, are mapped to objects of the partially ordered domain ( U , U ). The id-term f is mapped to the non-inheritable feature with n arguments, associated with the object to which the symbol f is mapped, i.e., to I!(n)( f I ). The term is true in I if I!(n)(f I ) is de ned in ( oI ; arg1I; : : :; argnI ) and equals valI. For example, I j= mary [ husband-of ! fred ], means that the non-inheritable feature attribute (1-ary method) associated with husband-of I has the value fredI at mary I .

The meaning of data F-molecules with non-inheritable-roles, that make assertions about role values, is similar: I j= o[r@arg1; : : :; argn !! fval1; : : :; valng] n) (rI ) is de ned at ( oI ; arg I ; : : :; arg I ), and its set value includes the set f valI ; : : :; valI holds in I if I!(! n n 1 1 g. The meaning of inheritable data F-molecules is de ned similarly, using the ! and the !! mappings. Inheritable data F-molecules are used to select a preferred (canonical) model for an F-Logic program. The rational behind the preference criterion is that inheritable features/roles should, preferably, propagate down the U hierarchy in an interpretation, to objects where their values are unde ned. The propagation is blocked by the 2U relation, where a single step inheritance can still apply. Signature F-molecules assign types to features and roles. A signature F-molecule with a feature:

(1)

o[f @arg1; : : :; argn ) (val1; : : :; valm)];

serves as a typing expression for two kinds of applications of f I : Application of f I , as a non-inheritable feature, to objects o0I that are members of oI , and applications of f I , as an inheritable feature, to objects o0I that are subclasses of oI . Signature F-molecules with roles account for the typing of non-inheritable and inheritable data F-molecules with roles, in a similar fashion. The type correctness conditions, enforced on F-Logic programs, requires that all feature/role data F-molecule are correctly typed by all signature F-molecules that can serve as their typing expressions.

Herbrand Models { Concepts needed for the Compositional Semantics: The Herbrand universe

of an F-Logic language is the set of its ground id-terms. The Herbrand base of the language is the set 10

of its ground molecules. A Herbrand structure (H-structure) is a subset of the Herbrand base, that is closed under logical implication. This requirement is needed since ground molecules may imply other molecules, based on the built-in meaning of language symbols like 2; ; !; ). Satisfaction of formulae by H-structures, and Herbrand models (H-models), are de ned as usual.

3.2 DLs { as sorted F-Logic Languages

Let P be a ( nite) set of description operators. We de ne LP , a description language with description operators in P , as a sorted, rather restricted, F-Logic language. The de nition is independent of P .

Syntax:

1. Symbols: P { a nite set of description operators. C { a set of concept symbols. C = Cp [ Cd [ ftop; bottomg, where Cp is the set of primitive concept symbols, and Cd is the set of de ned concept symbols. R { a set of role symbols. R = Rp [ Rd , where Rp is the set of primitive role symbols, and Rd is the set of de ned role symbols. O { a set of individual symbols (also called object symbols). S { a set of three sort symbols: fconcept; role; individualg. { a sort assignment. : C ! fconceptg, : R ! froleg, : O ! findividualg; an nary operator in P is assigned a sort in the form of an n + 1 tuple over S. For example, (all) = (role; concept; concept). 2. Well-Sorted Terms: All concept, role, and object symbols are terms; their sorts are given by . Complex terms are formed by well sorted applications of description operators to terms. A complex term op(t1 ; : : :; tn ), where (op) = (s1; : : :; sn+1 ), is well sorted if the sort of ti (1  i  n) is si . The sort of the term is sn+1 . Below we use c; r; o to denote concept, role, and individual (object) terms, respectively. De ned concept or role symbols are denoted cd and rd , respectively. 3. Formulae:

   

cd =: c; c1  c2 ; o 2 c; 8ind X; Y; (X [rd !! fY g]  X [r !! fY g]);5 Syntactic shortcut: rd =: r. 8ind X; Y; ( X [r1 !! fY g] ?! X [r2 !! fY g]); Syntactic shortcut: r1  r2. o1 [r !! fo2g]; Syntactic shortcut: (o1 ; o2) 2 r.

Semantics:

The semantics of LP , as an F-Logic language, is de ned over a partially ordered domain U , with a greatest and a least elements, where terms are mapped to elements of U , and the symbols top and bottom are assigned the greatest and least elements, respectively. Formulae are interpreted by interpreting =: and  between concept terms as equality and the partial ordering, respectively; 2 between an object term (usually a symbol) and a concept term is interpreted as the membership binary relation over U ; =: and  between role terms are interpreted as methods' equality and implication, respectively; 2 between a pair of object terms (symbols) and a role term is interpreted as a method's value assertion. 5

The subscribed quanti er \8ind " quanti es over the sort of individuals.

11

The intended meaning of the description operators is given by an F-Logic theory FLP , called the corresponding theory for LP . FLP is not part of LP . Its main property is that it provides equivalence with the standard set-theoretic semantics of description languages. That is, for every set of formulae ?, and a formula in LP : DL FL ? j= iff FLP ; ? j= ; DL

FL

where j= denotes logical implication under the set-theoretic semantics of description languages, and j= denotes logical implication in F-Logic. For further details consult [6], where a corresponding theory for P = fand, all, at-least1, and-role g is given. A major result of [6] is that given a corresponding theory FLP to LP , the semantics of F-Logic provides a full account to LP , i.e., it correctly simulates logical implication and subsumption relations, while preserving the direct semantics.

Corollary 3.1 Let t ; t be terms of LP , and FLP an F-Logic's theory that corresponds to LP . Then, FL t v t in a terminology ? i FLP ; ? j= t  t . 1

1

2

2

1

2

3.3 Declarative Semantics for the Hybrid Architecture Given a hybrid knowledge base, as described in Figure 1. Let LP be the language of descriptions in D, FLP be its corresponding F-Logic theory, and RULES be the set of rules that R consults. Then, the models of the hybrid knowledge base are de ned as the F-Logic models I such that:

I j= D [ RULES [ FLP That is, a formula is true in the hybrid knowledge base if it is logically implied from D [ RULES [ FLP . The declarative semantics provides criteria for inference tools (soundness and completeness). It does not provide any hint about the nature of the computational tools, their behavior, and the kind of expected queries. It is important that the semantics carries a closer relationship with the inference mechanism since it enables a ner design of the latter. In the following section we introduce an alternative Compositional Semantics, which is sound with respect to the declarative semantics. The compositional semantics gets closer to computational tools with respect to the following four properties: 1. Modularity: The DL and R reasoners should keep their independent status. The knowledge base should be able to provide separate services, based on the DL or the R reasoners. The DL and R reasoners can operate by di erent policies, e.g., CWA for R and OWA for DL. 2. Compositional behavior: The knowledge base should be able to compose its separate DL and R services with, possibly, other reasoning services, to form its compositional behavior. Its semantics should be composed from the separate semantics of DL and R. 3. Description-Oriented account: The description is a major kind of query to which the knowledge base is expected to provide answers. Di erent query behaviors should be re ected in the semantics. 4. Preserve component properties: An intrinsic property of the rules component is its frequent modi cations, since it accounts for the non-analytic expert knowledge. Tolerance to modi cations and additions is desirable.

12

D " & R = R semantics j DL = DL semantics & j . DL [ R

.

Figure 3: The structure of the compositional semantics

4 Compositional Semantics for a Description Knowledge Base In this section we introduce compositional semantics for description knowledge bases, i.e., for knowledge bases were a rules component is added to a DL component, in order to enrich its description inferential capabilities, as well as to infer new facts. The compositional semantics is de ned as a set of syntactic objects, and not in model-theoretic terms. We nd this approach more directly related to the computational tasks of the knowledge base. The compositional semantics is constructed by iteration of the separate semantics DL and R of the DL and the R reasoners, respectively. DL and R are also sets of syntactic objects. This way the principles of modularity and Compositionality are kept. The compositional semantics is visualized in Figure 3. The general structure of the compositional semantics is as follows: De ne:

T (KB) def = DL [ R

and

T 0(KB) = KB 0 { semantics dependent initial version of KB. T k+1 (KB) = T (T k (KB)) k  0 1 [ T ! (KB) = T k (KB) k=0

DFL(KB) def = T ! (KB ) Restriction: The compositional semantics is de ned for a hybrid architecture with a restricted rules component: The description formulae in a rule cannot be the role descriptions r  r or r =: r . The Then:

1

2

1

2

reason is that we wish that the set of rules RULES will be a set of F-Logic rules, and the role formulae are shortcuts for F-Logic rules themselves, not for F-Logic atoms. Note that in terms of F-Logic, D is a de nite positive logic program. The exact nature of the syntactic objects is a major decision in the design of the compositional semantics. Following the theorem-proving and logic-programming tradition, it is natural to take the syntactic objects as ground atoms of the underlying F-Logic formalism. This yields the H compositional semantics. However, this semantics is not description-oriented since it does not account for role descriptions (which are not atoms in F-Logic). Removing the limitations of the Herbrand style semantics, leads to a compositional semantics made of ground descriptions. These are the F and the singleF semantics. Further expressive power and openness with respect to the rules component is obtained in the OF semantics, where the compositional semantics is made of descriptions (not necessarily ground). The expressivity relationships between the four semantics are: H  F = singleF < OF 13

with the reservations that F = singleF holds only when the R reasoner consults a set of de nite positive rules, without negation, and the OF semantics is de ned only for an R reasoner that consults a set of de nite positive rules. The semantics F , singleF , and OF share a common semantics for the DL reasoner, that maps a set of ground descriptions into a larger set of ground descriptions. The semantics of the R reasoners in F , singleF and OF are given in terms of the underlying F-Logic formalism. They are de ned, each, by repeated applications (possibly in nite) of an operator(s), that depend on the set of rules RULES , and on the database D. This is a realistic assumption, since it is satis ed by most conventional semantics of logic programs. In particular, this characterization is satis ed by the ground least fixpoint semantics ([16]) and the unfloding semantics ([8]) of de nite positive logic programs, and by the iterated fixpoint semantics ([1]) of strati ed de nite logic programs with negation. In the BACK and CLASSIC systems, only the DL component is provided with a declarative, formal semantics. The overall combination of descriptions and rules is only operationally described. The F (= singleF ) compositional semantics seems to correctly account for rule propagation in BACK and CLASSIC. Both systems are sound with respect to F , and we suspect that CLASSIC is also complete, due to the completeness of its declarative component.

4.1

H { A Herbrand Model Based Semantics of Atomic Descriptions The H semantics is constructed from F-Logic Herbrand models of a gradually increasing database D, of atomic descriptions and facts. 1. DLH { Semantics of DL: Let S be a set of F-Logic ground molecules. Then:

DLH (S ) = \fH j H is a Herbrand model of D [ S [ FLP g 2. RH { Semantics of R: The H semantics assumes that the rules reasoner R is provided with an intended Herbrand model semantics. Let S be a set of F-Logic ground molecules. Then:

RH (S ) = The intended Herbrand model of D [ S [ RULES 3. Compositional semantics: De ne:

TH (S ) def = DLH (S ) [ RH (S )

and

TH 0(D) = D=atom, i.e., concept descriptions (formulae) in D.

Then:

H (D) def = TH ! (D)

Example 1 P = fallg

1) (a; b) 2 r 2) a 2 all(r; all(r; c)) RULES : a 2 all(r; all(r; all(r; Y ))) ? b 2 all(r; Y )

D:

Henceforth, we use the shortened notation allk (r; c) which stands for all(r; all(r; : : :; all(r; c) k times.

14

i=0 : i=1 :

TH 0(D) = D = D0 DLH (D0) = f (1); (2); 3)b 2 all(r; c) g RH (D0) = f (1); (2) g TH 1(D) = f (1); (2); (3) g = D1 DLH (D1) = D1 RH (D1) = f (1); (2); (3); 4)a 2 all3(r; c) g TH 2(D) = f (1); (2); (3); (4) g = D2

i=2 :

.. .

H (D) =

1 [ i=0

TH i(D) = f(1)g [ fb 2 allk (r; c) j 1  kg[ fa 2 allk (r; c) j 2  kg

2

Claim 4.1 The sequence TH (D); TH (D); : : : is an ascending chain of Herbrand structures. Proof: TH (D)  DLH (D )  TH (D)  DLH (D )  TH (D) : : : 2 0

0

1

1

1

2

2

Claim 4.2 H (D) is a Herbrand model of D and of RULES , but not necessarily of FLP . Proof: In Appendix A. 2

Note that H (D) is not necessarily a Herbrand model of FLP , since FLP may include wild formulae, depending on the intended meaning of operators in P .

4.2

F

{ A Ground Fixpoint Based Semantics of Descriptions

1. DLF { Semantics of DL: DLF (D) = fq j q 2 LP ; D [ FLP j= q g . Note that DLF (D) abbreviates rules in F-Logic. 2. RF { Semantics of R: RF considers the database D as a set of F-Logic rules. Its de nition depends on the syntactic structure of RULES . If RULES is a definite; positive logic program, then the operator used in the de nition of RF is the standard immediate consequences operator, TD[RULES 6: 1 [ (2) RF (D) = TD[RULES " i = TD[RULES " ! i=0

If RULES is a definite logic program with negation, and D [ RULES can be strati ed, then RF (D) can be de ned via operators (OD;RULES)i, one for each stratum, using, for example, the iterated xpoint approach ([1]). In either case, RF is based on a mapping on F-Logic H-structures. Note that since the database D can increase between successive applications of RF , each application uses a di erent operator. The set RULES is xed along the iterative process. 3. Compositional semantics:

6

De ne:

TF (D) def = DLF (D) [ RF (D)

and

TF 0(D) = D

Then:

F (D) def = TF ! (D)

Operator powers O " i are de ned in the regular way ([27]).

15

Examples: For Example 1, with RF de ned as in Equation 2 using the standard immediate consequences operator, the same iterations are obtained, i.e., TF i (D) = TH i (D); i  0. Example 2 P= fand-role, composeg D: 1)(a; b) 2 r 2)r  and-role(compose(r; r); r) RULES : (X; Y ) 2 compose(compose(R; R); compose(R; R)) ? (X; Y ) 2 compose(R; R) This rule can be written as the non-ground description:

compose(R; R)  compose(compose(R; R); compose(R; R)) It cannot be part of the database D since it includes variables. We assume that RF is de ned as in Equation 2, using the immediate consequences operator.

i = 0 : TF 0(D) i = 1 : DLF (D0 )

RF (D ) TF (D ) 0

.. .

1

0

= D = D0 = f(1); (2); 3)r  compose(r; r); 4)(a; b) 2 compose(r; r); 5)(a; b) 2 and-role(compose(r; r); r); : : :g = f(1)g = f(1); (2); (3); (4); (5); : : :g = D1

F (D) = f(1); (2); (3)g[ f(a; b) 2 composei (r; r) j i  1; where compose1(r; r) = compose(r; r); composei+1(r; r) = compose(composei(r; r); composei(r; r))g[ f(a; b) 2 and-role : : :g[ fr  and-role : : :g Note that in the rst cycle the R reasoner is not active; it waits for the DL reasoner, to untie for it description (2), based on the meaning of the and-role operator. F (D) does not include descriptions of the form composei (r; r)  composei+1 (r; r) (i  1), that are logically implied from D [ RULES [ FLP , since its R reasoner maps only H-structures. This limitation is removed in the OF semantics (see Example 5). The H semantics, for Example 2, is weaker:

H (D) = f(1)g [ f(a; b) 2 composei (r; r) j i  1g [ f(a; b) 2 and-role : : :g

2

Claim 4.3 The sequence hTF i(D)ii is an ascending chain. Proof: D = TF (D)  DLF [TF (D)]  TF (D)  DLF [TF (D)]  TF (D) : : : 2 0

0

0

1

1

2

De nition 4.4 RF (D) is called monotonic if D  D implies RF (D )  RF (D ). Clearly, the monotonicity of RF (D) depends on the F-Logic H-structures mapping used in the de nition of RF (D). If RF (D) is de ned as in Equation 2, then RF is monotonic. This is so, since if P  P then TP1 (I )  TP2 (I ) for any H-structure I , implying TP1 " !  TP2 " !. 1

2

1

2

1

16

2

Claim 4.5 If RF (D) is monotonic then TF (D) is also monotonic. Proof: Let D  D . TF (D )  TF (D ); since TF (D ) = DLF (D ) [ RF (D ); and TF (D ) = DLFP (D ) [ RF (D ); and we have DLF (D )  DLF (D ); and RF (D )  RF (D ). 2 1

2

2

2

1

2

1

2

1

1

2

1

1

2

The next theorem establishes the relation between the H and F semantics, based on the assumption that RH (D) = RF (D).

Theorem 4.6 If RF (D) is monotonic: Proof: In Appendix A. 2

F (D)  H (D).

Corollary 4.7 The minimal H-structure of F (D), denoted M [F (D)] includes H (D). Proof: M [F (D)]  F (D)=atom  H (D). 2 The other direction of Theorem 4.6 is M [F (D)]  H (D). We conjecture that indeed, this is so, at least for an R reasoner that uses a de nite positive logic program as its set of RULES . However, this direction of the inclusion may not hold between corresponding steps in the F and H construction since in the H construction the set of role formulae in D is xed, while in the F construction it may grow, by the DL reasoner. Hence, at individual steps the F construction may be richer.

4.3 SingleF { An Iteration Based Semantics of Descriptions The singleF semantics is a simpli cation of the F semantics, and is de ned only for F semantics whose R reasoner semantics is an in nite iteration of an operator OD;RULES , as, for example, in the case of the immediate consequences operator, for de nite positive logic programs (Equation 2). That is: 1 [ RF (D) = OD;RULES " i = OD;RULES " ! i=0

This restriction is necessary since in the singleF semantics the R reasoner applies its operator just a single step, at each iteration. This way, the singleF semantics avoids the \iteration over iteration" construction of F . The de nition of singleF is identical to F , except for the de nition of RF : 1. DLsglF (D) = DLF (D). 2. RsglF (D) = OD;RULES (M (D)). 3. TsglF (D) = DLsglF (D) [ RsglF (D) TsglF 0(D) = D singleF (D) = TsglF ! (D).

Example 3 The input for this example is the same as in Example 2, but the iterations of the R reasoner

obtain one description per iteration, not in nity. In the F semantics, the R reasoner obtains in nity of descriptions already at the second stage:

i = 2 : RF (D1) = f(1)g[ f(a; b) 2 composei (r; r) j i  1 g[ f(a; b) 2 and-role : : : g In the SingleF semantics we have: 17

i = 2 : RsglF (D1) = f(1); (4); 6)(a; b) 2 compose2 (r; r)g[ f(a; b) 2 and-role : : : g i = 3 : RsglF (D2) = f(1); (4); (6); 7)(a; b) 2 compose3 (r; r)g[ f(a; b) 2 and-role : : : g .. .

singleF (D) = F (D).

2 The following theorems establish the relationships between the F and the singleF semantics. The theorems hold for OD;RULES being the standard immediate consequences operator TP of de nite positive logic programs, since this operator is monotonic and continuous. Claim 4.8 The sequence hTsglF i(D)ii0 is an ascending chain. Proof: D = TsglF 0(D)  DLsglF [TsglF 0(D)]  TsglF 1(D)  DLsglF [TsglF 1(D)]  FsglT 2(D) : : :

2

Claim 4.9 If OD;RULES is monotonic, then RsglF and TsglF are also monotonic. Proof: As in the F semantics. 2 The following theorem shows that if the operator on which the RF semantics is based behaves \reasonably", then the singleF semantics is included in the F semantics. Theorem 4.10 If the OD;RULES is monotonic, and its application to M (D) is included in its in nite iteration, i.e., OD;RULES (M (D))  OD;RULES " ! , then: F (D)  singleF (D). Proof: In Appendix A. 2 The following theorem claims that if the operator on which the RF semantics is based behaves \continuously" on chains of description sets, then the singleF semantics includes the F semantics. Altogether, the two theorems state the necessary and sucient conditions for equality between the two semantics. Theorem 4.11 If the OD;RULES is monotonic, and for all ascending chains of sets of descriptions Di , 1 1 [ [ F (D)  singleF (D). where D = Di ; OD;RULES [M (D)]  ODi ;RULES [M (Di)], then: i=0

Proof: In Appendix A. 2

i=0

4.4 OF { A Non-Ground, Fixpoint Based Semantics of Descriptions, with an Open RULES Set

The semantical approaches described so far assume that a knowledge base is provided with a DL and an R reasoners, with xed behavior (semantics). This assumption is not realistic for R, since the rules set is the typical source of knowledge of expert systems, which can be incomplete and faulty. The xed rules set assumption in a changing environment presents two major problems: 1. The semantics of R with the rules set RULES1 [ RULES2 is independent from the semantics of R with rules sets RULES1 and RULES2. A natural expectation is that RRULES1[RULES 2 is derived from RRULES1 and from RRULES2 . 18

2. The R reasoner cannot infer descriptions that are not ground atoms, such as r1  r2. For example, assume that the rules set includes the two rules: (X; Y ) 2 r2 ? p: p ? (X; Y ) 2 r1 : If R includes the resolvent of the two rules, i.e., (X; Y ) 2 r2 ? (X; Y ) 2 r1; then since this derived rule is also the description r1  r2, it can be added to the descriptions database D, and used by the DL reasoner in the next round. The OF semantics augments the F semantics in the direction of an open set of rules. It is based on the s-semantics approach [8], where the semantics of a logic program is given by a set of, not necessarily ground, rules, that are resolvents of the given program. In the OF approach, ROF is a set of rules, that contribute both to the descriptions database D, and to the rules set RULES . Hence, between successive applications of the TOF operator, both, the database of descriptions and the set of rules can change (grow). The R reasoner becomes truly modular and open, and the DL and R reasoners become homogeneous in the type of their meanings. The OF semantics applies only to rules sets with positive de nite rules alone. In the OF semantics the DL and the R reasoners manipulate, at each moment, the current set of rules, and the current set of descriptions. That is, if at a certain point of time, the R reasoner consults RULES , and the descriptions database is D, then DL and R operate on DR = D [ RULES . DL yields new descriptions, and R yields new descriptions and rules. The results of DL and R are combined to generate the new set of descriptions and rules. OF di ers from F and from singleF in the semantics of the two reasoners. 1. The semantics of DL: The DL reasoner applies the regular DLF operator to the descriptions in DR. In order to extract the set of all descriptions from DR we de ne a non-ground version of LP : Let V ar = V arc [ V arr [ V aro be a set of variable symbols, whose symbols are appropriately sorted. Let NAME be the set of (sorted) symbol names in LP , and assume NAME \ V ar = ;. LVP ar is the DL with the set of symbol names NAME [ V ar and set of operators P . Clearly, LP  LVP ar . A substitution is a set of bindings, where a binding is a pair (v; t), where v is a variable and t is an LP term of the same sort as v . Di erent bindings in a substitution have di erent variables. For t 2 LVP ar and a substitution , t is t with all variables from  replaced by their corresponding terms. The descriptions in DR are selected in two steps: First, an operator D selects all rules that stand for descriptions in LVP ar ; then they are instantiated into ground descriptions. That is, for a set S of rules:

D(S ) = S \ LVP ar , kD(S )k = ft j t 2 D(S );  a substitution; t 2 LP g. Then, DLOF (DR) = DLF (kD(DR)k) 2. The semantics of R: The R reasoner computes all resolvents of DR. First, we de ne a sequence of sets of descriptions and rules, using the unfolding operator ([8]):

DR0 = DR DRi = unfDRi?1 (DR); i  1 Then,

1 [

ROF (DR) = DRi i=0

3. The compositional OF semantics: 19

TOF (DR) OF (D)

= DLOF (DR) [ ROF (DR) 1 [ = TOF i (D [ RULES ) i=0

Examples: In the following two examples, role relations that are obtained by the R reasoner, allow the

DL reasoner to obtain new descriptions, that could not be obtained otherwise.

Example 4 P: fatleast1g D: 1)c  atleast1(r1; d) RULES : 2)(X; Y ) 2 r2 ? p: 3)p ? (X; Y ) 2 r1: Denote: DR0 = D [ RULES . i = 0 : TOF 0(DR0) = DR0 i = 1 : DLOF (DR0 ) = D ROF (DR0) = DR0 [ f 4)r1  r2 g Since: DR00 = DR0 DR01 = unfDR00 (DR0) = f(1); (4)g DR02 = unfDR01 (DR0) = f(1)g TOF 1(DR0) = DR0 [ f(4)g = DR1 i = 2 DLOF (DR1 ) = DLF (f(1); (4)g) = = f (1); (4); 5)c  atleast1(r2; d); 6)atleast1(r1; c)  atleast1(r2; c); 7)atleast1(r1; d)  atleast1(r2; d)g 1 1 ROF (DR ) = DR Since: DR10 = DR1 DR11 = unfDR10 (DR1) = f(1); (4)g DR12 = unfDR11 (DR1) = f(1)g TOF 2(DR0) = DR0 [ f(4); (5); (6); (7)g = DR2 i = 3 DLOF (DR2 ) = f(1); (4); (5); (6); (7)g ROF (DR2) = DR2 TOF 3(DR0) = DR2 = OF (D)

2

Example 5 P= fand-role, compose, atleast1g D: 1)r  and-role(compose(r; r); r) 2)a 2 atleast1(r; c) RULES : 3)(X; Y ) 2 compose(compose(R; R); compose(R; R)) ? (X; Y ) 2 compose(R; R) Denote: DR = D [ RULES . 0

i = 0 : TOF 0(DR0) = DR0 i = 1 : DLOF (DR0 ) = f(1); (2); 4)r  compose(r; r); 5)a 2 atleast1(compose(r; r); c); : : :g 20

ROF (DR ) = DR TOF (DR ) = DR [ f(4); (5); : : :g = DR DLOF (DR ) = f(1); (2); (4); (5); : : :g ROF (DR ) = DR [ f (X; Y ) 2 composei(r; r) ? (X; Y ) 2 r j i  1g = DR [ f r  composei(r; r) j i  1g TOF (DR ) = DR [ f r  composei(r; r) j i  1g = DR DLOF (DR ) = f(1); (2); (4)g [fr  composei(r; r) j i  1g [ : : : [fa 2 atleast1(composei(r; r); c) j i  1g [ : : : ROF (DR ) = DR TOF (DR ) = DR [ fa 2 atleast1(composei (r; r); c) j i  1g = OF (D) 0

1

i=2

0

0

0

1

1

1

1

1

2

i=3

0

1

2

2

2

3

0

2

2

This example demonstrates the extra power of the OF semantics over the F semantics: The descriptions in fr  composei (r; r) j i  1g and in fa 2 atleast1(composei (r; r); c) j i  1g could not be obtained in Example 2. 2

Proposition 4.12 The operator TOF is monotonic. Proof: Straightforward result, from the monotonicity of DLOF and ROF . 2 Proposition 4.13 TOF (S )  S .

1 [

Proof: TOF (S )  ROF (S ) = Si  S = S . 2 i=0

0

The following theorem compares the OF semantics with the F semantics, when the R reasoner in the latter consults a de nite positive logic program as the set RULES , and is de ned with the standard immediate consequences operator TD[RULES , as in Equation 2. The theorem shows that in this case, the OF semantics is more powerful than the F semantics. Theorem 4.14 If RF is de ned as in Equation 2, then the OF semantics is more powerful than the F semantics. That is: F (D)  kD[OF (D)]k. Proof: In Appendix A. 2 The opposite direction to Theorem 4.14 does not hold. Example 4 is a counter example:  OF (D) = DR2 = DR0 [ f(4); (5); (6); (7)g.

 In the F semantics, we get for this example: TF (D) = D DLF (D) = D RF (D) = TD[RULES " ! = f(1)g TF (D) = D = F (D)  Hence: F (D) = f(1)g  f(1); (4); (5); (6); (7)g = kD[OF (D)]k. 0

1

The OF semantics is still not, truly, open, in the sense that the semantics of R with a rules set RULES1 [ RULES2 is obtained from its semantics with separate rules sets RULES1 and RULES2. 21

This openness feature can be obtained by further generalizing ROF with the assumption that the rules set is incomplete, as it is done in the -open semantics ([8, 9]). Another possible variation of the OF semantics is singleOF , in analogy to the singleF semantics. The de nition of, both, -OF and singleOF is straightforward.

5 Conclusion and Future Research { Inference, Inheritance, Complexity, and Implementation In this paper we introduce an architecture for a hybrid knowledge base that integrates descriptions with expressive object-oriented rules. The framework strengthens rules by an analytically de ned hierarchy, and strengthens descriptions by non-analytical implications. The rules language allows for concept inclusion, concept membership, and role membership formulae, anywhere in a rule. It includes the kind of rules used in BACK and CLASSIC, and the DATALOG rules of [14, 25]. The declarative semantics of the hybrid architecture relies on F-Logic as an underlying semantics, and is consistent with the operational semantics of BACK and CLASSIC, and with the above mentioned DATALOG{DL hybrids. In particular, the complexity and undecidability results of [26] hold. The contribution of this paper is in building compositional semantics for hybrid description knowledge bases, and in the investigation of di erent variants of such semantics. The compositional semantics respects the modularity of its components, and its variants enjoy di erent degrees of description-orientedness and openness. All variants are sound with respect to the declarative semantics, but the principles of modularity and compositionality impose various restrictions on the interaction between the components. The objectoriented nature of the rules language is a key point in the compositional semantics, since both components of the knowledge base recognize the notions of concepts, roles, instances, membership, and inclusion. The components di er in having the description operators built into the semantics of the DL component, and having the rules built into the semantics of the R component. The compositional semantics conceives the role of a descriptions knowledge base as a computational task, i.e., computing descriptions and predications (rules, in the case of the OF semantics). The description-oriented semantics, and the open OF semantics are a natural outcome.

Inference The compositional semantics sets its own soundness and completeness criteria for the management of description knowledge bases with rules. The modularity and compositional semantics principles point to reasoning services that are obtained from independent DL and R reasoners. In order to approach completeness with respect to the compositional semantics, we need reasoners that operate under some memoization policy, so that the partial results that they leave in the database, can drive the operation of the other reasoner. For the R reasoner, the top-down + tabulation method of ([40, 44]), or a bottom-up + magic set method ([41]) seem appropriate. Note that a naive bottom-up evaluation that fully computes the R semantics for the F or the OF compositional semantics, will not do since the latter may be in nite. For the DL reasoner, imposing a memoization policy on a structural subsumption algorithm as in [32] seems doable, but for expressive DL languages the algorithm is incomplete. Imposing memoization on a constraints based subsumption algorithm seems more involved, as these algorithms operate by construction of alternative completions. Inference with the R reasoner deserves further study. The set of rules may be split into two disjoint sets: Rules whose head is a description formula (description rules), and rules whose head is a predication (predication rules). The two components should have semantics that are open to each other, since 22

description rules may include predications in their bodies, and predication rules may include descriptions in their bodies, and the overall semantics of the R reasoner, i.e., R, should be composed from the separate semantics of the description rules and the predication rules components. Inference with the R reasoner should be combined from separate inference algorithms for the two rules components.

Complexity The hybrid framework introduced in this paper generalizes the frameworks of BACK and CLASSIC and those of [14, 25]. However, the complexity results of [26, 25] still hold for knowledge bases with an empty description rules component, and predication DATALOG rules whose bodies include only membership description formulae, or predications with no description terms. In analogy to these works, it is interesting to investigate the complexity of logical implication with an empty predication rules component, and various subsets of the description rules component. In fact, logical implication can be de ned either by the declarative semantics, or by the more restricted compositional semantics.

Inheritance F-Logic, as an object-oriented logic programming language, has a built-in non-monotonic inheritance mechanism for de nite positive sets of rules. The semantics of the R reasoner can be changed to include non-monotonic inheritance. The impact on the compositional semantics needs to be studied. Moreover, the inter-relationships between this mechanism to non-monotonic extensions of DLs (e.g., [3, 4, 35]) is also a subject for future research.

Implementation An initial implementation is being started by Adi Eyal. Current experiments involve the cooperation of memoized subsumption and rule inference algorithms. We are still looking for an o -the-shelf KBMS for the database of descriptions and facts. The main problem with most DL systems is that their management tools are tightly integrated with their subsumption algorithm, and their query language. The FLORID system (F-LOgic Reasoning In Databases, [19]) is also not of much help here since, we need to experiment with various memoization based F-Logic rule reasoners, and it does not solve the problem of the descriptions management. In any case, a hybrid implementation probably cannot be obtained by tying together an o -the-shelf DL system with an o -the-shelf F-Logic reasoner. Acknowledgments

I am grateful to Veronique Royer and Michael Kifer, who provided detailed comments on an earlier draft of this paper. I would like to thank Mike Codish for introducing me to the nonground s-semantics approach, and for endless fruitful discussions. Many thanks go to Adi Eyal who is currently involved in an implementation of the hybrid framework.

References [1] K. Apt, H. Blair, and A. Walker. Towards a theory of declarative knowledge. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 89{148. Morgan Kaufmann, 1988.

23

[2] F. Baader and B. Hollunder. A terminological knowledge representation system with complete inference algorithm. In Proceedings of the Workshop on Processing Declarative Knowledge, PDK-91, Lecture Notes in AI, pages 67{86. Springer-Verlag, 1991. [3] F. Baader and B. Hollunder. Embedding defaults into terminological knowledge representation formalisms. In KR-92, pages 306{317, 1992. [4] F. Baader and B. Hollunder. How to prefer more speci c defaults in terminological default logic. In IJCAI-93, pages 669{674, 1993. [5] F. Baader, B. Hollunder, B. Nebel, H. Pro tlich, and E. Franconi. An empirical analysis of optimization techniques for terminological representation systems. In KR-92, pages 270{281, 1992. [6] M. Balaban. The f-logic approach for description languages. Annals of Mathematics and Arti cial Intelligence, 15:19{60, 1995. [7] A. Borgida, R. Brachman, D. McGuinness, and L. Resnick. Classic: A structural data model for objects. In ACM-SIGMOD-89, Portland, OR, 1989. [8] A. Bossi, M. Gabbrielli, G. Levi, and M. Martelli. The s-semantics approach: Theory and applications. J. of Logic Programming, 12(3):187{230, 1993. [9] A. Bossi, M. Gabbrielli, G. Levi, and M. Meo. Contributions to the semantics of open logic programs. In International Conference on Fifth Generation Computer Systems, pages 570{580, 1994. [10] R. Brachman and H. Levesque. Competence in knowledge representation. In AAAI-82, pages 189{192, Pittsburgh, PA, 1982. [11] R. Brachman and H. Levesque. The tractability of subsumption in frame-based description languages. In AAAI-84, pages 34{37, Austin, Texas, 1984. [12] R. Brachman and J. Schmolze. An overview of the kl-one knowledge representation system. Cognitive Science, 9:171{216, 1985. [13] P. Bresciani, E. Franconi, and S. Tessaris. Implementing and testing expressive description logics: a preliminary report. In International Workshop on Description Logics, pages 131{139, Roma, Italy, 1995. [14] F. Donini, M. Lenzerini, D. Nardi, and A. Schaerf. A hybrid system with datalog and concept languages. In Trends in AI, volume LNAI 549. Springer Verlag, 1991. [15] F. Donini, M. Lenzerini, D. Nardi, A. Schaerf, and W. Nutt. Adding epistemic operators to concept languages. In KR-92, pages 342{353, 1992. [16] M. Emden and R. Kowalski. The semantics of predicate logic as a programming language. J. of the ACM, 23(4):733{742, 1976. [17] M. Falashi, G. Levi, M. Martelli, and C. Palamidessi. Declarative modeling of the operational behavior of logic languages. Theoretical Computer Science, 69(3):289{318, 1989. [18] P. Hanschke and . Hinkelmann. Combining terminological and rule-based reasoning for abstraction processes. In German Conference on AI-92, Springer LNCS 671, 1992. 24

[19] R. Himmeroder and C. Schlepphorst. Florid version 1.0: User manual. Technical report, Institut fur Informatik, Universitat Freiburg, Freiburg, Germany, July 1996. [20] B. Hollunder, W. Nutt, and M. Schmidt-Schau. Subsumption algorithms for concept description languages. In ECAI-90, pages 348{353, 1990. [21] T. Hoppe, C. Kindermann, J. Quantz, A. Schmiedel, and M. Fischer. Back v5: Tutotial and manual. Technical Report KIT { report 100, Technische Universitat Berlin, March 1993. [22] M. Kifer and G. Lausen. F-logic: A higher-order language for reasoning about objects, inheritance, and scheme. In SIGMOD-89, 1989. [23] M. Kifer, G. Lausen, and J. Wu. Logical foundations of object-oriented and frame-based languages. JACM, 42(4):741{843, 1995. [24] H. Levesque and R. Brachman. Expressiveness and tractability in knowledge representation and reasoning. Computational Intelligence, 3:78{93, 1987. [25] A. Levy and M.-C. Rousset. Carin: A representation language combining horn rules and description logics. In KR-96, pages 323{327, 1996. [26] A. Levy and M.-C. Rousset. The limits on combining recursive horn rules and description logics. In AAAI-96, 1996. [27] J. Lloyd. Foundations of Logic Programming. Springer-Verlag, New York, 1984. [28] K. Luck, B. Nebel, C. Peltason, and A. Schmiesel. The back system. Technical Report KIT Report 29, Department of Computer Science, Technische Universitat Berlin, Berlin, FRG, 1985. [29] K. Luck, B. Nebel, C. Peltason, and A. Schmiesel. The anatomy of the back system. Technical Report KIT Report 41, Department of Computer Science, Technische Universitat Berlin, Berlin, FRG, 1987. [30] R. MacGregor. The evolving technology of classi cation-based knowledge representation systems. In J. Sowa, editor, Principles of Semantic Networks: Explorations in the Representation of Knowledge, pages 385{400. Morgan Kaufmann, 1991. [31] B. Nebel. Computational complexity of terminological reasoning in back. J. of Arti cial Intelligence, 34:371{383, 1988. [32] B. Nebel. Reasoning and Revision in Hybrid Representation Systems. Dissertation, University of Saarlands, Saarbrucken, 1989. [33] B. Nebel. Terminological reasoning is inherently intractable. J. of Arti cial Intelligence, 43:235{249, 1990. [34] P. Patel-Schneider. Undecidability of subsumption in nikl. J. of Arti cial Intelligence, 39:263{272, 1989. [35] J. Quantz and V. Royer. A preference semanics for defaults in terminological logics. In KR-92, pages 294{305, 1992. [36] L. Resnick, A. Borgida, R. Brachman, D. McGuinness, and P. Patel-Schneider. Classic description and reference manual for common lisp implementation. Technical Report Version 1.02, AT&T Bell Labs, 1990. 25

[37] V. Royer and J. Quantz. Deriving inference rules for terminological logics. In D. Pearce and G. Wagner, editors, Logics in AI, JELIA'92, pages 84{105, Berlin: Springer, LNAI 633, 1992. [38] M. Schmidt-Schau. Subsumption in kl-one is undecidable. In Proceedings, Conference on Principles of Knowledge Representation and Reasoning, pages 421{431, Toronto, Ontario, Canada, 1989. [39] M. Schmidt-Schau and G. Smolka. Attributive concept descriptions with complements. J. of Arti cial Intelligence, 48(1):1{26, 1991. [40] H. Tamaki and T. Sato. Old resolution with tabulation. In 3rd International Conference on Logic Programming, pages 84{98, 1986. [41] J. Ullman. Principles of Database and Knowledge-base Systems. Computer Science Press, 1989. [42] W. Woods. Understanding subsumption and taxonomy: A framework for progress. In J. Sowa, editor, Principles of Semantic Networks: Explorations in the Representation of Knowledge, pages 45{94. Morgan Kaufmann, 1991. [43] W. Woods and J. Schmolze. The kl-one family. Computers and Mathematics with Applications, Special Issue on Semantic Networks in Arti cial Intelligence, 1992. [44] J. Wunderwald. Memoing evaluation by source-to-source transformation. In LOPSTR-95, 1995.

26

A Proofs of Theorems Proofs of Theorems from Subsection 4.1 Claim 4.2 H (D) is a Herbrand model of D and of RULES , but not necessarily of FLP . Proof: First we prove the following proposition: Proposition A.1 1. 8i  1; TH i(D) is a model of D, i.e., TH i(D) j= D. 2. 8i  1; M (D [ TH i(D))  TH i (D), where for a set of F-Logic formulae S , M (S ) is the minimal Herbrand model of S , if it exists.

Proof (of proposition): 1. Let i  1: TH i (D) = DLH [TH i? (D)] [ RH [TH i? (D)]. We show: DLH [TH i? (D)] j= D, and RH [TH i? (D)] j= D. DLH [TH i? (D)] j= D holds since for every ground instance of a rule in D, if its assumption is in DLH [TH i? (D)], then it must be in all Herbrand models of D [ TH i? (D) [ FLP . But then, the 1

1

1

1

1

1

1

consequence should also be in all of these models, and hence also in their intersection. RH [TH i?1(D)] j= D holds since it is a Herbrand model of D [ TH i?1(D) [ RULES . In conclusion, TH i (D) j= D holds since for every ground instance of a rule in D, if its assumption is in TH i (D), then it is either in DLH [TH i?1(D)] or in RH [TH i?1(D)] (the assumption consists of a single atom). Hence, its consequence is also either in DLH [TH i?1(D)] or in RH [TH i?1(D)]. Note that facts in D must be included, both, in DLH [TH i?1(D)] and in RH [TH i?1(D)]. 2. For all i  1, TH i (D) is a Herbrand model of D [ TH i (D), since for every ground instance of a rule in D, if its assumption is in TH i(D), then its consequence should also be in TH i(D). Note that analogous claims do not hold, neither for FLP nor for RULES . Proof (of claim): 1. H (D) is a Herbrand model of D. The property \Xi is a Herbrand model of Y " is an inclusive property, for every chain of Herbrand structures X0 ; X1; X2; : : :, and1 a set of Horn clauses Y . That is, if for all i  0 the property holds [ for Xi and Y , then it holds for Xi and Y . This is true since if the assumption of a ground instance i=0 1 [ of a rule in Y is in Xi , then there is some k  0 such that the assumption is in Xk . But then, the i=0 1 [ conclusion is also in Xk , since Xk is a Herbrand model of Y . Hence, the conclusion is also in Xi. i=0 The result then follows from Claim 4.1 and Proposition A.1. 2. H (D) is a Herbrand model of RULES . Take a ground instance of a rule in RULES . If its assumption holds in H (D), then there is some k  0 such that the assumption holds in TH k (D) (the TH i (D)-s form a chain). Then TH k+1 (D) is a Herbrand model of D [ TH k (D) [ RULES . Hence, the consequence of that ground instance is in TH k+1 (D), and hence in H (D). 27

H (D) is not necessarily a Herbrand model of FLP , since FLP may include wild formulae, depending on the intended meaning of operators in P . 2

Proofs of Theorems from Subsection 4.2 The following claim is necessary for the proof of Theorem 4.11.

1 [

1 [

i=0

i=0

Claim A.2 For every ascending chain of sets of descriptions hDiii ; DLF ( Di) = DLF (Di). 0

Proof: Recall that DLF (D) = fq j q 2 LP ; D [ FLP j= qg. ) 1 1 [ [ Assume q 2 DLF ( Di ). Then, Di [ FLP j= q . By compactness of F-Logic, and since the sequence i i hDiii is an1 ascending chain, we have: For some i  0; Di [ FLP j= q, which implies: q 2 DLF (Di). [ Hence, q 2 DLF (Di ). i ( 1 [ Assume q 2 DLF (Di ). Then, for some i  0; q 2 DLF (Di ). That is, Di [ FLP j= q . By monotonicity =0

=0

0

=0

i=0 1 [

of j= we get:

2

1 [ Di [ FLP j= q, which implies q 2 DLF ( Di).

i=0

i=0

Theorem 4.6 If RH (D) = RF (D), and RF (D) is monotonic, then: Proof: 1 [ ! i

F (D)  H (D).

F (D) = TF (D) = TF (D) i=0 1 [ H (D) = TH i(D) i=0

1. We show: 8i  o;

TF i(D)  TH i(D). We prove it by induction on i.

 Basis: i = 0: TF (D) = D  D=atom = TH (D)  Inductive hypothesis: i = k  0.  Inductive Step: i = k + 1; i > 0. DLH (TH k(D)) = \fH j H is a Herbrand model of D [ TH k (D) [ FLP g RH (TH k(D)) = The intended Herbrand model of D [ TH k (D) [ RULES = RF (D [ TH k(D)) 0

0

(by the theorem's assumption).

TH k+1 (D) = DLH (TH k (D)) [ RH (TH k(D)) TF k+1 (D) = TF [TF k (D)] = DLF [TF k (D)] [ RF [TF k (D)]

DLF [TF k (D)] = fq j q 2 LP ; TF k (D) [ FLP j= qg  (since TF k (D)  D, and by the inductive hypothesis 28

and the monotonicity of j=)  fq j q 2 LP ; D [ TH k (D) [ FLP j= qg   fq j q 2 LP =atom; D [ TH k (D) [FLP j= qg = = \fH j H is a Herbrand model of D [ TH k (D) [ FLP g = DLH (TH k (D)

RF [TF k (D)] 

(by the inductive hypothesis and the monotonicity of RF )  RF [D [ TH k (D)] = (by theorem's assumption) = the intended H-model of D [ TH k (D) [ RULES = RH (TH k(D)

Hence we have:

TF k+1 (D) = DLF [TF k (D)] [ RF [TF k (D)]   DLH (TH k(D) [ RH (TH k(D) = TH k+1(D) 1 1 [ [ TF i (D)  TH i(D) . Hence, TF i(D) is an upper bound on the 2. By (1) we have: 8i  o; i=0 i=0 sequence hTH i(D)ii0. Therefore, it includes the lub of the sequence, i.e., 1 1 [ [ TF i (D)  TH i(D) .

2

i=0

i=0

Proofs of Theorems from Subsection 4.3 Theorem 4.10 If the OD;RULES is monotonic, and its application to M (D) is included in its in nite iteration, i.e., OD;RULES (M (D))  OD;RULES " ! , then: F (D)  singleF (D).

Proof: [ 1

TF i (D) i=0 1 [ singleF (D) = TsglF i(D) F (D) =

i=0

1. We show: 8i  0; For some j  i; TF j (D)  TsglF i(D). We prove it by induction on i.

 Basis: i = 0: For j = 0; TF (D) = TsglF (D).  Inductive Hypothesis: i = k  0.  Inductive Step: i = k + 1; i > 0: 0

0

By inductive hypothesis: For some j  k; TF j (D)  TsglF k (D). By monotonicity of the DL reasoner: For some j  k; DLF [TF j (D)]  DLsglF [TsglF k (D)]. By monotonicity of the R reasoner (results from assumption (1) of the theorem, and Claim 4.9): For some j  k; RF [TF j (D)]  RF [TsglF k (D)] = 29

= OTsglF k (D);RULES " !  (by theorem's assumption)  OTsglF k (D);RULES[M (TsglF k(D))] = = RsglF [TsglF k(D)] We have: For some j  k; TF j (D) = DLF [TF j (D)] [ RF [TF j (D)]   DLsglF [TsglF k(D)][ RsglF [TsglF k(D)] = = TsglF k (D). 2. By (1), for all i  0; F (D)  TsglF i(D). Hence, also F (D)  singleF (D).

2 The following auxiliary lemma is used in the proof of Theorem 4.11. It characterizes a continuous behavior of the operator TsglF on chains of description sets. 1 [ Lemma A.3 If for all ascending chains of sets of descriptions Di, where D = Di; i=0 1 1 [ [ i OD;RULES [M (D)]  ODi ;RULES [M (Di)], then: TsglF (D)  TsglF (Di). i=0

Proof:

i=0

TsglF (D) = DLsglF (D) [ !RsglF (D) = DLF (D) [ OD!;RULES [M (D)]  1 1 [ [ DLF (Di) [ ODi;RULES [M (Di)] =  i=0 1i=o [ = (DLF (Di ) [ ODi ;RULES [M (Di)]) (by assumption and Claim A.2) = i1 =0 [ = TsglF i(Di ).

2

i=0

Theorem 4.11 If the OD;RULES is monotonic, and for all ascending chains of sets of descriptions 1 1 [ [ Di , where D = Di; OD;RULES [M (D)]  ODi;RULES [M (Di)], then: F (D)  singleF (D). i i Proof: =0

=0

1. We show: 8i  0; TF i (D) 

1 [

j =0

TsglF j (D) = singleF (D):

We prove by induction on i: If q 2 TF i (D) then for some j  i; q 2 TsglF j (D).

 Basis: i = 0: TF (D) = TsglF (D). Hence, the claim holds for j = 0.  Inductive Hypothesis: i = k  0.  Inductive Step: i = k + 1; i > 0: Let q 2 TF k (D). Then q 2 DLF [TF k (D)] [RF [TF k (D)]. 0

0

+1

30

{ Assume q 2 DLF [TF k (D)]. 1 [ Then, TF k (D) [ FLP j= q . By inductive hypothesis, TF k (D)  TsglF i (D). i=0

1 [

TsglF i(D) [FLP j= q. By compactness of F-Logic, and since the sequence i=0 hTsglF i(D)ii0 is an ascending chain, we have: 1 [ For some j  0; TsglF j (D) [ FLP j= q , which implies: q 2 TsglF i (D) = singleF (D). i=0 { Assume q 2 RF [TF k (D)]. By inductive hypothesis, and since RF is monotonic: 1 [ q 2 RF [ TsglF i (D)] = i=0 = RF [singleF (D)] = 1 [ = OsingleF (D);RULES " j Hence,

j =0

We show, by induction on j : 1 [ 8j  0 : OsingleF (D);RULES " j  TsglF i(D) = singleF (D). i=0

 Basis: j = 0 : OsingleF D ;RULES " 0 = ;.  Inductive hypothesis: j = k  0.  Inductive step: j = k + 1; j > 0: OsingleF D ;RULES " k + 1 = = OsingleF D ;RULES [OsingleF D ;RULES " k]  (

(

)

)

(

)

(

)

(by inductive hypothesis, and monotonicity of OD;RULES )  OsingleF (D);RULES [singleF (D)]  (by de nition of TsglF )  TsglF [singleF (D)] = 1 [ = TsglF [ TsglF i (D)]  i=0 1 [  TsglF i(D) (by Lemma A.3) = i=1

=

(since hTsglF i(D)ii0 is a chain) TsglF i(D) =

1 [ i=0

= singleF (D)

From OsingleF (D);RULES " j  singleF (D) (j  0), we 1 conclude: [ OsingleF (D);RULES " j  singleF (D).

j =0

Hence we have: q 2 singleF (D). In sum we received: 8i  0 : If q 2 TF i (D) then q 2 singleF (D). 2. By (1): 8i  0; TF i (D)  singleF (D): Hence, 1 [ F (D) = TF i(D)  singleF (D): i=0

31

2

Proofs of Subsection 4.4 The proof of Theorem 4.14 uses the following theorem that we adapt from [8, 17]:

Theorem A.4 Let DR be a set of descriptions and rules, and hDRiii be the sequence of sets de ned in the computation of ROF (DR). De ne Ii(DR) = fA j A is an atom; A 2 DRig; (i  0) 0

Then:

Success set of DR = Set of ground instances of

1 [

i=0

Ii (DR).

Theorem 4.14 If RF is de ned as in Equation 2, then the OF semantics is more powerful than the F semantics. That is: F (D)  kD[OF (D)]k. Proof: [ 1 TF i(D) i=0 1 [ OF (D) = TOF i (D [ RULES ) F (D) =

i=0

1. We prove, by induction on i: 8i  0 :

TF i (D)  kD[TOF i (D [ RULES )]k.

 Basis: i = 0: TF (D) = D  kD[D [ RULES ]k = kD[TOF (D [ RULES )]k.  Inductive hypothesis: i = k  0.  Inductive step: j = k + 1; i > 0: TF k (D) = TF [TF k (D)]  (by inductive hypothesis)  TF [kD[TOF k (D)]k]  (by monotonicity of TOF )  TF [kD[TOF k (D [ RULES )]k] = (denote DRk = TOF k (D [ RULES ) ) = DLF (kD(DRk )k) [RF (kD(DRk )k) = = DLOF (DRk ) [ RF (kD(DRk k)) We now show: RF (kD(DRk )k)  kD(ROF (DRk ))k. RF (kD(DRk )k) = TkD DRk k[RULES " !  TDRk [RULES " ! = (since DRk = TOF k (D [ RULES )  RULES , by Proposition 4.13 ) = TDRk " ! = (since DRk is a de nite positive logic program) = M (DRk ) = Success set of DRk = (by Theorem A.4) 1 [ = Set of all ground instances of Ii (DRk ) = i (since for all i  0, Ii (DRk )  LVP ar =atom) 1 [ = Set of all ground instances of D( Ii (DRk )) = 0

0

+1

(

)

=0

i=0

1 [

= kD( Ii (DRk ))k  (since for all i  0, Ii (DRk )  DRki ) i=0

32

1 [

 kD( (DRki )k = kD(ROF (DRk))k i=0

We received: TF k+1 (D)  DLOF (DRk ) [RF (kD(DRk ))   DLOF (DRk ) [ kD(ROF (DRk))k = (since DLOF (DRk )  LP ) = kD(DLOF (DRk ))k [kD(ROF (DRk ))k = = kD[DLOF (DRk ) [ ROF (DRk )]k = = kD[TOF (DRk )]k = kD[TOF k+1 (D [ RULES )]k 2. By (1), for all i  0, 1 1 [ [ TF i (D)  kD[TOF i(D [ RULES )]k = kD[ TOF i (D [ RULES )]k i=0 i=0 = kD[OF (D)]k. 1 [ Hence, also F (D) = TF i (D)  kD[OF (D)]k:

2

i=0

33