340 likes | 451 Views
This paper presents a comprehensive framework for modular web rule bases focusing on their modularity, validity, and semantics. It addresses the critical challenges of merging knowledge across rule bases on the web, requiring mechanisms for modularity, encapsulation, information hiding, and access control. The framework supports both open-world and closed-world reasoning while ensuring monotonicity when integrating new rule bases. The authors introduce key concepts such as valid rule representation, and various predicate reasoning modes, illustrated with practical examples, and propose future research directions.
E N D
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 KR-2008
Presentation Overview • Motivation & Requirements • Open-World and Closed-World Reasoning • MWeb Modular Rule Bases • syntax • validity • example • MWebAS & MWebWFSmodel-theoretic semantics • properties • Conclusions - Future work KR-2008
Motivation & Requirements • 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. KR-2008
Requirements (Cont.) • 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 KR-2008
Open-World & Closed-World Reasoning • 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 KR-2008
Our Approach for OWAs & CWAs • 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 KR-2008
Example • Consider the following list of facts: % All current EU countries CountryEU(Austria) … CountryEU(UK) % Some non EU countries (not all…) CountryEU(China) CountryEU(Djibuti) KR-2008
OWAs & CWAs with the help of Extended LP • Closed world reasoning: CountryEU(?c) ← ~ CountryEU(?c) • Open world reasoning: CountryEU(?c) ← ~ CountryEU(?c) CountryEU(?c) ← ~ CountryEU(?c) KR-2008
A Little Geography …. • 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) KR-2008
MWeb Modular Rule Bases • An (MWeb) rule bases is a triple<Names, Ps, Ints> where: • Names is the name of s (an IRI reference) • Psis the logic program of s (an MWeb logic program) • Ints is the interface of s • DEFINES declarations • USES decarations • An (MWeb) modular rule baseS is a set of rule bases KR-2008
The Logic Program of a Rule Base • 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) ruler is a formula of the form L ← L1 , …, Lm, ~Lm+1 , …,~ Ln where L is a simple atomA or the strong negation of a simple atom A Li is an atomA or the strong negation of an atom A If m=n, rule r is called objective • An (MWeb) logic programP is a set of rules KR-2008
Predicate Reasoning Modes • 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 KR-2008
Example: <http://geography.int> defines … definite geo:Country Rule Bases geo:Country(Egypt). geo:Country(Canada). Definite Predicates • 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. KR-2008
Open Predicates • If a predicate is declared open in a rule base s w.r.t. a context cxtthen 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 KR-2008
Rule Bases <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). … Example of Open Predicates OWA rules: eu:CountryEU(?c) ← geo:Country(?c), ~ eu:CountryEU(?c) eu:CountryEU(?c) ← geo:Country(?c), ~eu:CountryEU(?c) KR-2008
Positively/Negatively Closed Predicates • If a predicate is declared positively or negativelyclosed in a rule base s w.r.t. a context cxtthen 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 KR-2008
Rule Bases <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). … Example of Positively Closed Predicates CWA rule: eu:CountryEU(?c) ← geo:Country(?c), ~ eu:CountryEU(?c) KR-2008
Predicate Scope • 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’ Sin 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’ Sin internal scope only. • Internal:p is visible inside s , only. • No constraint is imposed on the reasoning mode of local and internal predicates KR-2008
Interface of a Rule Base s • 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 KR-2008
The syntax of Defines and Uses Declarations • DEFINES declarations: defines global | local |internal definite | open | posClosed | negClosed |normal PredicateInd [ wrt contextPredicateInd] [visible toRuleBaseList] • USES declarations: uses definite | open |closed | normal PredicateInd [ fromRuleBaseList] KR-2008
Validity of a Modular Rule Base • 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 KR-2008
Example of a Modular Rule Base <http://security.int> defineslocal open sec:citizenOf.definesglobal open sec:Suspect. sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2 <http://gov.countryY> defineslocal normal gov:Enter visible to <http://security.int>.defineslocal negClosed gov:RequiresVisa.definesinternal open sec:citizenOf.usesopen eu:CountryEU from <http://europa.eu>.usesdefinite sec:citizenOf from <http://security.int>. usesdefinite 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 <http://europa.eu> defineslocal posClosed eu:CountryEU. eu:CountryEU(Austria). eu:CountryEU(Greece). Rule base s1 KR-2008
Model-theoretic Semantics • 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 KR-2008
Herbrand Base of a Rule Base • 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 KR-2008
Normal & Extended Interpretation of a Modular Rule Base • 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 setI = {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 KR-2008
MWebAS & MWebWFS entailment • 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 modem then: KR-2008
Properties of MWeb Semantics • Let p be a predicate defined in a rule base s currentreasoning mode of s defining reasoning mode of p in s KR-2008
Properties of MWeb Semantics (cont.) • Let p be a predicate • defined in a rule base s and • imported by a rule base s’ requesting reasoning mode of p in s’ (importer) defining reasoning mode of p in s (exporter) KR-2008
Example <http://security.int> defineslocal open sec:citizenOf.definesglobal open sec:Suspect. sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2 <http://gov.countryY> defineslocal normal gov:Enter visible to <http://security.int>.defineslocal negClosed gov:RequiresVisa.definesinternal open sec:citizenOf.uses open eu:CountryEU from <http://europa.eu>.usesdefinite sec:citizenOf from <http://security.int>. usesdefinite 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} <http://europa.eu> defines local posClosed eu:CountryEU. eu:CountryEU(Austria). eu:CountryEU(Greece). Rule base s1 KR-2008
Example (cont.) <http://security.int> defineslocal open sec:citizenOf.definesglobal open sec:Suspect. sec:citizenOf(Anne,Austria).sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2 <http://gov.countryY> defineslocal normal gov:Enter visible to <http://security.int>.defineslocal negClosed gov:RequiresVisa.definesinternal open sec:citizenOf.usesopen eu:CountryEU from <http://europa.eu>.usesdefinite sec:citizenOf from <http://security.int>. usesdefinite 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} <http://europa.eu> defineslocal posClosed eu:CountryEU. eu:CountryEU(Austria). eu:CountryEU(Greece). Rule base s1 KR-2008
<http://security.int> defineslocal open sec:sitizenOf.definesglobal open sec:Suspect. sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). Rule base s2 <http://gov.countryY> defineslocal normal gov:Enter visible to <http://security.int>.defineslocal negClosed gov:RequiresVisa.definesinternal open sec:citizenOf.usesopen eu:CountryEU from <http://europa.eu>.usesdefinite sec:citizenOf from <http://security.int>. usesdefinite 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 Case-based Analysis of MWebAS S={s1, s2, s3} <http://europa.eu> defineslocal posClosed eu:CountryEU. eu:CountryEU(Austria). eu:CountryEU(Greece). Rule base s1 KR-2008
<http://security.int> defineslocal open sec:sitizenOf.definesglobal open sec:Suspect. sec:citizenOf(Anne,Austria). sec:citizenOf(Boris,Croatia). sec:Suspect(Peter). eu:CountryEU(Austria). Rule base s2 <http://gov.countryY> defineslocal normal gov:Enter visible to <http://security.int>.defineslocal negClosed gov:RequiresVisa.definesinternal open sec:citizenOf.usesopen eu:CountryEU from <http://europa.eu>.usesdefinite sec:citizenOf from <http://security.int>. usesdefinite sec:Suspect from <http://security.int>. • s1 is inconsistent according to all simple and extended answer sets of S • s3 is affected from theinconsistency • s2 remains consistent 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 Restricted Propagation of Local Inconsistencies S={s1, s2, s3} <http://europa.eu> defineslocal posClosed eu:CountryEU. eu:CountryEU(Austria).eu:CountryEU(Greece). Rule base s1 KR-2008
Properties of MWeb Semantics (cont.) • 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. KR-2008
Conclusions – Future Work • 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 KR-2008