From SMW to Rules

9
1 Wiki DB Triple Store Online data Data Layer RPI Map & Events Wine Wiki Social Rec. Group Portal Task & Issue Tracking Ontology Repository Still many not yet mentioned Wiki Layer App. Layer (Semantic) Wiki Scripting Semant ic Templa te Semant ic Query (PHP, Javascript) Wiki Extensi Halo Annotation Extension Parse r Funct ion How to build applications effectively? Semant ic Forms The Gap between Semantic Wiki and Deployed System The Gap

description

 

Transcript of From SMW to Rules

Page 1: From SMW to Rules

1Wiki DB Triple Store Online dataData Layer

RPI Map& Events

Wine WikiSocial Rec.

Group Portal

Task & IssueTracking

Ontology Repository

Still many not yet

mentioned…

Wiki Layer

App.Layer

(Semantic) Wiki Scripting

Semantic Template

Semantic Query

(PHP, Javascript) Wiki Extensions

Halo AnnotationExtension

Parser Functio

n…

How to build applications effectively?

Semantic Forms

The Gap between Semantic Wiki and Deployed System

The Gap

Page 2: From SMW to Rules

2

Semantic Wiki @ RPI• Applications

– TW Group Portal – CMS for a group– RPI MAP – mashup RPI events, courses, Google Map, user contributed data – Wine Wiki – expose RDF to complement wine ontology for wine agent– TAMI policy test-bed – collaborative policy editing and testing environment

• Extensions – TetherlessMap – Mashup GoogleMap with SMW– AskMany – distributed query– SimpleExport – Edit/Export any data (e.g. N3) in wiki– Semantic History - Export revision history in RDF

• Templates – SMW Best Practice (SBP) Templates: encode facts; render them in list/factbox– OWL Meta Modeling Templates: encodes OWL ontology constructs

• Theory– Formalization of SMW Modeling Language, Query language– Rule inference: OWL-RL modeling, LP modeling– Integrity checking

• Evaluation– How effective a semantic wiki is in fostering collaboration?

Page 3: From SMW to Rules

From SMW to Rules

Jie BaoTetherless World Constellation, RPI

[email protected], [email protected]

@ Semantic Wiki Meetup at StanfordMarch 25, 2009

Page 4: From SMW to Rules

Motivation

Goal: • Use SMW for applications that need rules• Use rules to improve SMW usability

• Applications: access control policy modeling, integrity checking; use wiki as database

Page 5: From SMW to Rules

Translation Rules for SMW-ML

• Subproperty• Subclass• Class instance• Property instance• Redirection

• P(x,y) :- Q(x,y)• C(x) :- D(x)• C(a) :-• P(a,b) :-• a=b :-

• Implementation: wiki dump in rdf -> N-triple -> rules • TW Wiki: 800k triples• Dump time: about 20 min• Translation time: about 2 min

Page 6: From SMW to Rules

Translation Rules for SMW-QL

{{#ask: [[Category:Person]] [[attends::AAAI09]] }}

Result(x) :- Person(x), attends(x, AAAI09)

Page 7: From SMW to Rules

Translation Rules for SMW-QL

Page 8: From SMW to Rules

Translate SMW Query into Rules{{#ask: [[Category:A]]

[[p3::category:B]] or

[[p.p1.p2::<q>[[Category:D]] or [[p1::<q>[[SomePage]]</q>]]</q>||!v||<q>[[Category:E]]</q>

]]}}

• _result(x) :- _tmp0(x).• _tmp0(x) :- A(x), p3(x,x0),

x0=category:B.• _tmp0(x) :- p(x,x2),

p1(x2,x3), p2(x3,x1), _tmp9(x1).

• _tmp9(x1) :- _tmp12(x1).• _tmp12(x1) :- D(x1).• _tmp12(x1) :- p1(x1,x4),

x4=SomePage.• _tmp9(x1) :- x1!=v.• _tmp9(x1) :- E(x1).

Page 9: From SMW to Rules

Next Steps

• Applications: policy, IC checking• Extend SMW to express: – Negation as failure on categories and properties– Classic negation ?– Default

• Rule Execution – Which rule engine?

• Prolog solvers, ASP solvers, Rule reasoners…– Parallel execution? – Real time evaluation