XSWRL, an Extended Semantic Web Rule Language and prototype implementation

XSWRL, an Extended Semantic Web Rule Language and prototype implementation

Expert Systems with Applications 38 (2011) 2040–2045 Contents lists available at ScienceDirect Expert Systems with Applications journal homepage: ww...

211KB Sizes 1 Downloads 72 Views

Expert Systems with Applications 38 (2011) 2040–2045

Contents lists available at ScienceDirect

Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa

XSWRL, an Extended Semantic Web Rule Language and prototype implementation Wan Li ⇑, Shengfeng Tian School of Computer and Information Technology, Beijing Jiaotong University, Beijing 100044, China

a r t i c l e Keywords: Semantic Web Ontology language Rule language Hybrid reasoning

i n f o

a b s t r a c t Although the OWL (Web Ontology Language) and SWRL (Semantic Web Rule Language) add considerable expressiveness to the Semantic Web they do have expressive limitations. For some reasoning problems it is necessary to infer the existence of new individuals satisfying stated condition. This kind of problems can not be fully resolved by OWL and SWRL. We present the XSWRL (Extended Semantic Web Rule Language), an extension to SWRL, to overcome these problems. XSWRL introduces existentially quantified variables to rules. XSWRL extends SWRL in a syntactically and semantically coherent manner. We show that while the expressiveness of the Semantic Web language is improved, the undecidability and infinite chains are brought on. We define the inseparable set of atoms to separate XSWRL rules, and discuss a prototype implementation of reasoning support for XSWRL.  2010 Elsevier Ltd. All rights reserved.

1. Introduction The Semantic Web (Berners-Lee, 1998, 2000) is an extension of the current Web in which information is given well-defined meaning, better enabling computers and people to work in cooperation. Being one of the front fields in Artificial Intelligence, the Semantic Web helps computers to process Web information automatically, making Web more intelligent. Ontologies are important for knowledge representation and reasoning in the Semantic Web. Gruber (1993) defines ontology as an explicit specification of a conceptualization. In general, ontologies are shared, suitable to describe structural knowledge. Description Logics (DLs) (Baader, Calvanese, McGuinness, Nardi, & Patel-Schneider, 2003) provide the underlying base for the dominating data model and languages for the Semantic Web and OWL (McGuinness & Harmelen, 2004). It is based on the notion of classes and properties. Although DLs include a relatively rich set of class constructors, they are much weaker for talking about properties, e.g., composite properties such as ‘‘uncle” as ‘‘brother of parent” cannot be expressed (Horrocks & Patel-Schneider, 2004). One way to overcome this expressive limitation of DLs would be to extend it with rules. SWRL (Horrocks et al., 2004) is a proposal for a Semantic Web rules language, combining sub-languages of the OWL (OWL DL and Lite) with those of the Rule Markup Language (RuleML, 2009). Compared with DLP (Description Logic Programs) (Grosof, Horrocks, Volz, & Decker, 2003), another proposal in the Semantic Web community for integrating rules and OWL, SWRL takes a diametrically

* Corresponding author. Tel.: +86 10 51685922. E-mail addresses: [email protected], [email protected] (W. Li). 0957-4174/$ - see front matter  2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2010.07.141

opposed integration approach. DLP is the intersection of Horn logic and OWL, where as SWRL is (roughly) the union of them. SWRL retains the full power of OWL DL, but at the price of decidability and practical implementations (Horrocks, PatelSchneider, Bechhofer, & Tsarkov, 2005). Motik, Sattler, and Studer (2005) suggested restricting the extension to DL-safe rules to ensure decidability. Horrocks et al. (2004) said: ‘‘As usual, only variables that occur in the antecedent of a rule may occur in the consequent (a condition usually referred to as ‘safety’). This safety condition does not, in fact, restrict the expressive power of the language (because existentials can already be captured using OWL someValuesFrom restrictions).” Franconi (2004) argued that ‘‘the safety condition does restrict the expressive power of the language, since a rule with a conjunction of atoms in the consequent with joint existential variables can not be transformed into multiple rules each with an atomic consequent.” In our research, we noticed that for some reasoning problems it is necessary to infer the existence of new individuals satisfying stated condition. SWRL does not fully satisfy the requirement. For example, we are going to assert that a left shoe and a right shoe which have the same color compose a pair of shoes (of course we can add other restriction conditions like style and size). It can not be expressed with Description Logic, but can be expressed with rules. With SWRL rules it would be written as

LeftShoeð?xÞ ^ RightShoeð?yÞ ^ colorð?x; ?zÞ ^ colorð?y; ?zÞ ^ hasPartð?a; ?xÞ ^ hasPartð?a; ?yÞ ) Shoesð?aÞ: If there is already an individual c which hasPart a and hasPart b, and a and b have the same color, then a SWRL reasoner would infer that individual c is an instance of Shoes. However, SWRL rules follow the safety condition (only variables that occur in the antecedent of a

W. Li, S. Tian / Expert Systems with Applications 38 (2011) 2040–2045

rule may occur in the consequent), this decides that a SWRL reasoner can not create new individuals. If there is no such an individual c, the reasoner would not infer the existence of an instance of Shoes which is composed by a and b. To resolve these problems, we introduce existentially quantified variables to rules, present XSWRL (Extended Semantic Web Rule Language), an extension to SWRL. The difference between XSWRL and SWRL is that XSWRL allows existentially quantified variables that occur in the consequent only. Next, in Section 2 related work is discussed. The syntax is defined in Section 3 and the semantics is defined in Section 4. In Section 5 the undecidability and infinite chains caused by the existential quantifier are discussed. In Section 6 the inseparable set of atoms is defined to separate XSWRL rules. Reasoning support for XSWRL is discussed in Section 7. Finally, in Section 8 is a conclusion.

2. Related work While both OWL DL and function-free Horn rules are decidable fragments of first-order logic, however, the combination leads to undecidability in general. DLP (Grosof et al., 2003) is the, not very expressive, but decidable, intersection of DL and LP. The other end of the spectrum is SWRL (earlier: ORL) (Horrocks & Patel-Schneider, 2004; Horrocks et al., 2005; Horrocks et al., 2004) which is the union of DL and LP, which is in general undecidable. AL-log (Donini, Lenzerini, Nardi, & Schaerf, 1991, 1998), an early and simple hybrid language, proposes hybrid rules in a constraint LP style, where the LP Datalog clauses in the body are extended with DL class membership constraints; the heads of the rules may only contain the LP predicates. CARIN (Levy & Rousset, 1996) extends this to allow also DL roles in the Datalog bodies. Role-safeness, i.e., in every DL role atom, at least one variable also occurs in a base predicate (i.e., an LP predicate which does not occur in any rule head), guarantees decidability (wrt. ALCNR). Another extending strategy is followed in DL-safe rules (Motik et al., 2005), where it is shown that it is sufficient to require each variable in the rule to occur in a non-DL-atom in the rule body (wrt. the more expressive SHOIN ðDÞ/OWL-DL); but here DL atoms are also allowed to occur in rule heads. DL-safety also makes sure that each variable is bound only to individuals that are explicitly known in the ABox. The DL + log (Rosati, 2006) approach provides a tighter integration and shows that a ‘‘weak safeness” condition, i.e., every head variable must occur in an LP atom in the body, guarantees decidability. Thus, in contrast to previous approaches, it is allowed to have variables in the body that only appear in DL atoms (thus, the language now covers conjunctive queries over DL). Again, the focus is that the individuals for which something is derived are explicitly known (while implicit objects can be significant in the body). In DLV/DLVhex (DLV with higher order and external atoms) (Eiter, Ianni, Schindlauer, & Tompits, 2006; Eiter, Lukasiewicz, Schindlauer, & Tompits, 2004), the DL atoms are ‘‘external” to the DLV framework (disjunctive LP) that is based on Answer Set Programming. In Lukasiewicz’s work (Lukasiewicz, 2007), the perspective is changed: the above approaches consider the DL, theory reasoning, perspective. When changing to the perspective of rule-based systems, considering Herbrand structures as a base yields decidability without any syntactic restrictions. DL + Florid (Kattenstroth, May, & Schenk, 2007), a combination of DL with F-Logic rules and default inheritance, provides a tight coupling in the sense that the symbols of the DL part and the rule part are not required to be disjoint. Thus, the rules can be used to

2041

derive concept memberships and role instances. The approach is the most similar to ours among the above ones. DL + Florid is more expressive than XSWRL, but our approach is rather straightforward, and can be implement easily. A SWRL extension towards first-order logic has been proposed (Patel-Schneider, 2005). The extension has the expressiveness of first-order logic, but at the price of practical implementations. 3. Abstract syntax In this section the abstract syntax and the informal human readable syntax for XSWRL are specified. The XML concrete syntax for XSWRL is easily defined according to the abstract syntax for XSWRL and the concrete syntax for SWRL, we would not discuss them here. The syntax for XSWRL in this section abstracts from any exchange syntax for OWL and SWRL and thus facilitates access to and evaluation of the language. This syntax extends the abstract syntax of SWRL (Horrocks et al., 2004) which itself extends the abstract syntax of OWL (Patel-Schneider, Hayes, & Horrocks, 2004). The abstract syntax is specified here by means of a version of Extended BNF, very similar to the EBNF notation used for XML (Bray, Paoli, Sperberg-McQueen, Maler, & Yergeau, 2008). Terminals are quoted; non-terminals are bold and not quoted. Alternatives are either separated by vertical bars ðjÞ or are given in different productions. Components that can occur at most once are enclosed in square brackets ð½. . .Þ; components that can occur any number of times (including zero) are enclosed in braces ðf. . .gÞ. Whitespace is ignored in the productions here. The meaning of each construct in the abstract syntax is informally described when it is introduced. The formal meaning of these constructs is given in Section 4 via an extension of the OWL DL model-theoretic semantics (Patel-Schneider et al., 2004). 3.1. Rules A SWRL ontology in the abstract syntax contains a sequence of axioms and facts, including SWRL rules. In SWRL rules, variables are treated as universally quantified. It is proposed to extend SWRL rules with existentially quantified variables. Atoms, antecedents and consequents in XSWRL are precisely the same as them in SWRL. axiom < = rule rule < = ‘Forall(‘{i-variable} eqrule’)’ eqrule < = nqrule j‘Exists(‘{i-variable} nqrule’)’ nqrule < = ‘Implies(‘[URIreference] {annotation} antecedent consequent’)’ The introduction of variables in forall and exists constructs provides a type for the variable that restricts the possible mappings for that variable. There are no free variables in rules. Because variables are bound using typed quantifiers, this means that every variable in a rule must range over a given type. variable ::¼ ‘I-variable(‘URIreference description’)’ j‘D-variable(‘URIreference dataRange’)’ Existentially quantified variables are treated as existentially quantified, with their scope limited to a given rule. Existentially quantified variables are restricted to only occur in the consequent of a rule. 3.2. Human readable syntax The human readable syntax for XSWRL extends the human readable syntax of SWRL described in the SWRL document (Horrocks et al., 2004). The human readable syntax for XSWRL only

2042

W. Li, S. Tian / Expert Systems with Applications 38 (2011) 2040–2045

adds existentially quantified variables in the human readable syntax of SWRL, the others do not be changed. Existentially quantified variables are indicated prefixing them with an exclamation mark (e.g., !x), while universally quantified variables are still indicated prefixing them with a question mark (e.g., ?x). Using this syntax, a rule asserting that a left shoe and a right shoe which have same color compose a pair of shoes would be written as:

LeftShoeð?xÞ ^ RightShoeð?yÞ ^ colorð?x; ?zÞ ^ colorð?y; ?zÞ ) Shoesð!aÞ ^ hasPartð!a; ?xÞ ^ hasPartð!a; ?yÞ: Using the abstract syntax described in Section 3.1, this rule would have been written as: Forall(I-variable (x) I-variable (y) I-variable (z) Exists(I-variable (a) Implies( Antecedent(LeftShoe(I-variable (x)) RightShoe(I-variable (y)) color(I-variable (x) I-variable (z)) color(I-variable (y) I-variable (z))) Consequent(Shoes(I-variable (a)) hasPart(I-variable (a) I-variable (x)) hasPart(I-variable (a) I-variable (y)))))).

4. Model-theoretic semantics The model-theoretic semantics for XSWRL rules is a straightforward extension of the semantics for OWL DL given in the OWL Semantics and Abstract Syntax document (Patel-Schneider et al., 2004). The basic idea is that we define bindings, extensions of OWL interpretations that also map variables to elements of the domain. The semantic conditions relating to axioms and ontologies are unchanged, e.g., an interpretation satisfies an ontology iff it satisfies every axiom (including rules) and fact in the ontology. 4.1. Interpreting rules Rules are interpreted using bindings from SWRL. Recall that a binding B(I), where I is an abstract OWL interpretation, extends I such that S maps i-variables to elements of EC(owl:Thing) and L maps d-variables to elements of LV. Reference to Patel-Schneider’s proposal for a SWRL extension towards first-order logic (PatelSchneider, 2005), a rule is satisfied by a binding (written B(I)  R) under the conditions given in Table 1, where V is an i-variable. Binding B0 is the same as another binding B except for V1 . . . Vn if 0 B maps i-variables and d-variables the same as B does for all variables other than V1 . . . Vn. Atoms, antecedents and consequents are satisfied in a binding using the same conditions as for SWRL. A nqrule is satisfied in an interpretation if there is some binding extending the interpretation that satisfies the antecedent and the consequent of the rule. The semantic conditions relating to axioms and ontologies are unchanged. In particular, an interpretation satisfies an ontology iff it satisfies every axiom (including rules) and fact in the ontol-

ogy; an ontology is consistent iff it is satisfied by at least one interpretation; an ontology O2 is entailed by an ontology O1 iff every interpretation that satisfies O1 also satisfies O2. 5. Undecidability and existential quantifier The XSWRL language is obviously undecidable as it is an extension of SWRL, which is an undecidable one. In the investigations of hybrid rules, it turned out that the crucial problem is anonymous, implicit objects (see Section 2) that affect decidability (note: these are not the blank nodes, but purely existential objects as in Parent  Person v $ hasFather.Person). The constraints on variables developed over time aimed at restricting variables such that they cannot be bound to these anonymous objects; or, taken the other way round (Rosati, 2006): every head variable must occur in an LP atoms in the body (such that only objects from the explicit active domain can be bound to variables that occur in the head). Actually, this prevents from deriving anything about these anonymous objects by rules. Since introducing existentially quantified variables in XSWRL rules, the expressiveness is improved, but it can cause infinite chains. Consider such an axiom like Person v $ hasFather.Person as a XSWRL rule

Personð?xÞ ) hasFatherð?x; !yÞ ^ Personð!yÞ: Assuming Peter as a person, the rule would create an infinite chain: since Peter must have a father, there is some x1 who is a Person. In turn, x1 must have some father x2, which must be a Person, and so on. Besides in one rule, cyclic chains can exist among rules. The following is an example

Luckyð?xÞ ) parentð!y; ?xÞ ^ Richð!yÞ Richð?xÞ ) Luckyð?xÞ: From that, the following strategy is applied for such objects: Strategy 1. Do not construct a rule which has existentially quantified variables to form cyclic chain between its atoms. Do not construct a rule which have existentially quantified variables and other rules to form cyclic chain among their atoms. To some extent the strategies restrict the expressiveness of the language, but it avoids infinite chains.

6. Separating XSWRL rules As we know, SWRL rules only have universally quantified variables, so SWRL rules with multiple atoms in the consequent could easily be rewritten (by applying standard rules of distributivity) into multiple rules each with an atomic consequent. However, XSWRL rules which have existentially quantified variables could not simply be rewritten into multiple rules each with an atomic consequent, because of the limited scope of existential variable visibility. For example, the XSWRL rule

R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R3ð!c1; !c2Þ ^ R4ð!c1; ?xÞ ^ R5ð?y; !c2Þ could not be rewritten into rules

R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R3ð!c1; !c2Þ Table 1 Interpretation conditions. Rule

Condition on interpretation

Forall(V1 . . . Vn eqrule) Exists(V1 . . . Vn nqrule)

B0 (I)  eqrule, for all bindings B0 that are the same as B except for V1 . . . Vn B0 (I)  nqrule, for some binding B0 that is the same as B except for V1 . . . Vn

R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R4ð!c1; ?xÞ R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R5ð?y; !c2Þ For that, we define the inseparable set of atoms. Definition 1 (Inseparable set of atoms). Given a XSWRL rule, the following definitions are limited to the consequent of the rule.

W. Li, S. Tian / Expert Systems with Applications 38 (2011) 2040–2045

 If two existentially quantified variables, x1 and x2, are contained in a property atom, then these two variables are said as direct joint. If x1, x2 and x3 are existentially quantified variables, where x1 and x2 are direct joint, x2 and x3 are direct joint, then x1 and x3 are said as indirect joint. The indirect joint has the transitivity. The direct joint and indirect joint are all said as joint.  A set of all existentially quantified variables which are joint each other (or a single element set that consists of an existentially quantified variable which does not joint any existentially quantified variables) is said as an inseparable set of joint existentially quantified variables.  A set of all atoms which contain the elements of an inseparable set of joint existentially quantified variables (or a single element set that consists of an atom which does not contain any existentially quantified variables) is said as an inseparable set of atoms. A rule may have multiple disjoint inseparable set of atoms. A XSWRL rule with multiple inseparable set of atoms in the consequent could be rewritten into multiple rules each with an inseparable set of atoms consequent. For example, the XSWRL rule

R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R3ð!c1; !c2Þ ^ R4ð!c1; ?xÞ ^ R5ð?y; !c2Þ ^ R6ð!c3; ?xÞ ^ R7ð?x; ?yÞ could be rewritten into rules

R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R3ð!c1; !c2Þ ^ R4ð!c1; ?xÞ ^ R5ð?y; !c2Þ R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R6ð!c3; ?xÞ

2043

between the DL reasoner and the rule engine. After the new facts derived by the rule engine have been added in the ontology, it is possible to assert more new facts when reasoning with the DL reasoner. And after the new facts derived by the DL reasoner have been transferred to the rule engine, it is possible to assert more new facts when reasoning with the rule engine. This is an iterative procedure. It does not stop until no new facts can be derived. This is known as a fixpoint computation. The method applies bottom-up reasoning. A similar approach, combining F-Logic with OWL has been presented in DL + Florid (Kattenstroth et al., 2007). Secondly, because the semantics of DL and rules do not completely overlap, some OWL axioms can not transform to rules. As a result, the rule engine does not know about the remaining OWL axioms. Thus, conflicts can potentially arise in OWL ontology between new facts derived by a rule engine and existing OWL axioms. For example, a property may be asserted for an individual as a result of firing a rule, but a class level OWL axiom may forbid this property from belonging to that individual. These conflicts are not detected beforehand, and resolving the conflict which is essentially between a rule and one or more OWL axioms and has nothing to do with a particular rule engine is left to the user. Conflicts can be detected by running a DL reasoner on the ontology that has been populated by inferred facts. In addition, because XSWRL is undecidable, the reasoning procedure may loop infinitely. A XSWRL reasoner should deal with this situation. A simple way is to set up the maximum number of the cycle to avoid infinite loop.

R1ð?x; ?zÞ ^ R2ð?y; ?zÞ ) R7ð?x; ?yÞ: 7.2. Implementation 7. A prototype XSWRL reasoner 7.1. Reasoning methods According to the semantics for XSWRL, the basic idea which we propose to implement XSWRL reasoning is that if there are ‘‘known” individuals satisfying the rule then do nothing, and if there are not ‘‘known” individuals satisfying the rule then create ‘‘new” individuals satisfying the rule. At the top-level, those integration approaches for combining rules and DL are either homogeneous or hybrid (Antoniou et al., 2005; Patel-Schneider, 2005). They each have advantages and disadvantages. From a practical perspective, hybrid approaches are component-based, using plug-ins of both DL reasoners and rule engines, in addition to well-defined interfaces. Most homogeneous approaches make use of translators from the DL component into rules (even first-order formulae), followed by running rule engines (even first-order provers) with support for those reduced languages. For using existing tools to support XSWRL, we adopt hybrid approaches to implement XSWRL reasoning. One possible way is to use Logic Programming (LP). Rules in LP are implication forms of clauses. In such rules, all variables are universally quantified. A XSWRL rule is an implication which can include existentially quantified variables. However, XSWRL rules which include existentially quantified variables are different from rules in LP. Because XSWRL rules are not implication form of clauses, we can not directly apply the resolution principle (Genesereth & Nilsson, 1987) to reason. However, we can utilize the Skolem theorem to transform XSWRL rules into clauses, and then apply the resolution principle. An alternative way, and the one we describe here, is to use forward chaining reasoning (e.g., the Rete algorithm (Forgy, 1982)). Some problems caused by hybrid must be considered. Firstly, because all predicates in XSWRL rules are OWL classes and properties, the new facts derived by reasoners should be transferred

The prototype uses Protégé (2009) as an ontology tool, uses DL reasoners which support the DIG interface (DIG, 2009), e.g., Racer (2009) and FaCT (FaCT++, 2009), and uses Jess (2009) as a rule engine. Jess uses an enhanced version of the Rete algorithm. Rete algorithm is a very effective mechanism to solve the complex problem of many pattern matching (Forgy, 1982). There are some works using Jess to support ontology and rule reasoning (Protégé, 2009; Shue, Chen, & Shiue, 2009; Yang, Miao, Wu, & Zhou, 2009). The prototype extends Protégé to support XSWRL and reasoning. Protégé uses Jess as a rule engine to support SWRL. For us, a key problem is how to represent XSWRL rules with Jess. The basic elements of Jess are facts and rules. Facts are used to express the known data or information. All the facts are kept in the working memory. Rules are used to express the knowledge of reasoning. A Jess rule consists of a left-hand side, the symbol ‘‘)”, and a right-hand side, in that order. The left-hand side is made up of zero or more conditional elements, while the right-hand side consists of zero or more function calls. A conditional element is either a pattern, or a grouping construct like ‘‘and”, ‘‘or”, or ‘‘not.” The conditional elements are matched against Jess’s working memory. When they all match, and if the engine is running, the code on the rule’s right-hand side will be executed. The ‘‘not”conditional element of Jess can express nonexistence, i.e., (not (A)) is the same as (not (exists (A))). Therefore, the semantics of XSWRL can be expressed with the ‘‘not” conditional element of Jess. For example, the XSWRL rule (1) in Section 3.1 could be rewritten into a Jess rule. (defrule rule-1 (LeftShoe (name ?x)) (RightShoe (name ?y)) (color ?x ?z) (continued on next page)

2044

W. Li, S. Tian / Expert Systems with Applications 38 (2011) 2040–2045

(color ?y ?z) (not (and (Shoes (name !a)) (hasPart !a ?x) (hasPart !a ?y))) ) (bind ?name (‘‘newInstance”)) (assert (Shoes (name ?name))) (assert (hasPart ?name ?x)) (assert (hasPart ?name ?y)) ) For this example, now we assume that facts matching the front four patterns of the rule exist in the working memory. If there is a fact matching the patterns in the ‘‘not” conditional element, then the rule is not activated and could not be fired, so the actions in the right-hand side would not be executed; if there is not such a fact, then the rule is activated, once the rule engine running, the rule would be fired, the actions in the right-hand side would be executed, thus the new facts would be derived and added into the working memory. As we see that Jess deals with the rule as: if there are individuals satisfying the conditions then not to take any action, otherwise create new individuals satisfying the conditions. This is in line with the XSWRL semantics. Note that a new individual should be named to ensure that the uniqueness of the name. This does not contradict the non-uniquenames assumption of the Semantic Web. The non-unique-names assumption is that a thing can be more than one name, but not a name corresponding to a number of things. There is a problem that a Jess rule can only express a XSWRL rule which has only one inseparable set of atoms in the consequent, and can not express a XSWRL rule which has multiple inseparable set of atoms in the consequent. We firstly separate a XSWRL rule which has multiple inseparable set of atoms in the consequent into a number of XSWRL rules which has only one inseparable set of atoms in the consequent, and then transform each of them into a Jess rule respectively. In addition, because it is not easy to check whether there are new facts derived by the DL reasoner, we only check whether new facts has been derived by the rule engine. The XSWRL reasoning algorithm is as follows: PROCEDURE XswrlReason (KB) INPUT: KB OUTPUT: KB BEGIN boolean hasNewFacts = true; Initialize (); OwlReason (KB); WHILE hasNewFacts DO BEGIN hasNewFacts = RuleReason (KB); IF hasNewFacts THEN OwlReason (KB); END END The input of the algorithm is the XSWRL knowledge base before reasoning, and the output is the XSWRL knowledge base after reasoning. The algorithm is an iterative procedure. It stops when no new facts can be derived. In the subroutine Initialize, rules are transferred from ontology to rule engine. In the subroutine OwlReason, the DL reasoner is called to check consistency, classify taxonomy and compute inferred types. In the subroutine RuleReason, the rule reasoning has been done. Then the subroutine checks and returns whether new facts has been derived by the rule engine. The rule reasoning involves three steps: transferring facts from ontology to rule engine, calling rule engine to reason, and transferring new facts from rule engine to ontology.

8. Conclusion For some reasoning problems it is necessary to infer the existence of new individuals satisfying stated condition. This kind of problems can not be fully resolved by OWL and SWRL. OWL based on Description Logic, it includes a relatively rich set of class constructors, but it is much weaker for talking about properties. Although SWRL combined Description Logic and rules, its ability to express existence is limited by OWL. SWRL can not express a rule with a conjunction of atoms in the consequent with joint existentially quantified variables. We present XSWRL (Extended Semantic Web Rule Language), an extension to SWRL, to resolve these problems. XSWRL introduces existentially quantified variables to rules. XSWRL extends SWRL in a syntactically and semantically coherent manner. By introducing existentially quantified variables, XSWRL can express a rule with a conjunction of atoms in the consequent with joint existentially quantified variables. Thereby, XSWRL can express knowledge which can not express by OWL and SWRL. Then, we show that while the express power is improved, the undecidability and infinite chains are brought on. We also define the inseparable set of atoms to separate XSWRL rules. Finally, we discuss how reasoning support for SWRL might be provided, propose a hybrid reasoning approach, and implement a prototype XSWRL reasoner. Future work will include continuing to expand the combination of ontology and rules to enhance the expressiveness of Semantic Web languages, as well as practical application. Acknowledgement This work was supported in part by the Science and Technology Foundation of Beijing Jiaotong University under Grant No. 2006XM007, the Science and Technology Project of Beijing under Grant No. Z09050600910902 and the Science and Technology Foundation of Beijing Jiaotong University under Grant No. 2007RC066. References Antoniou, G., Damasio, C. V., Grosof, B., Horrocks, I., Kifer, M., Maluszynski, J., & Patel-Schneider, P. F. (2005). Combining rules and ontologies. A survey. REWERSE Technical Report I3-D3. . Baader, F., Calvanese, D., McGuinness, D. L., Nardi, D., & Patel-Schneider, P. F. (2003). The description logic handbook: Theory, implementation, and applications. Cambridge University Press. Berners-Lee, T. (1998). Semantic Web road map. . Berners-Lee, T. (2000). Semantic Web-XML2000. . Bray, T., Paoli, J., Sperberg-McQueen, C. M., Maler, E., & Yergeau, F. (2008). Extensible Markup Language (XML) 1.0 (5th ed.). W3C recommendation 26 November 2008. Latest version is available at . DIG. (2009). Accessed 25.06.09. Donini, F. M., Lenzerini, M., Nardi, D., & Schaerf, A. (1991). A hybrid system with datalog and concept languages. In Proceedings of the second congress of the Italian association for artificial intelligence. Lecture notes in artificial intelligence (Vol. 549, pp. 88–97). Springer-Verlag. Donini, F. M., Lenzerini, M., Nardi, D., & Schaerf, A. (1998). AL-log: Integrating datalog and description logics. Journal of Intelligent Information Systems, 10(3), 227–252. Eiter, T., Lukasiewicz, T., Schindlauer, R., & Tompits, H. (2004). Combining answer set programming with description logics for the Semantic Web. In Proceedings of the ninth international conference on principles of knowledge representation and reasoning (KR 2004) (pp. 141–151). Lake District, UK. Eiter, T., Ianni, G., Schindlauer, R., & Tompits, H. (2006). Effective integration of declarative rules with external evaluations for Semantic-Web reasoning. In Proceedings of the third European conference on Semantic Web (ESWC 2006). Lecture notes in computer science (Vol. 4011, pp. 273–287). Springer-Verlag. FaCT++. (2009). Accessed 25.06.09. Forgy, C. L. (1982). Rete: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence, 19(1), 17–37.

W. Li, S. Tian / Expert Systems with Applications 38 (2011) 2040–2045 Franconi, E. (2004). Re: Safe rules in SWRL. W3C public mailing list archives. . Genesereth, M. R., & Nilsson, N. J. (1987). Logical foundations of artificial intelligence. Morgan Kaufmann Publishers. Grosof, B. N., Horrocks, I., Volz, R., & Decker, S. (2003). Description logic programs: Combining logic programs with description logic. In Proceedings of the twelfth international World Wide Web conference (WWW2003) (pp. 48–57). Budapest, Hungary. Gruber, T. F. (1993). A translation approach to portable ontologies. Knowledge Acquisition, 5(2), 199–220. Horrocks, I., & Patel-Schneider, P. F. (2004). A proposal for an OWL rules language. In Proceedings of the thirteenth international World Wide Web conference (WWW 2004) (pp. 723–732). New York, NY, USA. Horrocks, I., Patel-Schneider, P. F., Boley, H., Tabet, S., Grosof, B., & Dean, M. (2004). SWRL: A Semantic Web rule language combining OWL and RuleML. W3C member submission 21 May 2004. Latest version is available at . Horrocks, I., Patel-Schneider, P. F., Bechhofer, S., & Tsarkov, D. (2005). OWL rules: A proposal and prototype implementation. Journal of Web Semantics, 3(1), 23–40. Jess. (2009). Accessed 25.06.09. Kattenstroth, H., May, W., & Schenk, F. (2007). Combining OWL with F-Logic rules and defaults. In Proceedings of the second international workshop on applications of logic programming to the Web, Semantic Web and Semantic Web Services (ALPSWS07) (pp. 60–75). Porto, Portugal. Levy, A. Y., & Rousset, M.-C. (1996). CARIN: A representation language combining horn rules and description logics. In Proceedings of the twelfth European conference on artificial intelligence (ECAI-96) (pp. 323–327). Budapest, Hungary.

2045

Lukasiewicz, T. (2007). A novel combination of answer set programming with description logics for the Semantic Web. In Proceedings of the fourth European conference on Semantic Web (ESWC 2007). Lecture notes in computer science (Vol. 4519, pp. 384–398). Springer-Verlag. McGuinness, D. L., & Harmelen, F. V. (2004). OWL web ontology language overview. W3C recommendation 10 February 2004. Latest version is available at . Motik, B., Sattler, U., & Studer, R. (2005). Query answering for OWL-DL with rules. Journal of Web Semantics, 3(1), 41–60. Patel-Schneider, P. F. (2005). A proposal for a SWRL extension towards first-order logic. W3C member submission 11 April 2005. Latest version is available at . Patel-Schneider, P. F., Hayes, P., & Horrocks, I. (2004). OWL Web Ontology Language semantics and abstract syntax. W3C recommendation 10 February 2004. Latest version is available at . Protégé. (2009). Accessed 25.06.09. Racer. (2009). Accessed 25.06.09. Rosati, R. (2006). DL + log: Tight integration of description logics and disjunctive datalog. In Proceedings of the tenth international conference on principles of knowledge representation and reasoning (KR 2006) (pp. 68–78). Lake District, UK. RuleML. (2009). Accessed 25.06.09. Shue, L.-Y., Chen, C.-W., & Shiue, W. (2009). The development of an ontology-based expert system for corporate financial rating. Expert Systems with Applications, 36(2), 2130–2142. Yang, D., Miao, R., Wu, H., & Zhou, Y. (2009). Product configuration knowledge modeling using Ontology Web language. Expert Systems with Applications, 36(3), 4399–4411.