1 / 20

Embeddings of Simple Modular Extended RDF

Embeddings of Simple Modular Extended RDF. Carlos V. Damásio 1 , Anastasia Analyti 2 , Grigoris Antoniou 2,3 ( cd@di.fct.unl.pt ), ( analyti@ics.forth.gr ), ( antoniou@ics.forth.gr ). 1 CENTRIA, Dept. Informática da Faculdade de Ciências e Tecnologia, Universidade Nova de Lisboa,

addison
Download Presentation

Embeddings of Simple Modular Extended RDF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Embeddings of Simple Modular Extended RDF Carlos V. Damásio1, Anastasia Analyti2, Grigoris Antoniou2,3 (cd@di.fct.unl.pt), (analyti@ics.forth.gr), (antoniou@ics.forth.gr) 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: MWebandExtended RDF • Simple Modular Extended RDF • Example • Embedding RIF, RDF, RDFS, and ERDF • DirecttranslationintoExtendedLogicProgramming • 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. Idea: use the MWeb framework to specify a rule-based semantics for interesting fragments of modular ERDF allowing for the integration of both frameworks, with an implementation.

  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. Two semantics have been proposed, MWebWFSand MWebAS, with a solid theory based on the two major semantics of extended logic programming.

  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'. Rulebasename Importsdefinitionof ERDF interface (includingvocabulary) Built-inclassmw:Vocabularycollectstherulebasevocabulary

  7. A glimpse of syntax (rules) :- import('erdf.rb',rulebase). ?Package.[choose ->> ?Ctry ] :- neg ( ?Ctry # EUCountry), ?Package.[travel ->> ?Ctry ] @ 'pyr', ?Package.[visit ->> ?City ] @ 'pyr', nafneg ?Package.[visit ->> ?City]. … Rulesdefiningthesemanticof RIF, RDF, RDFS and ERDF Triple: ?Subject.[?Property ->> ?Object] Qualified literal (remotequery) Weaknegation Strongnegation

  8. Approach followed • The semantics of ERDF is itself declaratively specified in MWebrulebases which must be imported by the translated simple modular ERDF ontologies. The following four MWebrulebases are used: • RIF: specifies membership and subclass predicates, frames and (partially) equality. • RDF: specifies RDF reasoning rules, RDF axiomatic triples and relationship to RIF predefined predicates. • RDFS: axiomatic triples, RDFS closure rules, e.g class and property inheritance. Handles domain and range of properties. • 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. MWebclasscollectingallthevocabularyofthe (current) rulebase

  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…) Previous slide RIF rules are includedinlinehere

  11. RDFS embedding (logicalpart) :- 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 normalclass(erdf:PositivelyClosedClass), class(erdf:NegativelyClosedClass). class(erdf:PositivelyClosedProperty),class(erdf:NegativelyClosedProperty). :- defines internal normal property(erdf:complementOf). Specificationof total classes andproperties (OWA) Specificationofclosed classes andproperties (CWA) Definingcomplementarypropertieswithoutnegation

  13. ERDF embedding (logicalpart) • Rules to handlestrongnegationextensionsin 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->>?_]. % Downardpropation 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].

  14. ERDF embedding(logicalpart) • 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, nafneg ?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, nafneg ?Z.[rdf:type->>?X]. Scopedopenworldassumptions Scopedclosedworldassumptions

  15. Translations into ELP • Twotranslationsintoextendedlogicprogramminghavebeendevised. • Thefirst uses MWeb'stransformationintoextendedlogicprogrammingand comes for free. • Thecurrentprototypeimplementsthistranslationbutintroduces some overheadintheexecution. Evensoitis quite efficientwhencompared to existingalternativesystems (seebelow) • A differentalternativepursuedinthepaperisthedefinitionof a directtranslationinto ELP (see ECAI 2010) ofsimple 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 ). Therulesoftheimported ERDF module are compiledinthesamewayandeachrulebasehasitscopy. Thusclass/propertyextensions are contextualized. Itisalsopossible to makethe a class/property global sharing thedefinitionsinallrulebases.

  18. Preliminary testing MWebWFS shows superior performance when performing pure RDFS memory-based entailment on the Wine ontology cputime (ms) Fig. 1 – cputime* for extracting all the triples by several rule engines * Mac OS X 10.5.8. 2.93 GHz Intel Core 2 Duo 4Gb 1067 MHz DDR3

  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

More Related