From SMW to Rules

Post on 15-Jan-2015

516 views 0 download

description

 

Transcript of 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

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?

From SMW to Rules

Jie BaoTetherless World Constellation, RPI

baojie@cs.rpi.edu, baojie@gmail.com

@ Semantic Wiki Meetup at StanfordMarch 25, 2009

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

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

Translation Rules for SMW-QL

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

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

Translation Rules for SMW-QL

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).

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