Agents and Knowledge Interoperability in the Semantic Web Era

advertisement
Tutorial
Agents and Knowledge Interoperability
in the Semantic Web Era
Nick Bassiliades
Logic Programming & Intelligent Systems Group
Dept. of Informatics
Aristotle University of Thessaloniki
Greece
Topic of the Tutorial
 How Semantic Web affects:
 knowledge and information interchange
 reasoning interoperability
among intelligent agents in multi-agent systems
 Parts of the tutorial:
1.
Interaction between semantic web rules and ontologies

2.

2
Agent’s internal knowledge base
Interoperability between reasoning systems for agents
Examples of actual implemented tools for semantic web
reasoning in multi-agents systems.
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
3
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
4
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rules and Ontologies in the SW
Introduction (1/3)
 Semantic Web (SW): vision of a universal medium for data and
knowledge exchange.
 Current technologies offer data and knowledge interoperability:
metadata – RDF, ontologies - OWL 2
 Research shifts to higher layers: logic and proofs
 Critical for agents: infer new knowledge and explain actions
 Increase trust in the SW
 Researchers focusing mainly on integration of rules and
ontologies
 OWL2 RL: Intersection of Horn logic and description logics
 SWRL: Union of Horn logic and description logics
 Standardization of rule representation: RuleML, RIF
5
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rules and Ontologies in the SW
Introduction (2/3)
 RDF and OWL are subsets of predicate logic
 Trade-off between expressive power and computational complexity
 Horn logic is another subset of predicate logic with efficient
proof systems
 a.k.a. rule systems, definite logic programs
 Description logics and Horn logic are orthogonal
 Both needed in expressing different kinds of knowledge in SW
 They use different reasoning engines
 Part 1 of tutorial discusses how SW rules and ontologies interact
 Agent’s internal KB for environment awareness and decision making
 Various ways of interaction, interoperation and integration
6
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rules and Ontologies in the SW
Introduction (3/3)
 Rules are important for the logic layer of SW
 Extensions or alternatives to DL based ontology languages
 Can be used to develop declarative systems on top of ontologies
 There is a lot of debate about the suitability of Logic
Programming (LP) in the domain of the SW
 However, problems emerged during the development of practical
OWL applications
 To overcome these, many research efforts focused on:
 the mapping of DLs into LP, or
 on the combination of DLs and LP
7
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rules and Ontologies in the SW
Uses
 Querying: DL reasoning engines have low ABOX reasoning and
querying performance.
 Combining DLs with the rule paradigm to state expressive
instance queries provides increased performance
 Non-monotonicity: DLs follow the principle of the open world
assumption.
 Sometimes it is preferable to introduce non-monotonicity in DLs
 e.g. negation as failure
 DLs’ expressivity: Rules can extend ontology languages.
 Integrity constraints: With rules we can define arbitrary
integrity constraints over the ABOX.
8
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Mapping Ontologies into Rules
 Since DLs and Horn Logic are orthogonal, this means that not
everything in DL can be expressed using rules
 In order to map ontologies into rules, a subset of OWL DL must be
found, so that OWL constructs can be mapped to LP
 DLP (Description Logic Programs) and the OWL2 RL profile of
OWL2 define the intersection of LP and DL
 Largest syntactic fragment of OWL DL that is implementable using
rules.
 Simpler than OWL Lite
 Enables interaction between description logics and rules
9
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWL 2 RL
 OWL 2 is based on Description Logic.
 A fragment of first-order logic
 Inherits the open-world assumption and non-unique-name
assumption of Description Logics
 OWL 2 RL is an interesting sublanguage of OWL 2 DL
 The largest fragment of OWL 2 on which the choice for CWA
and UNA does not matter
 OWL 2 RL is weak enough so that the differences between the
choices don’t show up.
 Still large enough to enable useful representation and reasoning
tasks.
10
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Open-World Assumption (OWA)
 We cannot conclude some statement x to be false simply because we
cannot show x to be true.
 The opposite assumption (closed world, CWA) would allow deriving falsity
from the inability to derive truth.
 OWL is strictly committed to the OWA
 In some applications is not the right choice
 Example in favor of OWA
 Question: “Did it rain in Tokyo yesterday?”
 Answer: “I don’t know that it rained, but that’s not enough reason to
conclude that it didn’t rain.”
 Example in favor of CWA
 Question: “Was there a big earthquake disaster in Tokyo yesterday?”
 Answer: “I don’t know, but if there had been such a disaster, I’d have heard
about it. Therefore I conclude that there wasn’t such a disaster.”
11
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Unique-Name Assumption (UNA)
 When two individuals are known by different names, they are in
fact different individuals.
 Sometimes works well and sometimes not
 In favor: when two products in a catalog are known by different
codes, they are different
 Against: two people in our social environment initially known
with different identifiers (e.g., “Prof. van Harmelen” and “Frank”)
are sometimes the same person
 OWL does not make the unique-name assumption
 It is possible to explicitly assert of a set of identifiers that they are all
unique using owl:allDifferent
12
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWL 2 RL Advantages
 The semantics can be implemented using rule-based technologies
 forward or backward chaining rule engines
 The reasoning is performed based on a predefined set of
entailment rules
 known as OWL 2 RL/RDF rules
 Benefits
 Scalable reasoning on a quite expressive subset of OWL 2
 Implemented by many state of the art large scale reasoners
 Even parallel implementations can be used
 Enables the definition of rule-based applications on top of ontologies
13
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Entailment Rules
 Simple if-then rules that assert new triples based on existing
ones
 condition-triples  conclusion-triples
 Conditions contain triple patterns with variables
 triple patterns match existing triples (facts)
 Conclusions derive new triples
 based on the variable bindings in the conditions
 Safe Rules: a variable in the conclusion should exist in the
condition
14
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWL 2 RL constructs
 Class and property equivalence
 Equality- inequality between individuals
 Inverse, transitive, symmetric and functional properties
 Intersection of classes
 Excluded constructors:
 Union, existential quantification, and arbitrary cardinality
constraints
 In general, it cannot infer new individuals not explicitly present
in the KB
15
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
RDF constructs
 A triple (a, P, b) is expressed as a fact P(a, b)
 Instance declaration type(a, C)
 a is an instance of class C
 expressed as C(a)
 C is a subclass of D: C(X) → D(X)
 Similarly for subproperty: P(X,Y) → Q(X,Y)
 Domain and Range Restrictions
 C is the domain of property P: P(X, Y) → C(X)
 C’ is the range of property P: P(X, Y) → C’(Y)
16
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWL Constructs
 equivalentClass(C, D) / pair of rules
 C(X) → D(X) / D(X) → C(X)
 Similarly for equivalentProperty(P, Q)
 P(X,Y) → Q(X,Y) / Q(X,Y) → P(X,Y)
 Transitive Properties: P(X, Y), P(Y, Z) → P(X, Z)
 Boolean operators.
 The intersection of C1 and C2 is a subclass of D
 C1(X), C2(X) → D(X)
 C is a subclass of the intersection of D1 and D2
 C(X) → D1(X)
C(X) → D2(X)
 The union of C1 and C2 is a subclass of D (not opposite)
 C1(X) → D(X) / C2(X) → D(X)
17
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWL Restrictions
 allValuesFrom(P, D)
 the anonymous class of all x such that y must be an instance of
D whenever P(x, y)
 C subClassOf allValuesFrom(P, D) (not opposite)
 C(X), P(X, Y) → D(Y)
 someValuesFrom(P, D)
 the anonymous class of all x for which there exists at least one y
instance of D, such that P(x, y).
 someValuesFrom(P, D) subClassOf C (not opposite)
 P(X, Y), D(Y) → C(X)
18
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Mapping Ontologies into Rules
Disadvantages
 The mapping approaches result in languages with restricted
expressiveness (semantics)
 Combination of DL and LP solve expressivity problem
 Homogeneous or hybrid approach
19
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
20
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Mapping Ontologies into Rules
Homogeneous approach
 Rule and ontology predicates are treated homogeneously, as
a new single logic language.
 Rules can use:
 unary and binary predicates from the ontology (classes and
properties)
 predicates that occur only in rules (rules predicates)
 To maintain decidability, the safety condition is needed
 Restricts variables occurring in the head of a rule to those that
occur in at least one positive rule predicate in the body of the
rule.
21
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Mapping Ontologies into Rules
Homogeneous approach
 The homogeneous approaches can be used either for
building rule programs on top of ontologies or ontologies
on top of rules.
 OWL semantics are mapped into a rule-based formalism that
coexist in the KB with rule predicates
 A new reasoner is needed, able to handle the new
homogeneous language
 The mapping approaches can be considered as the first step
for building a homogeneous system
22
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Semantic Web Rule Language (SWRL)
 W3C member submission rule language
 Extends OWL/OWL 2 DL with first-order rules to overcome the
limited expressivity of ontologies
 Function-free Horn logic, written in Datalog RuleML
 Allows class and property predicates to occur in the head and body of a
rule
 unrestricted combination of ontologies and rules
 follows the OWA and non-UNA
 … but it is undecidable
 DL-safe rules
 apply only on known individuals
 have limited expressivity but regain decidability
23
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rules in SWRL
 B1, …,Bn → A1, …, Am
 commas denote conjunction on both sides of the arrow
 A1, …, Am, B1, …, Bn can be
 C(x), P(x, y), sameAs(x, y), differentFrom(x, y)
 C is an OWL class description, P is an OWL property,
 x, y are Datalog variables, OWL individuals, or OWL data values.
 If the head of a rule has more than one atom the rule can be
transformed to an equivalent set of rules with one atom in the head
 conjunction of atoms without shared variables
 A(X,Y)→ B(X), C(Y)
 A(X,Y)→ B(X) ,
24
A(X,Y)→ C(Y)
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Complexity of SWRL
 Arbitrary OWL expressions (e.g. restrictions), can appear in
the head or body of a rule.
 This adds significant expressive power to OWL, but at the high
price of undecidability
 There can be no inference engine that draws exactly the same
conclusions as the SWRL semantics.
 SWRL vs. OWL 2 RL
 OWL 2 RL tries to combine the advantages of both languages in
their common sublanguage
 SWRL takes a more maximalist approach and unites their
respective expressivities.
25
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Example SWRL Rules
 Reclassification
 Man(?m) → Person(?m) / subclassOf relation in OWL
 Person(?m)  hasSex(?m, male) → Man(?m)
 Possible in OWL – hasValue (sufficient) restriction
 Not all such reclassifications are possible in OWL
 PropertyValue Assignment
 hasParent(?x, ?y)  hasBrother(?y, ?z) → hasUncle(?x, ?z)
 Property chaining
 Possible in OWL 2 - Not possible in OWL 1.0
 Person(?p)  hasSibling(?p,?s)  Man(?s) → hasBrother(?p,?s)
 Not possible in OWL
26
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Example SWRL Rules: Built-ins
 Built-ins dramatically increase expressivity
 most rules are not expressible in OWL 1
 Some built-ins can be expressed in OWL 2
 Person(?p)  hasAge(?p, ?age) 
swrlb:greaterThan(?age, 17) → Adult(?p)
 Person(?p)  hasSalaryInPounds(?p, ?pounds) 
swrlb:multiply(?dollars, ?pounds, 2.0)
→ hasSalaryInDollars(?p, ?dollars)
27
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
28
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Entailment-Based OWL Reasoning
 The EBOR paradigm enables the materialization of OWL
semantics into the KB of a rule engine using OWL entailment
(inference) rules.
 The EBOR paradigm is considered as a first step in realizing a
homogeneous combination of OWL and rules
 Allows to build rule programs on top of ontologies, as well as
ontologies on top of rule programs
 The rule program coexists with the inference rules
 Rule execution is interleaved with the inference procedure
29
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Architecture EBOR paradigm
 The asserted knowledge (ontology),
is mapped into an internal rule
engine representation format
 Inference rules (OWL entailments),
expressed in the language of the rule
engine, are applied to
 deduce new knowledge, or
 check consistency of the ontology
30
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
 Entailment rules have relatively
low computational complexity
 consistency is in P
 entailment is NP-complete
 if there are not blank nodes in P
WIMS 2012, June 13-15, Craiova,
Romania
Entailment Rules
 The semantics of the ontology can be (partially) captured
using entailment rules
 For RDF and RDFS there is a complete set of entailments
 http://www.w3.org/TR/rdf-mt
 Example: rdfs9 entailment rule (N-Triple notation)
 Defines the subsumption characteristic of the rdfs:subClassOf
property
if
<c> <rdfs:subClassOf> <d> . ∧
<x> <rdf:type> <c> .
then <x> <rdf:type> <d> .
31
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
pD* Semantics
 There is no such a complete set of entailment rules for OWL
 The pD* semantics is a weakened variant of OWL Full
 Realized by 23 entailment rules and 2 inconsistency rules.
 Inspired the OWL 2 RL profile
 Example: rdfp4 entailment
 Handles the values of transitive properties defined using the
owl:TransitiveProperty OWL construct
if
<p> <rdfs:type> <owl:TransitiveProperty> . ∧
<s> <p> <x> . ∧
<x> <p> <z> .
P(S, X), P(X, Z) → P(S, Z)
then <s> <p> <z>.
32
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EBOR System Development Issues
 Ontology mapping
 Inferencing process
 Query support
33
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EBOR System Development Issues
Ontology mapping
 An EBOR system should define a mapping procedure of the
ontological knowledge into the KB of the rule engine
 This mapping is performed over the ontology triples.
 The purpose is to generate an internal, rule engine-specific
representation of the ontological information where the
entailment rules will be applied on.
34
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EBOR System Development Issues
Inferencing process
 An EBOR system should implement the desirable number of
entailment rules expressed in the engine’s rule language.
 This defines the reasoning completeness of the EBOR system
 There are implementations of different expressiveness according
to the number of implemented entailments
35
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EBOR System Development Issues
Query support
 An EBOR system should be able to answer queries about the
derivations of its KB.
 The query infrastructure is implemented with query rules.
 Query rules follow either the rule language of the rule engine,
or they have a standard-based syntax.
36
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Approaches for developing EBOR systems
 Extended approach (E-EBOR)
 An E-EBOR system is built on top of an existing, general purpose
rule engine
 Augments it with the ability of manipulating ontological information
 Needs:
 To transform ontology into facts
 To populate rule base with the appropriate inference rules
 Native approach (N-EBOR)
 A N-EBOR system is built from scratch
 Draws conclusions directly on the OWL data model
 E.g. Jena2, Bossam, OWLIM, BaseVISor
37
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Advantages and Disadvantages
 Reasoning Performance
 A N-EBOR system is built directly on the OWL data model and it
has increased reasoning performance (speed)
 An E-EBOR system does not apply any optimization in handling
ontological information
 Ontology Utilization
 An E-EBOR system utilizes the ontology via rule-based applications
 User-defined rules can operate over the inferred knowledge
 An N-EBOR system throws away established and efficient rule
engines.
 User-defined rules are usually hard to be encoded
38
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
39
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
The O-DEVICE System
 O-DEVICE is an EBOR system
 Built on top of the CLIPS production rule engine
 It transforms the ontology into the object-oriented model of the
COOL language of CLIPS
 It applies entailment rules on the generated object-oriented
schema
 pd* (in OWL 1), OWL 2 RL (in OWL 2)
 Entailment rules are implemented as production rules
 Conditions match objects, instead of RDF triples
 Actions insert or modify objects, instead of deriving axioms
40
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
CLIPS Production Rule Engine
(… a few words …)
 A RETE-based production rule engine
 Utilizes 3 programming paradigms
 rule programming, functional programming and object oriented
programming
 Utilizes 2 data/knowledge modeling paradigms
 Fact-based
 ordered and non-ordered (deftemplates) facts
 rules match facts
 Object-Oriented
 the KB consists of classes with slots (attributes) and objects
 rules match objects
41
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
CLIPS Object-Oriented Language
(COOL)
 Integrates the production rule paradigm with OO
data/knowledge modeling
 Knowledge is represented in terms of
 Classes (defclass)
 slots: single-field or multi-field (multislot)
 facets/constraints: describe various features of slots
 single/multiple inheritance
 Objects (make-instance or definstances)
42
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Classes and slots: Basic syntax
(defclass <name>
(is-a <superclass-name>+)
(<slot> <constraint>*)*
(<multislot> <constraint>*)*)
 The name of the class
 A lists of its superclasses
 Definition of the slots of the class (slot, multislot)
 type, allowed-values, allowed-classes, ….
43
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Class Examples
(defclass Human
(is-a USER)
(slot age (type INTEGER)
(range 1 100))
(slot married (type STRING)
(allowed-values yes no))
(multislot hasParent
(type INSTANCE-NAME)
(allowed-classes Human)))
(defclass Man
(is-a Human))
44
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Instances: Basic Syntax
(make-instance [<name>] of <class>
[(<slot-name> <values>)]*)
 Every object has a name (inside square brackets)
 A single class as the direct class type
 Based on the subclass hierarchy, objects inherit also the class
types of the superclasses
 The objects can use the slots inherited from the superclasses
 Values in slots may also be defined
45
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Instance Example
(make-instance [george] of Man
(age 28)
(married no)
(hasParent [Peter] [Mary]))
46
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Matching Objects in Rules
 CLIPS OO rules are defined by:
 A left hand side (LHS) that matches object patterns
 A right hand side (RHS) that contains actions to execute (possibly on
objects)
(defrule rule-name
(object-pattern-1)
(object-pattern-2)
...
=>
(action-1)
(action-2)
...
)
47
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Object Patterns: Basic Syntax
<object-pattern> ::=
(object <attribute-constraint>*)
<attribute-constraint> ::=
(is-a <constraint>) |
(name <constraint>) |
(<slot-name> <constraint>*)
 The is-a constraint is used for specifying class constraints
 The name constraint is used for specifying a specific object on which
to pattern-match
 Constraints are also used in slots/multislots in order to restrict certain
type of values.
 A single-value variable is denoted as ?x
 A multivalue variable is denoted as $?x
48
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rule Example
 “mark checked all adult men“
(defrule test-rule
(object (is-a Man) (name ?x)
(age ?age) (checked no))
(test (> ?age 17))
=>
(modify-instance ?x (checked yes))
)
49
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
O-DEVICE Architecture
OWL Ontology
Ontology Loader
Triples
Triple-to-Object Transformation
Initial set of COOL Objects
T-Box rule-based reasoner
A-Box rule-based reasoner
COOL Ontology model
50
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
O-DEVICE transformation procedure
 O-DEVICE loads into main memory OWL ontologies in the form
of triples
 Then, it applies a set of transformation rules in order to generate
an object-oriented schema of classes, attributes (slots) and objects.
 Triples transformed to a initial set of objects
 Initial set of objects gradually transformed into the ontological OO
model
 Both steps can be incremental
51
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Transformation rules
52
 transitive
 functional (and min cardinality)
 symmetric
 inverse functional
 subproperty
 universal quantifiers
 inverse
 skolem/existential
 equivalent
 classification
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Basic Transformation Semantics
 OWL concepts  COOL classes
 <C rdf:type owl:Class>  (defclass C …
 OWL properties  class slots
 <p rdfs:domain C>  (defclass C (multislot p …
 Properties are no longer first-class citizens
 Offers increased performance due to less joins
 <p rdfs:range C>  (slot p (allowed-classes C))
 OWL individuals  COOL objects
 <a rdf:type C>  (make-instance [a] of C)
 Class subsumption  class inheritance
 <C rdfs:subClassOf D>  (defclass C (is-a D))
 Generation of domain-dependent OO entailment rules
 e.g. for class intersection, symmetric properties, restriction classes ….
 Offers increased performance due to less joins
53
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Ontology Example (RDF/XML)
<owl:Class rdf:ID = "Region" />
<owl:TransitiveProperty rdf:ID = "subRegionOf" >
<rdfs:domain rdf:resource="#Region" />
<rdfs:range rdf:resource="#Region" />
</owl:TransitiveProperty>
<Region rdf:ID = "region1" />
<Region rdf:ID = "region2" >
<subRegionOf rdf:resource="#region1" />
</Region>
<Region rdf:ID = "region3">
<subRegionOf rdf:resource="#region2" />
</Region>
54
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Ontology Example (N-Triples)
t1: <Region> <rdf:type> <owl:Class> .
t2: <subRegionOf> <rdf:type>
<owl:TransitiveProperty> .
t3: <subRegionOf> <rdfs:domain> <Region> .
t4: <subRegionOf> <rdfs:range> <Region> .
t5: <region1> <rdf:type> <Region> .
t6: <region2> <rdf:type> <Region> .
t7: <region3> <rdf:type> <Region> .
t8: <region2> <subRegionOf> <region1> .
t9: <region3> <subRegionOf> <region2> .
55
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Transformed Ontology in O-DEVICE
(defclass Region
(is-a owl:Thing)
(multislot subRegionOf
(type INSTANCE-NAME)
(allowed-classes Region))
)
(make-instance [region1] of Region)
(make-instance [region2] of Region
subRegionOf [region1])
(make-instance [region3] of Region
subRegionOf [region2])
56
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Multiclass instances
<x> <rdf:type> <Class1> .
<x> <rdf:type> <Class2> .
 In OO languages an object can be an instance of a single class only
 O-DEVICE handles this by creating a subclass T of the two classes
and defines x to be an instance of T
(defclass T
(is-a Class1 Class2))
(make-instance [x] of T)
57
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
A-Box Reasoning
 The reasoning procedure of O-DEVICE separates TBOX and
ABOX reasoning
 T-Box reasoning uses static production rules
 A-Box reasoning follows a template-based methodology
 Dynamically generated domain-dependent entailment rules
 Match degree of expressiveness of the loaded ontology
58
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
O-DEVICE A-Box Entailment Rules
Property Transitivity (rdfp4)
 Domain independent template rule
(defrule <rule-name>
(object (is-a <pd>) (name ?o1) (<p> $? ?o2 $?))
=>
(bind $?v1 (send ?o1 get-<p>))
(bind $?v2 (send ?o2 get-<p>))
(send ?o1 put-<p> (union $?v1 $?v2)))
 Domain-dependent entailment rule
(defrule subRegionOf
(object (is-a Region) (name ?o1)
(subRegionOf $? ?o2 $?))
=>
(bind $?v1 (send ?o1 get-subRegionOf))
(bind $?v2 (send ?o2 get-subRegionOf))
(send ?o1 put-subRegionOf (union $?v1 $?v2)))
59
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
O-DEVICE Query Language
 Querying through the deductive rule language of O-DEVICE
 Rule conclusions represent derived classes
 Derived objects are generated by evaluating rules over the current set of objects
 Each deductive rule is implemented as a CLIPS production rule
 Creates a derived object when the condition of the deductive rule is satisfied
 Query example: retrieve the instances of the Region class that are
subregions of region1
(deductiverule region-instances
?id <- (Region (subRegionOf $? [region1] $?))
=>
(DERIVED (result ?id)))
 The query will generate two objects of the DERIVED class OID, with the
region2 and region3 instances in their result slot.
60
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System (Related Systems: OWLJessKB, F-OWL)
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
61
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWLJessKB
 Built on top of JESS
 A production rule engine developed in Java
 Unique features: backwards chaining, working memory queries,
direct manipulation of Java objects.
 Functionality:
 Translation of OWL ontologies into RDF triples
 Transformation into JESS facts
 Application of the OWL entailment rules over these facts
(deftemplate triple
(slot predicate)
(slot subject)
(slot object))
62
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWLJessKB Triple Facts - Example
(triple (predicate "rdf:type") (subject "Region")
(object "owl:Class"))
(triple (predicate "rdf:type") (subject "subRegionOf")
(object "owl:TransitiveProperty"))
(triple (predicate "rdfs:domain") (subject "subRegionOf")
(object "Region"))
(triple (predicate "rdfs:range") (subject "subRegionOf")
(object "Region"))
(triple (predicate "rdf:type") (subject "region1")
(object "Region"))
(triple (predicate "rdf:type") (subject "region2")
(object "Region"))
(triple (predicate "rdf:type") (subject "region3")
(object "Region"))
(triple (predicate "subRegionOf") (subject "region2")
(object "region1"))
(triple (predicate "subRegionOf") (subject "region3")
(object "region2"))
63
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWLJessKB A-Box Entailment Rules
Property Transitivity (rdfp4)
(defrule transitive-property
(triple (predicate "rdf:type") (subject ?prop)
(object "owl:TransitiveProperty"))
(triple (predicate ?prop) (subject ?x)
(object ?y))
(triple (predicate ?prop) (subject ?y)
(object ?z))
=>
(assert (triple (predicate ?prop) (subject ?x)
(object ?z))))
 Derivation:
(triple (predicate "subRegionOf")
(subject "region3") (object "region1"))
64
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWLJessKB Query Language
 Based on the defquery construct of JESS
 A special kind of rule with no right-hand-side (RHS).
 A query is a pattern that is used to search the working memory and the
matched facts are returned in a list.
 Example query:
(defquery region-instances
(triple (subject ?s) (predicate "rdf:type")
(object "Region"))
(triple (subject ?s) (predicate "subRegionOf")
(object "region1")))
 The example query matches 2 sets of facts which can be retrieved using
the OWLJessKB Java API.
65
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
OWLJessKB Triple Facts - Example
(triple (predicate "rdf:type") (subject "Region")
(object "owl:Class"))
(triple (predicate "rdf:type") (subject "subRegionOf")
(object "owl:TransitiveProperty"))
(triple (predicate "rdfs:domain") (subject "subRegionOf")
(object "Region"))
(triple (predicate "rdfs:range") (subject "subRegionOf")
(object "Region"))
(triple (predicate "rdf:type") (subject "region1")
(object "Region"))
(triple (predicate "rdf:type") (subject "region2")
(object "Region"))
(triple (predicate "rdf:type") (subject "region3")
(object "Region"))
(triple (predicate "subRegionOf") (subject "region2")
(object "region1"))
(triple (predicate "subRegionOf") (subject "region3")
(object "region2"))
(triple (predicate "subRegionOf") (subject "region3")
(object "region1"))
66
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
F-OWL
 Built on top of Flora2 an implementation of F-Logic
 Makes use of XSB Prolog
 Transforms ontology triples into F-logic
 Knowledge representation paradigm of frames
 F-Logic extends first-order logic with:
 Objects with complex internal structure
 Class hierarchies and inheritance
 Typing, Encapsulation
 F-logic integrates logic programming with OO programming
 Natural candidate for an ontology language
 Direct support for OO concepts, frame-based syntax, extensive
support for meta-programming
67
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Ontology concepts
 F-logic supports definition of concepts and hierarchy
 A :: B (A is subclass of B)
 Example ontology:
 Region[subRegionOf *=>> Region]
 =>> symbol: a multivalue
 * symbol: inheritable instance attribute
 Hierarchical relationships imply property inheritance and
class membership transitivity.
68
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Ontology instances
 Declaration of the concept where instance belongs (: notation)
 Declaration of values in the corresponding properties.
 Example ontology:
region1:Region.
region2:Region.
region3:Region.
region2[subRegionOf =>> region1].
region3[subRegionOf =>> region2].
69
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
F-OWL Transformation Procedure
 F-OWL achieves a compact and human-friendly representation
of the ontological information
 Ontology triples are mapped into Flora2 triple(s, p, o) facts
 A set of transformation rules generate F-logic code
 Examples:
 Ontology triples transformed into Flora2 statements
S[P->>O] :- triple(S, P, O).
 Instance definitions
A:B :-
70
A[rdf_type ->> B].
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
F-OWL A-Box Entailment Rules
Property Transitivity (rdfp4)
 OWL semantics are implemented as Flora2 Prolog-like rules that
operate over the generated KB.
S[P->>V] :P[rdf_type->>owl_TransitiveProperty],
S[P->>X],
X[P->>V].
 The following F-logic statement is inferred in the region ontology
region3[subRegionOf =>> region1].
71
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
F-OWL Query Language
 Both schema and individual objects can be queried by putting
variables in the appropriate positions in the Prolog-like rules.
 Example query:
X : Region [subRegionOf ->> region1].
72
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
73
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Hybrid Approach
 Modular architecture of 2 subsystems
 Each deals with a distinct portion of the KB
 Combination of
 Reasoning capabilities of a DL reasoner
 Rule execution capabilities of a rule engine in order to define rules
on top of the ontological information
 Rule and ontology predicates are strictly separated
 Ontology predicates can be used as constraints in rules
 The hybrid approaches can be further classified into
bidirectional and unidirectional
 According to whether the derived knowledge flows from the rule
module to the DL module or not.
74
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Bidirectional vs. Unidirectional
 Bidirectional hybrid approach:
 DL constraints can be used in the head of the rules
 The ontological knowledge is altered, allowing the development of
ontologies on top of rules
 Unidirectional hybrid approach:
 Information flows only from DL component to rule component
 Allows only rule predicates to be used in rule heads
 Ontological information remains unchanged
 Can be implemented as a one-time mapping of the results of the
external OWL reasoner to the data model of the rule engine
 Rule engine can operate without calling further the ontology reasoner
75
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
76
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
The CLIPS-OWL Framework
 CLIPS–OWL is a unidirectional hybrid approach
 Represents the extensional results of DL reasoning on OWL
ontologies as OO models in CLIPS
 CLIPS uses these OO models as static query models
 Motivation:
 Answer extensional ontology queries using RETE
 Develop production rule programs, without runtime interfacing an
external DL reasoner
 Any CLIPS-based application may enhance its functionality by
incorporating ontological knowledge without modifying the
architecture of the CLIPS rule engine
 Current implementation uses Pellet DL reasoner
77
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
CLIPS-OWL Architecture
OWL Ontology
DL Reasoner (Pellet)
CLIPS-OWL
Class Transformer
Property Transformer
Instance Transformer
CLIPS/COOL source code
78
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
CLIPS-OWL vs. O-DEVICE
 The object-oriented data model of CLIPS–OWL is exactly the
same as that of O-DEVICE
 The reasoning process is different
 O-DEVICE uses a rule-based ontology reasoner
 It is incomplete
 CLIPS-OWL uses a DL-reasoner
 It is complete
 CLIPS-OWL is better when a one-time transformation is needed
 Speed (especially of A-Box) reasoning is not important
 O-DEVICE is better when ontology is updated continuously
 Rule-based incremental reasoning
 A-Box reasoning is faster
79
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
CLIPS-OWL vs. DL-Reasoners
 Why not using the rule facilities of an existing DL-Reasoner,
to build rule programs on top of ontologies?
 CLIPS-OWL intention is NOT to substitute DL-Reasoners
 Main intention is to extend CLIPS (a popular rule engine) with
the ability to use ontologies for rule-based applications
80
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Advantages of one-time mapping
 The complete ontological knowledge is accessible by rules
 Straightforward development of rule-based applications that use
ontological knowledge
 A continuous interaction between the RETE-based rule engine
and the DL-reasoner would require a great amount of changes
to RETE, with unpredictable results
 Ontology changes should be propagated to the RETE structure
incrementally
 If rules just “read” the ontology and don’t change it, then this is an
unnecessary complication
 CLIPS–OWL has been successfully used to develop an expert
system in the domain of software engineering
 Software AntiPatterns - software project management knowledge
81
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
82
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
The DLE Framework
 In many practical applications:
 TBox is not (or rarely) modified by applications at run-time
 ABox is continuously modified or enriched with new individuals
 Need for scalable implementations
 DL reasoners do not scale-up well (exponential complexity).
 The DLE framework combines:
 completeness of DL reasoners for TBox reasoning
 low complexity of a production rule engine for ABox reasoning
83
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Benefits and Pitfalls of EBOR
(e.g. O-DEVICE)
- Reasoning Incompleteness
 Incomplete set of (TBox/ABox) entailments
 Handles a subset of OWL
+ The reuse of general-purpose rule engines
+ The ability to handle large extensional knowledge (ABox)
84
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DLE Framework
 Disengage the TBox EBOR procedure from any TBox entailment
implementation
 It can be done seamlessly and efficiently by DL reasoners
 Example:
if <?p owl:inverseOf ?q>
<?g owl:inverseOf ?q>
then <?p owl:equivalentProperty ?q>
 Bossam, OWLJessKB and Jena do not deduce such TBox relationship,
whereas, for example, Pellet supports it.
 DLE uses a DL reasoner for TBox reasoning only (+ consistency)
 Increase the scalability of memory-based EBOR ABox reasoning
 ABox reasoning is performed by dynamically generated rules
 Faster ABox reasoning procedure
 Less memory requirements
85
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Triple Classification
 Terminological (T-triple) <s p o>T
 Defines a TBox (class and role) axiom
 e.g. subclass relationships, class equivalence, property types, etc.
 examples: <hasSex rdfs:domain Person>T,
<Person rdf:type owl:Class>T ...
 Assertional (A-triple) <s p o>A
 Defines an ABox axiom
 e.g. instance class membership, instance equality/inequality
(owl:sameAs), etc.
 examples: <george rdf:type Student>A,
<george hasSex male>A ...
86
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Entailment Classification
Forward-chaining Entailment Rule
(condition-triples)  (conclusion-triples)
 Terminological (T-entailment): Contains only T-triples in the conclusion
rdfs11: ?c subClassOf ?dT ?d subClassOf ?kT 
?c subClassOf ?kT TBox
ext1: ?p domain ?cT ?c subClassOf ?dT  ?p domain ?dT
 Hybrid (H-entailment): Contains both T- and A-triples
in the condition and only A-triples in its conclusion
rdfs2: ?p domain ?cT ?x ?p ?yA  ?x type ?cA
rdfs9: ?c subClassOf ?dT ?x type ?cA  ?x type ?dA
ABox
 Exceptional (E-entailment): Contains only A-triples
in the condition and conclusion
rdfp6: ?x sameAs ?yA  ?y sameAs ?xA
rdfp7: ?x sameAs ?yA ?y sameAs ?zA  ?x sameAs ?zA
87
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DLE Framework: 2 Distinct Components
 DL component
 DL reasoning
 Handles the terminological part (TBox)
 Rule component
 Dynamic rule base (ABox entailments)
 Handles the assertional part (ABox)
DLE Framework
DL Component
DL
Reasoner
88
Rule Component
TBox
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
Rule
Engine
ABox
WIMS 2012, June 13-15, Craiova,
Romania
DL Component
 Consists of a DL Reasoner for
 class equivalence
 concept subsumption
 satisfiability
 NO instance realization
 It substitutes the T-entailments of EBOR
 e.g. the subclass transitivity entailment
rdfs11: ?c subClassOf ?dT ?d subClassOf ?kT
 ?c subClassOf ?kT
89
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rule Component
 Applies the H- and E-entailments (ABox entailments)
 The H-entailments would not be activated (no T-triples)
rdfs2: ?p domain ?cT ?x ?p ?yA  ?x type ?cA
 Solution A
 Transform the terminological part into facts
 Merge them with the ABox facts
 Apply the ABox entailments
 pos: increased TBox inferencing capabilities
 cons: there is no boosting of ABox reasoning procedure
 Solution B (our approach)
 Remove the T-triples from the H-entailments’ condition
 Generate domain-dependent entailments (Querying the DL KB)
 pos: reduce complexity, only the needed ABox entailments exist
90
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
T-dependency
An A-triple tA is T-dependent to a T-triple tT (tA  tT):
if ?c  tA : ?c  tT
Each variable ?c is called a T-dependent variable ([?c])
Example 1: rdfs2
?p domain ?cT ?x ?p ?yA  ?x type ?cA
1. ?x [?p] ?yA  [?p] domain ?cT
2. ?x type [?c]A  ?p domain [?c]T
Example 2: rdfp1
?p type FunctionalPropertyT ?x ?p ?yA ?x ?p ?zA
 ?y sameAs ?zA
1.
2.
91
?x [?p] ?yA  [?p] type FunctionalPropertyT
?x [?p] ?zA  [?p] type FunctionalPropertyT
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
A-Box Entailment Generation
 Handles the H-entailments only
 Step 1: Remove any T-triple from the condition
 Step 2: Ground the unbound T-dependent variables of the
remaining A-triples (querying the DL component)
 Example:
 Let two properties pA and pB with the domains CA and CB
rdfs2: ?p domain ?cT ?x ?p ?yA  ?x type ?cA
1.?x [?p] ?yA  ?x type [?c]A
2.?x pA ?yA  ?x type CAA
?x pB ?yA  ?x type CBA
92
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
Although more rules are
applied, the ABox reasoning
procedure terminates faster
due to less joins
WIMS 2012, June 13-15, Craiova,
Romania
DLEJena
 An implementation of the DLE framework for the OWL 2 RL
profile
 Uses the Pellet DL reasoner and the forward-chaining rule engine
of Jena
 DLEJena handles entailments beyond the OWL 2 RL profile
 T-Box reasoning is complete because a DL-reasoner is used
 DLEJena makes use of the Jena API
 Supports all the Jena-specific interfaces (e.g. SPARQL queries)
93
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DLEJena Architecture
94
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services - Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
95
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Motivation
 SW brings interoperability for web information systems
 Agents need this interoperability
 to work seamlessly in the web
 to achieve tasks on behalf of the users
 Interoperability is in several levels:
 Syntactic – use of common language formats
 e.g. XML (parsers)
 Semantic – use of common data model
and vocabulary
 e.g. RDF (data), OWL (schema)
 These interoperability solutions are
more or less stable in the current
SW standards
96
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Motivation
 The next level of interoperability needed is in Logic and in
Proof
explanations why certain
conclusions were made
rules of inference that manipulate
data in order to infer new data or
conclusions
97
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Motivation
 Logic / rules have a new standard (RIF)
 but its adoption is not as wide as OWL, RDF, XML
 WHY?
 Rules Standards DEFINE not a single language
 BUT a family of languages
• Share same syntax
• Differ in semantics (entirely/ partially)
In the Proof layer things are even more
primitive since there is no standard.
98
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Standard rule/logic
language use
Agent 1
provides
provides
Rule base in
native language 1
Fact base in
native language 1
translation
translation
Rule base in
Standard language
Fact base in
Standard language
translation
translation
Rule base in
native language 2
Fact base in
native language 2
receives
receives
FACT CHAIN:
1. Usually entire chain in
RDF or OWL, or
2. Translation from-to
RDF/OW is more easily
achievable
Agent 2
99
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EMERALD Proposal
 Complete translation between rule languages is:
 Hard to achieve
 Sometimes not possible at all
 Because of the diversity in semantics between rule languages
 EMERALD solution:
 Use trusted third-party reasoning services (in an agent
framework)
 Responsible for executing the inference on the original rule base
 No transformation
100
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Exchanging Semantics
 But then how the semantics of the exchanged rule base are
going to be understood by the receiving agent?
 Semantics of a rule base ≡ conclusions that can be derived
 Sending only the conclusions, the semantics are communicated
 Why should agent2 trust that agent1 run the rule base
completely?
 It shouldn’t!
 It can trust an independent agent with good reputation of
providing “good” reasoning services
101
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Exchanging Semantics
Reasoner 1
Sends
rule + fact base
provides
Agent 1
provides
Rule base in
native language 1
receives
Receives
conclusions
Agent 2
Fact base in
RDF
Reasoner 1
Who is able to
run language 1
Directory service
(Reputation mechanism)
102
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EMERALD
KC Model
A Multi-Agent Knowledge-Based
Framework
EMERALD
 Extends JADE MAS
 Logic programming
 R-DEVICE (Datalog)
 Prova (Prolog)
 Defeasible Logic
 SPINdle (propositional)
 DR-DEVICE, DRProlog (first-order)
103
AYPS
BJL
KC-Agents prototype
AYPS
Trust Manager
 Implements many
reasoning services
(Reasoners)
JESS KB
Reasoning Engine - 1
Reasoner - 1
Personal agent - 1
Reasoning Engine - Ν
Reasoner - Ν
Personal agent - Ν
REQUEST
INFORM
Personal Agent
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
User - 1
User - Ν
Rule Base
Inference Results
Reasoner
Reasoning Engine
WIMS 2012, June 13-15, Craiova,
Romania
Reasoners
 Features:
104
 Functionality:
 Built as agents
 stands by for new requests
 Act as like web services
 gets a valid request
(provide reasoning services)
 Launch an associated reasoning
engine
 launches the reasoning
service
 returns the results
(ACLMessage
(communicative-act REQUEST)
(sender AgentA@xx:1099/JADE)
(receiver xx-Reasoner@xx:1099/JADE)
....
(protocol protocolA)
(language “English”)
(content C:\\rulebase.ruleml))
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Benefits of the Approach
 The only sequential operation is the transfer of requests and results
between reasoning engines and the requesting agents
 Low demand in time
 Multiple requests can be served almost concurrently
 Reasoners do not use a particular rule language
 They simply transfer URLs via ACL messages
 The content has to be written in the appropriate rule language
 It is up to the requesting agent to provide the appropriate files, by considering
the rule engines specifications
 New reasoners can be easily added by building a new agent that
manages messages between the requesting agent and the rule engine
105
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services – Reasoners (R-DEVICE, DR-DEVICE)
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
106
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
R-DEVICE Reasoner
 R-DEVICE is a deductive object-oriented knowledge base
system for querying and reasoning about RDF metadata
 Precursor to the O-DEVICE system
 Transforms RDF triples into CLIPS (COOL) objects
 Resources are mapped to objects and properties are encapsulated
inside resource objects
 Uses a deductive rule language for querying and reasoning
 Forward-chaining Datalog
 Fewer joins required for accessing the properties of a single
resource
 Better inference/querying performance
107
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
R-DEVICE Deductive Rule Language
 Syntax:
 CLIPS-like
 RuleML-like
 Semantics
 Datalog, F-Logic
 Supports second-order syntax
 Variables can range over classes and properties
 Efficiently translated into sets of first-order logic rules using
RDF Schema information
108
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Sample R-DEVICE Rule - CLIPS
(deductiverule r4
(carlo:apartment (carlo:name ?x)
(carlo:pets “no"))
=>
(not-acceptable (appname ?x))
)
109
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Sample R-DEVICE Rule - RuleML
<imp>
</_rlab ruleID="r4" ruletype="deductiverule">
<_head>
<atom>
<_opr> <rel>not-acceptable</rel> </_opr>
<_slot name="appname"> <var>x</var> </_slot>
</atom>
</_head>
<_body>
<atom>
<_opr> <rel href="carlo:apartment"/> </_opr>
<_slot name="carlo:name"><var>x</var> </_slot>
<_slot name="carlo:pets"><ind>"no"</ind></_slot>
</atom>
</_body>
</imp>
110
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
R-DEVICE Rule Language Semantics
 Similar to Datalog with semi-naive evaluation proof procedure
 OO syntax in the spirit of F-Logic
 When the condition of the rule is satisfied, then the conclusion is
derived and the corresponding object is materialized (asserted) in
the knowledge base.
 Deductive rules are translated to CLIPS production rules
 R-DEVICE supports non-monotonic conclusions
 When the condition of a rule is falsified (after being satisfied), then
concluded object is deleted (retracted).
 Truth maintenance
 R-DEVICE also supports negation-as-failure.
111
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services – Reasoners (R-DEVICE, DR-DEVICE)
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
112
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DR-DEVICE – Reasoning Engine
 Reasoning about RDF metadata over multiple Web sources
using defeasible logic
 Built on top of CLIPS
 Extension of R-DEVICE
 Supports:
 all rule types of defeasible logic
 priorities among rules
 2 kinds of negation (classical & default)
 conflicting literals, modal/deontic operators, proofs, ...
 RuleML-compatible syntax (+ CLIPS-like syntax)
113
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Reasoning – Characteristics
 Reasoning with incomplete & contradicting information
 Enhanced representational capabilities + low computational
complexity
 For propositional logic, linear complexity
 Facts, rules, conflicts & priorities among rules
 Sceptical: conflicting rules do not fire
 Consistency of drawn conclusions is preserved
 Classical negation in heads-bodies
 negation-as-failure can be emulated
 Conflicting literals, modal/deontic operators, …
114
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Reasoning – Applications
 Reasoning with Incomplete Information
 communication problems
 privacy / security concerns
 Rules with Exceptions
 security policies & business rules
 e-contracting, brokering & agent negotiations
 Default Inheritance in Ontologies
 inherited values may be overridden or cancelled
 Ontology Merging
 conflicts in ontology integration
115
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Reasoning – Rule Types
r1: apartment(X) → house(X)
“Apartments are houses”
 Defeasible: r2: apartment(X)  acceptable(X)
“Any apartment is considered to be acceptable”
 Defeaters:
r3: ¬pets(X), gardenSize(X,Y), Y>0 acceptable(X)
“If pets are allowed in the apartment, but the apartment has a garden,
then it might be acceptable”
 Strict:
 This defeater can defeat, for example, the following rule:
r4: ¬pets(X)  ¬acceptable(X)
116
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Reasoning
Superiority Relationship
 Resolves conflicts among rules
 r2 > r1 (r2 is superior to r1, r2 may override r1)
 Example:
r2: apartment(X)  acceptable(X)
r4: ¬pets(X)  ¬acceptable(X)
 If r4 > r2, then we can indeed conclude that the apartment is
considered unacceptable
117
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Reasoning
Conflicting Literals
 Literals are often considered to be conflicting and at most one of a
certain set should be derived.
 Example:
 Price negotiation: only one offer should be made by the potential buyer.
 The offer can be determined by several rules, whose conditions may or
may not be mutually exclusive.
 All rules have offer(X) in their head (offer is usually a positive literal)
 Only one rule should “fire”, based on superiority relations among them.
 Conflict set:
C(offer(x,y)) =
{¬offer(x,y)}  {offer(x,z) | z  y}
118
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Reasoning
Conflicting Literals Example
 The following rules make an offer for a given apartment, based
on the buyer’s requirements
 The second is more specific and its conclusion overrides the
conclusion of the first
r5:appartment(X),size(X,Y),Y≥45,garden(X,Z)
 offer(X,250+2*Z+5*(Y−45))
r6:appartment(X),size(X,Y),Y≥45,garden(X,Z),
central(X) offer(X,300+2*Z+5*(Y−45))
r6 > r5
119
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DR-DEVICE – Reasoning Engine
 DR-DEVICE is based on R-DEVICE
 Inputs RDF documents from the Web
 Transforms RDF metadata to objects in CLIPS
 These are the facts of the defeasible theory
 After the inference, exports results (conclusions) as an RDF
document
 Rule conclusions are materialized as objects
 Defeasible rules are translated to CLIPS production rules
 2-step transformation
 Defeasible rules  deductive rules  production rules
120
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DR-DEVICE – Reasoning Engine
Internet
GUI
Results RDF/XML
USER
RuleML document
RuleML
documents
DR-DEVICE
RuleML documents
Logic Program
RDF/XML
documents
DR-DEVICE Rulebase
Loader
Input RDF
document URI
RDF/XML
ARP
RDF/
N-triples
RDF/XML
RDF/N-triple
Documents
Local Disk
RuleML/DR-DEVICE
Rulebase
Local Disk
Rule Translator
Results RDF/XML
Defeasible Rule
Translator
RDF triple
Translator
COOL
Objects
DR-DEVICE
XSLT
stylesheet
DR-DEVICE
Rulebase
RDF triple
Loader
RDF triples
Xalan
XSLT
Processor
Deductive Rule
Translator
RDF
Extractor
Results - Objects
CLIPS Rules
CLIPS / COOL
Results - Objects
121
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DR-DEVICE – Rule Example
CLIPS syntax
(defeasiblerule r2
(apartment (name ?X))
=>
(acceptable (name ?X)))
(defeasiblerule r4
(declare (superior r2))
(apartment (name ?X) (pets "no"))
=>
(not (acceptable (name ?X))))
122
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
DR-DEVICE – Rule Example
RuleML syntax
<Implies ruletype="defeasiblerule">
<oid><Ind uri="&carlo_rb;r4">r4</Ind></oid>
<head>
<Neg>
<Atom>
<op><Rel>acceptable</Rel> </op>
<slot><Ind>apartment</Ind><Var>x</Var></slot>
</Atom>
</Neg>
</head>
<body>
<Atom>
<op><Rel uri="carlo:apartment"/></op>
<slot><Ind>carlo:name</Ind><Var>x</Var> </slot>
<slot><Ind>carlo:pets</Ind><Data xsi:type="xs:string">no</Data></slot>
</Atom>
</body>
<superior> <Ind uri="&carlo_rb;r1"/> </superior>
</Implies>
123
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services – Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
124
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
KC-Agents
Knowledge-Customizable Agents
 Agents equipped with:
 Jess rule engine
 Knowledge base (KB): environment knowledge, agent behavior
patterns and strategies
 Aim: To be able to modify easily the KB, in order to easily
modify agent knowledge and behavior
 Not hard-coded into Java code (in JADE)
 Advantages: Declarativeness, Modularity, Reusability,
Maintainability, Interoperability of behavior between agents
125
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Agents Internal Knowledge & Behavior
 Facts
 Fu ≡ {fu1, fu2, …, fuk}, Fe ≡ {fe1, fe2, …, fem}, F ≡ Fu
Fe
 user-defined facts & environment-asserted facts
 Behavior: potential actions P (Jess production rules)
 P ≡A
C J
 A≡{a| fe←a(fu1, fu2, …, fun) {fu1, fu2,..., fun} Fu fe Fe}
 Derivation of new facts by inserting them into the KB
 C≡{c| ACLMessage←c(f1, f2, …, fp) {f1, f2,..., fp} F}
 Execution of a special action: agent communication
 J≡{j| JavaMethod←j(f1, f2, …, fq) {f1, f2,..., fq} F}
 Execution of a special action: Java calls (J)
126
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Agent Communication
 ACLMessage is a Jess template for defining ACL messages
(defrule Communication_Rule
;;; rule preconditions
=>
(ACLMessage (communicative-act ?c)
(sender ?s) (receiver ?r)
(content ?n)))
 Template parameters of ACLMessage are according to FIPA
127
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Java Method Calls
 JavaMethod is a user-defined Java method
 It can be called inside Jess rules to perform a specialized action
 E.g processing specialized file content
(defrule JavaMethod_Rule
;;; rule preconditions
=>
(bind ?x (new java_class_name))
(bind ?y (?x java_method_name $?a)))
 ?x is bound to a new instance of a specific Java class,
 $?a is the list of arguments required by the specific class method
 ?y is the returned result.
128
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Tutorial Overview
 RULES AND ONTOLOGIES
 Homogeneous approach
 Entailment-Based OWL Reasoning
 The O-DEVICE System
 Hybrid approach
 The CLIPS-OWL Framework
 The DLE Framework
 REASONING INTEROPERABILITY
 The EMERALD Framework
 Reasoning Services – Reasoners
 The KC-AGENTS Prototypes
 Use Case: A Brokering Scenario
129
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Use Case: A Brokering Scenario
Adopted from: Grigoris Antoniou and Frank van Harmelen, A
Semantic Web Primer, 2nd Edition, MIT Press, 2008
 Customer, a potential renter
 Wants to rent an apartment based on requirements and preferences
 Expressed in defeasible logic
 Broker, possesses available apartments
 Described as RDF facts
 Must match requirements with apartments’ specifications and
propose suitable apartments
 DR-Reasoner, R-Reasoner: independent third-party reasoning
services (reasoners)
130
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Scenario Overview
131
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
RDF document for
available apartments
RuleML document
with requirements in
defeasible logic
132
RDF document with
results of defeasible
reasoning (acceptable
apartments)
KC-Agent Specifications
 Customer
Fucust ≡ {ruleml_path}, Fecust ≡ {agent_name}
C cust ≡ {(ACLMessage (communicative-act REQUEST)
(sender agent_name) (receiver Broker)
(content “request”)) ← request agent_name)}
J cust ≡ {rule_base_string ←
(bind ((new java_class) read ruleml_path))}
 Broker
Fubrok ≡ {url}, Febrok ≡ {reasoner_name}
C brok ≡ {(ACLMessage
(communicative-act REQUEST)
(sender Broker) (receiver reasoner_name)
(content “request”))
← request (reasoner_name)}
J brok ≡ {rule_base_string ←
(bind ((new java_class) read url))}
133
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Summary & Conclusions
 This tutorial discussed issues, technologies and tools that concern
 How Semantic Web affects knowledge interchange among intelligent agents
 Reasoning interoperability in multi-agent systems
 First, we discussed how semantic web rules and ontologies interact
 Agent’s internal knowledge base for environment awareness and decision
making.
 Then, we discussed interoperability between reasoning systems for agents
 The EMERALD framework was presented
 Examples of tools for semantic web reasoning in multi-agents systems
have been presented
 Mostly implemented by teams led by the presenter
134
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Acknowledgments
 Most work described in this tutorial has been performed in
cooperation with my colleagues
 Prof. Grigoris Antoniou
 My PhD students
 Georgios Meditskos (now Dr.) – Ontologies and Rules
 Efstratios Kontopoulos (now Dr.) – Defeasible Logic
 Kalliopi Kravari – EMERALD
 This work is partially supported by the Greek R&D General
Secretariat through a bilateral Greek-Romanian project.
 Jointly with Costin Badica.
135
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Rules and Ontologies in the Semantic Web
 Meditskos G. and Bassiliades N., Rule-based OWL Reasoning Systems:




136
Implementations, Strengths and Weaknesses, Handbook of Research on Emerging
Rule-Based Languages and Technologies: Open Solutions and Approaches, IGI Global
(2009).
Meditskos G., Bassiliades N., “Combining a DL Reasoner and a Rule Engine
for Improving Entailment-based OWL Reasoning”, Proc. 7th Int. Semantic Web
Conf. (ISWC-2008), Karlsruhe, Germany, Springer, LNCS, Vol. 5318, pp. 277292, 2008.
Meditskos G., Bassiliades N., “DLEJena: A Practical Forward-Chaining OWL 2
RL Reasoner Combining Jena and Pellet”, Journal ofWeb Semantics, 8(1), pp.
89–94, 2010.
Meditskos G., Bassiliades N., CLIPS–OWL: A framework for providing
object-oriented extensional ontology queries in a production rule engine,
Data & Knowledge Engineering, 70(7), 2011, pp. 661-681.
Meditskos, G., & Bassiliades, N. (2008). A Rule-Based Object-Oriented OWL
Reasoner. IEEE Transactions on Knowledge and Data Engineering, 20, 397-410.
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
Defeasible Logic
 Bassiliades, N., Antoniou, G., and Vlahavas, I. 2006. A Defeasible Logic
Reasoner for the Semantic Web. Int. J. on Semantic Web and Information Systems,
2(1):1-41.
 E. Kontopoulos, N. Bassiliades, G. Antoniou, "Deploying Defeasible Logic
Rule Bases for the Semantic Web", Data & Knowledge Engineering, 66(1), pp.
116-146, July 2008.
 E. Kontopoulos, N. Bassiliades, G. Governatori, G. Antoniou, “A Modal
Defeasible Reasoner of Deontic Logic for the Semantic Web”, International
Journal on Semantic Web and Information Systems, 7(1), pp. 18-43, 2011.
 N. Bassiliades, E. Kontopoulos, G. Antoniou, “A Visual Environment for
Developing Defeasible Rule Bases for the Semantic Web”, Proc. International
Conference on Rules and Rule Markup Languages for the Semantic Web (RuleML2005), Galway, Ireland, Nov. 2005, Springer, LNCS 3791, pp. 172 - 186.
137
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
EMERALD
 K. Kravari, E. Kontopoulos, N. Bassiliades, “A Trusted Defeasible Reasoning
Service for Brokering Agents in the Semantic Web”, Proc. 3rd International
Symposium on Intelligent Distributed Computing (IDC 2009), Springer, pp. 243248, Ayia Napa, Cyprus, October 2009.
 Kravari, K., Kontopoulos, E., and Bassiliades, N. 2009. Towards a Knowledgebased Framework for Agents Interacting in the Semantic Web, IEEE/WIC/ACM
Int. Conf. on Intelligent Agent Technology (IAT'09), Vol. 2, pp. 482-485.
 Kravari, K., Kontopoulos, E., and Bassiliades, N. 2010. Trusted Reasoning
Services for Semantic Web Agents, Informatica: International Journal of Computing
and Informatics, 34(4), pp. 429-440.
 K. Kravari, K. Papatheodorou, G. Antoniou and N. Bassiliades, “Reasoning and
Proofing Services for Semantic Web Agents”, Proc. of the 22nd International Join
Conference on Artificial Intelligence (IJCAI-2011), Large Track of Best Papers from
Sister Conferences, pp. 2662-2667, 2011.
138
Nick Bassiliades, Agents and Knowledge Interoperability in the Semantic Web Era
WIMS 2012, June 13-15, Craiova,
Romania
RuleML 2012
 The 6th International Symposium on Rules: Research Based and




Industry Focused
Montpellier, France, August 27-29, 2012
http://2012.ruleml.org
Open Dates:
Doctoral Consortium
 Paper submission: June 25, 2012 (10 days left)
 RuleML Challenge
 Paper submission: extended to June 25, 2012 (10 days left)
ICTAI 2012
 24th IEEE International Conference on Tools with Artificial
Intelligence
 November 7-9, 2012, Athens, Greece
 http://ictai12.unipi.gr/
 Paper Submission Date: June 25, 2012 (extended)
Tutorial
Agents and Knowledge Interoperability
in the Semantic Web Era
Nick Bassiliades
Logic Programming & Intelligent Systems Group
Dept. of Informatics
Aristotle University of Thessaloniki
Greece
Download