a principled framework for modular web rule bases and its semantics
DESCRIPTION
A Principled Framework for Modular Web Rule Bases and its Semantics. Anastasia Analyti Institute of Computer Science, FORTH-ICS, Greece Grigoris Antoniou Dept. of Computer Science, Univ. of Crete, Greece Carlos Viegas Damásio CENTRIA, Depart. De Informatica, Univ. Nova de Lisboa, Portugal. - PowerPoint PPT PresentationTRANSCRIPT
KR-2008 1
A Principled Framework for Modular Web Rule Bases and its Semantics
Anastasia AnalytiInstitute of Computer Science, FORTH-ICS, Greece
Grigoris Antoniou Dept. of Computer Science, Univ. of Crete, Greece
Carlos Viegas DamásioCENTRIA, Depart. De Informatica, Univ. Nova de Lisboa,
Portugal
KR-2008 2
• Motivation & Requirements
• Open-World and Closed-World Reasoning
• MWeb Modular Rule Bases
• syntax• validity• example
• MWebAS & MWebWFS model-theoretic semantics
• properties
• Conclusions - Future work
Presentation Overview
KR-2008 3
• Merging knowledge over rule bases on the Web is an important problem.
• Modularity, encapsulation, information hiding, and access control mechanisms are required.
• Closed-world and open-world reasoning should be supported.
• Proposed mechanisms should guarantee monotonicity of reasoning on all predicates, in the case that new rule bases are added to the modular base.
• The proposed modularity framework should have clear model-theoretic semantics.
Motivation & Requirements
KR-2008 4
• Rule bases defining a predicate p need mechanisms to express:
• if reasoning on p is open, closed, or normal• that p is hidden, can only be imported, or redefined by
other rule bases• that p is exported to all requesting rule bases or only to
particular ones
• Rule bases importing knowledge about a predicate p need mechanisms to express:
• the reasoning mode that p is requested• if knowledge on p is imported from all providing rule
bases or from particular ones
Requirements (Cont.)
KR-2008 5
• Open-World Reasoning• Founded on First Order Logic• Adopted in Description Logics, OWL, and SWRL• Appropriate for predicates “fully-shared” in the
Semantic Web• Sometimes too conservative
• Closed-World Reasoning• Founded on Nonmonotonic Logics• Adopted in Logic Programming and WRL• Appropriate for Deductive Databases• Sometimes too brave
Open-World & Closed-World Reasoning
KR-2008 6
• Open-world and closed-world assumptions can be already combined in Extended Logic Programming!
• Two forms of negation are required:
• strong or explicit• weak, default, or negation as failure
• The two forms of negation are available in:
• Well-founded semantics with explicit negation (WFSX)• Answer Set Semantics (AS)
• The proposed solution is the same for both semantics
Our Approach for OWAs & CWAs
KR-2008 7
• Consider the following list of facts:
% All current EU countriesCountryEU(Austria) … CountryEU(UK)
% Some non EU countries (not all…) CountryEU(China) CountryEU(Djibuti)
Example
KR-2008 8
• Closed world reasoning:
CountryEU(?c) ← ~ CountryEU(?c)
• Open world reasoning:
CountryEU(?c) ← ~ CountryEU(?c) CountryEU(?c) ← ~ CountryEU(?c)
OWAs & CWAs with the help of Extended LP
KR-2008 9
• Is Austria an EU country ?• YES, due to the fact CountryEU(Austria)
• Is China an EU country ?• NO, due to the fact CountryEU(China)
• Is Montenegro an EU country ?• NO, because it is not listed and the list is complete
(CLOSED WORLD REASONING)
• DON’T KNOW, because it is not listed and the list is not complete (OPEN WORLD REASONING)
A Little Geography ….
KR-2008 10
• An (MWeb) rule base s is a triple <Names, Ps, Ints>
where:
• Names is the name of s (an IRI reference)
• Ps is the logic program of s (an MWeb logic program)
• Ints is the interface of s
DEFINES declarations USES decarations
• An (MWeb) modular rule base S is a set of rule bases
MWeb Modular Rule Bases
KR-2008 11
• A term is an IRI reference, an RDF literal, or a variable• An atom is:
• a simple atom p(t1, …, tk) or
• a qualified atom p@Namet(t1, …, tk)
• An (MWeb) rule r is a formula of the form
L ← L1 , …, Lm , ~ Lm+1 , …,~ Ln
where L is a simple atom A or the strong negation of a
simple atom A
Li is an atom A or the strong negation of an atom A
If m=n, rule r is called objective
• An (MWeb) logic program P is a set of rules
The Logic Program of a Rule Base
KR-2008 12
• According to their reasoning modes, predicates are declared as:
• Definite predicates
• Open predicates
• Closed predicates positively closed negatively closed
• Normal predicates
• Definite, open, and closed predicates are limited to be defined by rules without weak negation
• Normal predicates can use the full language
Predicate Reasoning Modes
KR-2008 13
• If a predicate is declared definite in a rule base s then p is defined by objective rules, only.
• Similar to Definite Logic Programming, but allowing for explicit negation in the head and body of the rules
• Open and closed predicates appearing in the defining rules of p are interpreted, as if they had been declared definite.
Definite Predicates
<http://geography.int>
defines … definite geo:Country
geo:Country(Egypt). geo:Country(Canada).Rule Base s
Example:
KR-2008 14
• If a predicate is declared open in a rule base s w.r.t. a context cxt then p is defined
• not only by a set of objective rules,
• but also through the following rules, called,
contextual OWA rules of p
p(?x1,…,?xn) ← cxt(?x1,…,?xn), ~ p(?x1,…,?xn)
p(?x1,…,?xn) ← cxt(?x1,…,?xn), ~ p(?x1,…,?xn)
• Context cxt is optional, and if defined, it should be a definite predicate
• Closed predicates appearing in the defining rules of p are interpreted, as if they had been declared open
Open Predicates
KR-2008 15
Example of Open Predicates
<http://europa.eu>
defines … open eu:CountryEU wrt context geo:Country.defines … definite geo:Country.
eu:CountryEU(Austria). eu:CountryEU(Greece). …
geo:Country(Egypt). geo:Country(Canada). …
Rule Base s
OWA rules:
eu:CountryEU(?c) ← geo:Country(?c), ~ eu:CountryEU(?c)
eu:CountryEU(?c) ← geo:Country(?c), ~ eu:CountryEU(?c)
KR-2008 16
• If a predicate is declared positively or negatively closed in a rule base s w.r.t. a context cxt then p is defined
• not only by a set of objective rules,
• but also through
a positive contextual CWA rule
p(?x1,…,?xn) ← cxt(?x1,…,?xn), ~ p(?x1,…,?xn)
or a negative contextual CWA rule p(?x1,…,?xn) ← cxt(?x1,…,?xn), ~ p(?x1,…,?xn)
• Context cxt is optional, and if defined, it should be a definite predicate
Positively/Negatively Closed Predicates
KR-2008 17
Example of Positively Closed Predicates
<http://europa.eu>
defines … posClosed eu:CountryEU wrt context geo:Country.defines … definite geo:Country.
eu:CountryEU(Austria). euCountryEU(Greece). …
geo:Country(Egypt). geo:Country(Canada). …
Rule Base s
CWA rule:
eu:CountryEU(?c) ← geo:Country(?c), ~ eu:CountryEU(?c)
KR-2008 18
• Let S be a modular rule base.
• The scope of a predicate p defined in a rule base s S can take the following values:
• Global: p is visible outside s and can be defined by any other rule base s’ S in global or internal scope only.
The reasoning mode of global predicates must be always definite or open.
• Local: p is visible outside s and can be defined by any other rule base s’ S in internal scope only.
• Internal: p is visible inside s , only.
• No constraint is imposed on the reasoning mode of local and internal predicates
Predicate Scope
KR-2008 19
• DEFINES declarations:
• Determine which predicates p are defined in s, their scope, and defining reasoning mode
• Provide the rule bases to which s is willing to export p
• USES declarations:
• Determine which predicates p are requested by s and their requesting reasoning mode in s
i.e., the reasoning mode in which s requests p
definite, open, closed, normal
• Provide the rule bases from which s requests p
Interface of a Rule Base s
KR-2008 20
• DEFINES declarations:
defines
global | local |internal
definite | open | posClosed | negClosed |normal
PredicateInd [ wrt context PredicateInd]
[visible to RuleBaseList]
• USES declarations:
uses
definite | open |closed | normal
PredicateInd [ from RuleBaseList]
The syntax of Defines and Uses Declarations
KR-2008 21
• A modular rule base is valid if it satisfies a number of validity constraints:
• most of these constraints have already been presented
• Additionally:
• the complete list can be found in the paper
• In our work, we consider valid modular rule bases, only
Validity of a Modular Rule Base
normal allowed allowed allowed allowed
closed allowed allowed allowed error
open allowed allowed allowed error uses
p
(im
port
er)
objective allowed allowed allowed error objective open closed normal
defines p (exporter)
KR-2008 22
Example of a Modular Rule Base
<http://europa.eu>
defines local posClosed eu:CountryEU.
eu:CountryEU(Austria).
eu:CountryEU(Greece). Rule base s1
<http://security.int>
defines local open sec:citizenOf.defines global open sec:Suspect.
sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2
<http://gov.countryY>
defines local normal gov:Enter visible to <http://security.int>. defines local negClosed gov:RequiresVisa.defines internal open sec:citizenOf.
uses open eu:CountryEU from <http://europa.eu>.uses definite sec:citizenOf from <http://security.int>.uses definite sec:Suspect from <http://security.int>.
gov:Enter(?p) eu:Country(?c), sec:citizenOf(?p,?c), ~sec:Suspect@<http://security.int>(?p).
gov:Enter(?p) eu:Country(?c), sec:citizenOf(?p,?c), gov:RequiresVisa(?c), ~sec:Suspect@<http://security>(?p).
gov:RequiresVisa(Croatia). sec:citizenOf(Peter,Greece). Rule base s3
KR-2008 23
• Let S be a modular rule base
• We define the MWebAS & MWebWFS of S
• model-theoretically
• through a uniform definition
• extending the AS and WFSX semantics on ELPs keeping all of their computational characteristics
• equivalent transformational semantics can be provided through generated ELPs that can be evaluated through AS
and WFSX semantics, respectively
Model-theoretic Semantics
KR-2008 24
• Let S be a modular rule base
• The Herbrand Base of rule base s S wrt S consists of:
• p(c1, …., ck), where
p is defined in s
ci is a constant appearing in S
• p@rbase(c1, …., ck), where
p is requested by s from rbase
ci is a constant appearing in S
Herbrand Base of a Rule Base
KR-2008 25
• Let S be a modular rule base
• A simple normal (resp. extended) interpretation of a rule base s wrt S is a 2-valued (resp. 3-valued) interpretation of the Herbrand Base of s wrt S
• A normal (resp. extended) interpretation of S is a set
I = {Is | s S}, where:
– Is = < Isd, Iso, Isc, Isn>
– Isi is a simple (resp.extended) interpretation of s wrt S
– Isd, Iso, Isc, Isn correspond to the 4 reasoning modes of s
Normal & Extended Interpretation of a Modular Rule Base
KR-2008 26
• Let S be a modular rule base
• A normal (resp. extended) answer set of S is a normal (resp. extended) interpretation of S that satisfies certain constraints provided in the paper
• extending the definition of answer set (resp. extended stable model) of AS and WFSX semantics on ELPs
• Let p be a predicate defined in a rule base s S at reasoning mode m then:
MWebAS & MWebWFS entailment
1))(( , of set answer extendedeach for if )(|
1))(( , of set answer normaleach for if )(|
M
M
cpms
MScpmWFSS
s
cpms
MScpmASS
s
KR-2008 27
normal definite open closed normal
closed definite open closed
open definite open open
definite definite definite definite definite open closed normal
currentreasoning mode of s
• Let p be a predicate defined in a rule base s
Properties of MWeb Semantics
defining reasoning mode of p in s
KR-2008 28
normal definite open closed normal
closed definite open closed
open definite open open
definite definite definite definite definite open closed normal
requesting reasoning
mode of p in s’ (importer)
• Let p be a predicate
• defined in a rule base s and
• imported by a rule base s’
Properties of MWeb Semantics (cont.)
defining reasoning mode of p in s (exporter)
KR-2008 29
Example
<http://europa.eu>
defines local posClosed eu:CountryEU.
eu:CountryEU(Austria).
eu:CountryEU(Greece). Rule base s1
<http://security.int>
defines local open sec:citizenOf.defines global open sec:Suspect.
sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2
<http://gov.countryY>
defines local normal gov:Enter visible to <http://security.int>. defines local negClosed gov:RequiresVisa.defines internal open sec:citizenOf.
uses open eu:CountryEU from <http://europa.eu>.uses definite sec:citizenOf from <http://security.int>.uses definite sec:Suspect from <http://security.int>.
gov:Enter(?p) eu:Country(?c), sec:citizenOf(?p,?c), ~sec:Suspect@<http://security.int>(?p).
gov:Enter(?p) eu:Country(?c), sec:citizenOf(?p,?c), gov:RequiresVisa(?c), ~sec:Suspect@<http://security>(?p).
gov:RequiresVisa(Croatia). sec:citizenOf(Peter,Greece). Rule base s3
S={s1, s2, s3}
},{
for
)(:|
while
, )(:|
3
1
mWFSmASSEM
CroatiaCountryEUeuSEMS
s
CroatiaCountryEUeuSEMS
s
KR-2008 30
<http://europa.eu>
defines local posClosed eu:CountryEU.
eu:CountryEU(Austria).
eu:CountryEU(Greece). Rule base s1
<http://security.int>
defines local open sec:citizenOf.defines global open sec:Suspect.
sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2
<http://gov.countryY>
defines local normal gov:Enter visible to <http://security.int>. defines local negClosed gov:RequiresVisa.defines internal open sec:citizenOf.
uses open eu:CountryEU from <http://europa.eu>.uses definite sec:citizenOf from <http://security.int>.uses definite sec:Suspect from <http://security.int>.
gov:Enter(?p) eu:Country(?c), sec:citizenOf(?p,?c), ~sec:Suspect@<http://security.int>(?p).
gov:Enter(?p) eu:Country(?c), sec:sitizenOf(?p,?c), gov:RequiresVisa(?c), ~sec:Suspect@<http://security>(?p).
gov:RequiresVisa(Croatia). sec:citizenOf(Peter,Greece). Rule base s3
S={s1, s2, s3}
Example (cont.)
},{
for
)(:~|
and
)(:|
3
3
mWFSmASSEM
PeterEntergovSEMS
s
AnneEntergovSEMS
s
KR-2008 31
<http://europa.eu>
defines local posClosed eu:CountryEU.
eu:CountryEU(Austria).
eu:CountryEU(Greece). Rule base s1
<http://security.int>
defines local open sec:sitizenOf.defines global open sec:Suspect.
sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2
<http://gov.countryY>
defines local normal gov:Enter visible to <http://security.int>. defines local negClosed gov:RequiresVisa.defines internal open sec:citizenOf.
uses open eu:CountryEU from <http://europa.eu>.uses definite sec:citizenOf from <http://security.int>.uses definite sec:Suspect from <http://security.int>.
gov:Enter(?p) eu:Country(?c), sec:sitizenOf(?p,?c), ~sec:Suspect@<http://security.int>(?p).
gov:Enter(?p) eu:Country(?c), sec:sitizenOf(?p,?c), gov:RequiresVisa(?c), ~sec:Suspect@<http://security>(?p).
gov:RequiresVisa(Croatia). sec:citizenOf(Peter,Greece). Rule base s3
S={s1, s2, s3}
Case-based Analysis of MWebAS
)(:|
while
, )(:|
3
3
BorisEntergovmWFSS
s
BorisEntergovmASS
s
KR-2008 32
<http://europa.eu>
defines local posClosed eu:CountryEU.
eu:CountryEU(Austria).
eu:CountryEU(Greece). Rule base s1
<http://security.int>
defines local open sec:sitizenOf.defines global open sec:Suspect.
sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2
<http://gov.countryY>
defines local normal gov:Enter visible to <http://security.int>. defines local negClosed gov:RequiresVisa.defines internal open sec:citizenOf.
uses open eu:CountryEU from <http://europa.eu>.uses definite sec:citizenOf from <http://security.int>.uses definite sec:Suspect from <http://security.int>.
gov:Enter(?p) eu:Country(?c), sec:sitizenOf(?p,?c), ~sec:Suspect@<http://security.int>(?p).
gov:Enter(?p) eu:Country(?c), sec:sitizenOf(?p,?c), gov:RequiresVisa(?c), ~sec:Suspect@<http://security>(?p).
gov:RequiresVisa(Croatia). sec:citizenOf(Peter,Greece). Rule base s3
S={s1, s2, s3}
Restricted Propagation of Local Inconsistencies
• s1 is inconsistent according to all simple and extended answer sets of S
• s3 is affected from the inconsistency
• s2 remains consistent
eu:CountryEU(Austria).
KR-2008 33
• Similarly to AS and WFSX on ELPs, MWebAS is more informative than MWebWFS
• Entailment under MWebAS is data-complete for co-NP
• Entailment under MWebWFS has polynomial data complexity
• Both MWeb semantics guarantee monotonicity of reasoning on all predicates, in the case that:
• new rule bases are added to the modular rule base S, and
• the importing rule base list of the predicates of the old rule bases stays the same.
Properties of MWeb Semantics (cont.)
KR-2008 34
• Our MWeb framework for modular rule bases supports:
• Reasoning in four modes:
Definite: weak negation is not accepted at all
Open: only OWAs are accepted
Closed: both CWAs and OWAs are accepted
Normal: weak negation is fully accepted
• Local closed-world and open-world assumptions
• Scoped negation-as-failure and scoped literal evaluation
• Restricted propagation of local inconsistencies
• Future work concerns:
• the definition of the transformational semantics
• the definition of modular Extended RDF ontologies
Conclusions – Future Work