Embeddings of Simple Modular Extended RDF
description
Transcript of Embeddings of Simple Modular Extended RDF
![Page 1: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/1.jpg)
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.
![Page 2: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/2.jpg)
OutlineMotivation
Background: MWeb and Extended RDF
Simple Modular Extended RDF
Example
Embedding RIF, RDF, RDFS, and ERDF
Direct translation into Extended Logic Programming
Evaluation
Conclusions
![Page 3: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/3.jpg)
MotivationKnowledge 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.
![Page 4: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/4.jpg)
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.
![Page 5: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/5.jpg)
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
![Page 6: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/6.jpg)
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'.
![Page 7: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/7.jpg)
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].
…
![Page 8: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/8.jpg)
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.
![Page 9: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/9.jpg)
RIF builtins (logical part)
![Page 10: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/10.jpg)
RDF embedding (logical part)
![Page 11: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/11.jpg)
RDFS embedding (logical part)
![Page 12: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/12.jpg)
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).
![Page 13: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/13.jpg)
ERDF embedding (logical part)
Rules to handle strong negation extensions in RIF, RDF and RDFS
% Compatibility with RIFneg ?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 RDFFneg ?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].
![Page 14: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/14.jpg)
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].
![Page 15: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/15.jpg)
Translations into ELPTwo 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.
![Page 16: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/16.jpg)
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').
![Page 17: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/17.jpg)
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 ).
![Page 18: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/18.jpg)
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
![Page 19: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/19.jpg)
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.
![Page 20: Embeddings of Simple Modular Extended RDF](https://reader030.fdocuments.us/reader030/viewer/2022033102/56813ff4550346895dab1573/html5/thumbnails/20.jpg)
DownloadThe MWeb system implementation can be
downloaded at
http://centria.di.fct.unl.pt/~cd/mweb/
OWL2 RL support is underway