Download presentation
Presentation is loading. Please wait.
Published byMaude Hall Modified over 9 years ago
1
1 CENTRIA, Dept. Informática da Faculdade de Ciências e Tecnologia, Universidade Nova de Lisboa, 2829-516 Caparica, Portugal. 2 Institute of Computer Science, FORTH-ICS, Crete, Greece. 3 Dept. of Computer Science, Univ. of Crete, Crete, Greece.
2
Outline Motivation Background: MWeb and Extended RDF Simple Modular Extended RDF Example Embedding RIF, RDF, RDFS, and ERDF Direct translation into Extended Logic Programming Evaluation Conclusions
3
Motivation Knowledge in the Semantic Web must be shared and modularly organised. The MWeb framework provides general mechanisms to specify modular rulebases in the Semantic Web, and has a working implementation supporting some of the Rule Interchange Format (RIF) constructs.
4
MWeb Contextualized and global interpretation of arbitrary predicates. Explicit control of monotonicity and non-monotonicity. Scoped open and closed world assumptions. Separate interface and implementation of rulebases with modular and independent compilation and loading.
5
Simple Modular Extended RDF Equips RDF graphs with modularity constructs and declarative rules. A simple modular ERDF ontology is formed by an interface and logic part [RR 2009]. Interface Declares exported classes and properties with visibility lists Declares imported classes and properties with import lists (sources of information) Logic part An (E)RDF graph which may contain negative triples Rules whose bodies are combinations of conjunctions, weak negations (naf) and strong negations (neg) of triples Qualified literals (Lit @ Name) in bodies allow querying of other (remote) ontologies
6
A glimpse of syntax (interface) :- rulebase 'anne'. :- import('erdf.mw',interface). % Defined and exported predicates :- defines global normal class(mw:Vocabulary). :- defines global normal property(choose) visible to 'peter'. % Used (imported) predicates :- uses normal class(EUCountry) from 'geo'. :- uses normal property(travel), property(visit) from 'pyr', 'agcy'. :- uses normal class(mw:Vocabulary) from 'pyr', 'agcy’, 'geo'.
7
A glimpse of syntax (rules) :- import('erdf.rb',rulebase). ?Package.[choose ->> ?Ctry ] :- neg ( ?Ctry # EUCountry), ?Package.[travel ->> ?Ctry ] @ 'pyr', ?Package.[visit ->> ?City ] @ 'pyr', naf neg ?Package.[visit ->> ?City]. …
8
Approach followed The semantics of ERDF is itself declaratively specified in MWeb rulebases which must be imported by the translated simple modular ERDF ontologies. The following four MWeb rulebases are used: 1.RIF: specifies membership and subclass predicates, frames and (partially) equality. 2.RDF: specifies RDF reasoning rules, RDF axiomatic triples and relationship to RIF predefined predicates. 3.RDFS: axiomatic triples, RDFS closure rules, e.g class and property inheritance. Handles domain and range of properties. 4.ERDF: Specifies rules defining total and closed classes and properties on top of RDFS. Inheritance of negative extensions.
9
RIF builtins (logical part) % RIF member relation ?O # ?CL :- ?O # ?SCL, ?SCL ## ?CL. neg ?O # ?SCL :- neg ?O # ?CL, ?SCL ## ?CL. % RIF subclass relation ?C1 ## ?C3 :- ?C1 ## ?C2, ?C2 ## ?C3. % RIF equality theory. ?T = ?T :- ?T # mw:Vocabulary. ?T1 = ?T2 :- ?T2 = ?T1. ?T1 = ?T3 :- ?T1 = ?T2, ?T2 = ?T3. neg ?T1 = ?T2 :- neg ?T2 = ?T1. neg ?T1 = ?T3 :- ?T1 = ?T2, neg ?T2 = ?T3. % RIF frames obtained by equality reasoning ?O.[?P ->> ?V] :- ?O1.[?P ->> ?V], ?O = ?O1. ?O.[?P ->> ?V] :- ?O.[?P1 ->> ?V], ?P = ?P1. ?O.[?P ->> ?V] :- ?O.[?P ->> ?V1], ?V = ?V1.
10
RDF embedding (logical part) :- import(rif.rb, rulebase ). % RDF compatibility with RIF % makes # and rdf:type % equivalent ?X # ?Y :- ?X.[ rdf:type ->> ?Y]. ?X.[ rdf:type ->> ?Y] :- ?X # ?Y. % RDF Entailment rule ?Z.[ rdf:type ->> rdf:Property] :- ?_.[?Z ->> ?_]. % RDF Axiomatic triples rdf:type.[rdf:type->>rdf:Property]. rdf:subject.[rdf:type>>rdf:Property]. (etc…)
11
RDFS embedding (logical part) :- import( 'rdf.rb', rulebase ). % RDFS compatibility in RIF requires % including ## into rdfs:subClassOf ?X.[rdfs:subClassOf ->> ?Y] :- ?X ## ?Y. % Some of RDFS entailment rules ?Z.[ rdf:type ->> ?Y] :- ?X.[rdfs:domain ->> ?Y], ?Z.[?X ->> ?W]. ?W.[ rdf:type ->> ?Y] :- ?X.[rdfs:range ->> ?Y], ?Z.[?X ->> ?W]. ?Z.[ rdf:type ->> ?Y] :- ?X.[rdfs:subClassOf ->> ?Y], ?Z.[rdf:type ->> ?X]. ?X.[rdfs:subClassOf ->> ?X] :- ?X.[rdf:type ->> rdfs:Class]. ?X.[rdfs:subClassOf ->> ?Z] :- ?X.[rdfs:subClassOf ->> ?Y], ?Y.[rdfs:subClassOf ->> ?Z]. % other entailment rules and triples % follow…
12
ERDF embedding (interface) :- rulebase 'http://erdf.org'. :- prefix erdf='http://erdf.org#'. :- import( 'rdfs.mw', interface ). :- defines internal normal class(erdf:TotalClass), class(erdf:TotalProperty). :- defines internal normal class(erdf:PositivelyClosedClass), class(erdf:NegativelyClosedClass). class(erdf:PositivelyClosedProperty), class(erdf:NegativelyClosedProperty). :- defines internal normal property(erdf:complementOf).
13
ERDF embedding (logical part) Rules to handle strong negation extensions in RIF, RDF and RDFS % Compatibility with RIF neg ?X # ?Y :- neg ?X.[ rdf:type ->> ?Y]. neg ?X.[rdf:type ->> ?Y] :- neg ?X # ?Y. neg ?X.[rdfs:subClassOf ->> ?Y] :- neg ?X ## ?Y. % Compatibility with RDF ?Z.[rdf:type->>rdf:Property] :- neg ?_.[?Z->>?_]. % Downard propation of negative information in RDFF neg ?Z.[rdf:type ->> ?X] :- ?X.[rdfs:subClassOf->>?Y], neg ?Z.[rdf:type->>?Y]. neg ?Z1.[?X ->> ?Z2] :- ?X.[rdfs:subPropertyOf->>?Y], neg ?Z1.[?Y->>?Z2].
14
ERDF embedding( logical part) Total classes neg ?Z.[rdf:type->>?X] :- ?X.[rdf:type ->> erdf:TotalClass], ?Z #mw:Vocabulary, naf ?Z.[rdf:type->>?X]. ?Z.[rdf:type->>?X] :- ?X.[rdf:type ->> erdf:TotalClass], ?Z #mw:Vocabulary, naf neg ?Z.[rdf:type->>?X]. Closed classes neg ?Z.[rdf:type->>?X] :- ?X.[rdf:type->>erdf:PositivelyClosedClass], ?Z #mw:Vocabulary, naf ?Z.[rdf:type->>?X]. ?Z.[rdf:type->>?X] :- ?X.[rdf:type->>erdf:NegativelyClosedClass], ?Z #mw:Vocabulary, naf neg ?Z.[rdf:type->>?X].
15
Translations into ELP Two translations into extended logic programming have been devised. The first uses MWeb's transformation into extended logic programming and comes for free. The current prototype implements this translation but introduces some overhead in the execution. Even so it is quite efficient when compared to existing alternative systems (see below) A different alternative pursued in the paper is the definition of a direct translation into ELP (see ECAI 2010) of simple modular ERDF ontologies.
16
Direct Translation (1) Quad '->'('m',p,s,o) predicate to state that triple s p o is true at MWeb rulebase m. Interface (just use directives are translated) % Class use '->'('anne','rdf:type',?S,'EUCountry') :- '->'('geo','rdf:type',?S, 'EUCountry'). % Property use '->'('anne','travel',?S,?O) :- '->'('pyr','travel', ?S, ?O). '->'('anne','travel',?S,?O) :- '->'('agcy','travel', ?S, ?O). '->'('anne','visit',?S,?O) :- '->'('pyr','visit', ?S, ?O). '->'('anne','visit',?S,?O) :- '->'('agcy','visit', ?S, ?O). % Vocabulary use '->'('anne', 'rdf:type',?S, 'mw:Vocabulary') :- '->'('pyr', 'rdf:type', ?S, 'mw:Vocabulary'). '->'('anne', 'rdf:type',?S, 'mw:Vocabulary') :- '->'('agcy', 'rdf:type', ?S, 'mw:Vocabulary'). '->'('anne', 'rdf:type',?S, 'mw:Vocabulary') :- '->'('geo', 'rdf:type', ?S, 'mw:Vocabulary').
17
Direct translation (2) Rules are simpler to translate and basically set the first argument of quads appropriately: '->'('anne', 'choose', ?Package, ?Ctry) :- neg '#'('anne',?Ctry,'EUCountry'), '->'('pyr', 'travel', ?Package, ?Ctry ), '->'('pyr', 'visit', ?Package, ?City), naf neg '->'('anne','visit', ?Package, ?City ).
18
Preliminary testing cputime (ms) * Mac OS X 10.5.8. 2.93 GHz Intel Core 2 Duo 4Gb 1067 MHz DDR3 Fig. 1 – cputime* for extracting all the triples by several rule engines
19
Conclusions MWeb can capture all the constructs of simple modular ERDF ontologies Semantics of ERDF can be declaratively specified in MWeb The subset of MWeb necessary to capture simple modular ERDF ontologies can be immediately translated into extended logic programming Preliminary benchmarking shows promising results when compared to existing memory-based Semantic Web rule engines. Subsumptive tabling is preferable (10~100 times faster) and equality reasoning introduces substantial overhead.
20
Download The MWeb system implementation can be downloaded at http://centria.di.fct.unl.pt/~cd/mweb/ OWL2 RL support is underway
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.