• 沒有找到結果。

2.1 The Classification of Rules

Rules are classified as three types: deductive rules (or derivation rules), nor-mative rules (or integrity rules), and reactive rules (or active rules). One can use deductive rules and facts to trigger a forward or backward reasoning en-gine to derive implicit facts. Normative rules pose constraints on the data or on the business logic to ensure their consistency in the database or knowledge

6 http://www.omg.org/spec/SBVR/1.0/

base. Without reactive rules, we cannot update a database or knowledge base by using deductive rules only.

Reactive rules are further subdivided into event-condition-action (ECA) rules and production rules. ECA rules are rules of the form ON Event IF Condition DO Action, where Action should be executed if the Event occurs, provided that the Condition holds. Production rules are rules of the form IF Condition DO Action, where Condition queries the working memory containing the data on which the rules operate. Action should be executed whenever a change to the underlying database makes Condition true [2].

In reactive rules, we verify the satisfaction of conditions and also execute the action whenever message arrival or timer event triggers the rule. Declarative rules extend their executive power by the combination of rule semantics and imperative programming in the action part.

2.2 Rules and Databases

As early as 1980, Ullman pointed out the principles of the integration of database and knowledge base systems [3] [4]. The foundation of database is relation algebra with SQL as a declarative database query language. However, first order logic (FOL) was also proposed as a way to represent “knowledge” and as a language for expressing operations on relations. The roots of relational theory is logic, and so we cannot deny that the foundation of relational DBMS is based on logic [5].

The simplest data model of FOL is “Datalog”, which was coined to suggest a version of Prolog suitable for database systems where it does not allow function symbols in Datalog’s predicate arguments. In the IDEA methodology, deductive rules and reactive rules were built on top of the object-oriented (OO) database as a way to express operations on the OO data model [6].

2.3 Rules and Ontologies

Concepts of the Semantic Web have been proposed by Tim Berners-Lee et al.

since 2001 [7]. Graph-based RDF(S), including RDF and RDF-schema were the first standardized ontology languages to represent an ontology’s schema and instances. Then, standardized ontology languages based on Description Logic (DL) [8], i.e., OWL-DL (later OWL 2), enhanced RDF(S) that plays the major role of knowledge representation for the Semantic Web. However, the logic pro-gram (LP) rule language was also introduced because of the limited expressive power of a DL-based ontology language in some situations, such as property chaining, and the manipulation of events, states, and actions.

Initially, the “rule” layer was laid on top of the “ontology” layer in the Seman-tic Web layered architecture but it has undergone several revisions reflecting the evolution of layers7. The most recent layered architecture of rule and ontology layers is one where they sit side by side to reflect their equal status but with some basic assumption differences between ontology and rule, such as the open world

7 http://www.w3.org/2007/03/layerCake.svg

assumption (OWA) vs. the closed world assumption (CWA), or the non-unique name assumption (non-UNA) vs. the unique name assumption (UNA) [9].

It will be a challenge to resolve these basic assumption differences when we combine rule and ontology to execute rule systems on the Web.

Rules and RDF(S) Inspired from F-Logic, TRIPLE8 was one of the earliest rule languages using Horn rules to access the RDF datasets. Another rule lan-guage called Notation3 (N3) uses a CWA forward reasoning engine to access the ontologies generated from RDF(S) 9. SPARQL is another W3C standardized query language for querying RDF datasets. SPARQL queries are represented as Datalog rules so SPARQL’s CONSTRUCT queries are viewed as deductive rules, which create new RDF triples from the RDF datasets.

Rules and OWL In addition to the Semantic Web Rule Language (SWRL) [10], Rule Interchange Format (RIF) is an emerging rule interchange language from W3C RIF WG [2]. It intends to provide core and extend languages with a com-mon exchange syntax for all of the classification rule languages, i.e., deductive, normative, and reactive rules. The requirements of integrating different types of rules with possible data (and meta data) accessing representation, i.e., RDB, XML, RDF, and OWL, drive the development of a RIF core interchange format, theRIF Core, and its extensions, RIF dialects. Another recent development is to combine RIF and OWL 2 in RIF, RDF, and OWL that specifies the interactions between RIF, RDF and OWL for their compatibilities10.

2.4 Combination of Rule and Ontology

A one-way knowledge flow exists from an ontology module to a rule module for knowledge acquisition, where an ontology module’s instances are imported as basic facts and filtered with conditions in the rules. This passive knowledge query only uses deductive rules. If a rule engine derives implicit new facts not in an ontology module and furthermore updates new facts back to an ontology module, then it provides another reverse knowledge flow from a rule module to an ontology module. In this two-way knowledge flow process, normative and reactive rules are also required to check the knowledge consistency and trigger the message passing for updating the ontology’s knowledge base.

The idea of combining rules and ontologies is to fulfill a goal of two-way knowledge flow. The combination is classified as two types: tightly coupled inte-gration and loosely coupled inteinte-gration [11]. In the tightly coupled inteinte-gration model, all of the terms in the rule’s body and head are specified in the ontol-ogy schema, but in the loosely coupled integration model we do not have this requirement. So, some rules have their own defined terms in the rules’ body or

8 http://triple.semanticweb.org/

9 http://www.w3.org/2000/10/swap/doc/cwm

10http://www.w3.org/2005/rules/wiki/OWLRL

head. This loosely coupled integration model enhances the expressive power of ontology and rule as compared to the tightly coupled one.

Description Logic Program (DLP) [12] and SWRL are two well-known tightly coupled integration models. In general, both DL and LP are subsets of FOL in knowledge representation but each has its own part that cannot be expressed in the other part. DLP only takes intersection of DL and LP so knowledge repre-sentation in this model is limited. In SWRL, the major knowledge reprerepre-sentation is OWL-DL with additional Datalog rules from LP to enhance the lack of prop-erty chaining in OWL-DL. In SWRL, DL-safe is the condition where variables occurring in each rule’s head are also required to occur in its body to ensure the decidable reasoning of the rule engine. The availability of SWRL rule and ontology integration development in the popular Prot´eg´e environment11 makes the SWRL model the most attractive one for people to use.

In the loosely coupled integration, DL-log [13], AL-log [14], and DL+Log [15]

are three well-known models. In these models, rules are extended to Horn rules.

Besides, not all of the terms in rules are required from ontology so rule module in these models provides more powerful knowledge representation and rule reason-ing than the ones in SWRL. However, none of loosely coupled integration models provide standardized XML markup languages and a development environment, as SWRL does in Prot´eg´e. Obviously, this will be a challenge to represent and execute rule systems for loosely coupled integration on the Web. Moreover, the reactive rules [16] have not been seriously considered in all of the ontology and rule integration models. This will be the biggest impediment to implement rule and ontology systems for distributed applications on the Web.