• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Previewing OWL Changes and Refactorings Using a Flexible XML Database
 

Previewing OWL Changes and Refactorings Using a Flexible XML Database

on

  • 501 views

ORES workshop at ESWC 2010

ORES workshop at ESWC 2010

Statistics

Views

Total Views
501
Views on SlideShare
501
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Previewing OWL Changes and Refactorings Using a Flexible XML Database Previewing OWL Changes and Refactorings Using a Flexible XML Database Presentation Transcript

    • Introduction TNTBase Refactoring Lifecycle Conclusion Previewing OWL Changes and Refactorings Using a Flexible XML Database Ontology Repositories and Editors @ ESWC 2010 Christoph Lange and Vyacheslav Zholudev Jacobs University, Bremen, Germany KWARC – Knowledge Adaptation and Reasoning for Content May 31, 2010Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 1/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionOntology Refactoring and Change Management Definition (Change Management for Ontologies) ‘‘the process of performing the changes as well as [. . . ] the process of coping with the consequences of changes’’ (Klein 2004) Definition (Refactoring [in Software Engineering]) ‘‘a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior’’ (Fowler)Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 2/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionOntology Refactorings and Restructurings Typical Refactorings: splitting ontologies into modules vs. merging, moving axioms, rewriting axioms A B, A C ↔ A B C Restructurings: e. g. changing URIs changes external behavior (other ontologies in the repository, software, annotated documents) tools try to keep potential damage low Our Assumptions: Any change may break things. Changes should be tested (e. g. by other collaborators). We offer a versioned repository that previews changes before making them.Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 3/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionTNTBase – Our Hammer TNTBase = Versioned Storage for XML = Subversion + Berkeley DB XML + TNT(?) 1 xSVN – Subversion on steroids 2 Web app based on Berkeley DB XML SVN interface Any SVN clients works with TNTBase RESTful interface XQuery/XQuery Update – Extended with versioning model Virtual Documents – XML database views (hammer)Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 4/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionVirtual Documents: Editable XML Views VDoc Specification defines VDocs: Mixture of static XML elements and XQueries XQueries can reside separately, can be overriden Parameters for XQueries Queryable Editable Materializable VDocs – means to refactor ontologiesLange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 5/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionFactoring out a Submodule <Ontology xmlns="http://www.w3.org/2002/07/owl#" xml:base="http://example.org/onto" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <Prefix name="cars" IRI="http://example.org/onto#"/> <Declaration><Class IRI="http://example.org/onto#Car"/></Declaration> <Declaration><Class IRI="http://example.org/onto#MiniVan"/></Declaration> <Declaration><Class IRI="#SportsCar"/></Declaration> <Declaration><Class abbreviatedIRI="cars:Roadster"/></Declaration> <Declaration><Class IRI="http://example.org/onto#AirPlane"/></Declaration> <Declaration><Class IRI="http://example.org/onto#FighterBomber"/></Declaration> <DisjointClasses> <Annotation><AnnotationProperty abbreviatedIRI="rdfs:comment"/> <Literal>Cars are not airplanes.</Literal></Annotation> <Class IRI="#Car"/><Class abbreviatedIRI="cars:AirPlane"/> </DisjointClasses> <SubClassOf><Class abbreviatedIRI="cars:MiniVan"/> <Class abbreviatedIRI="cars:Car"/></SubClassOf> <SubClassOf><Class IRI="http://example.org/onto#SportsCar"/> <Class IRI="http://example.org/onto#Car"/></SubClassOf> <SubClassOf><Class IRI="http://example.org/onto#Roadster"/> <Class IRI="http://example.org/onto#SportsCar"/></SubClassOf> <SubClassOf><Class IRI="http://example.org/onto#FighterBomber"/> <Class IRI="http://example.org/onto#AirPlane"/></SubClassOf> </Ontology>Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 6/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionFactoring out a Submodule <Ontology xmlns="http://www.w3.org/2002/07/owl#" xml:base="http://example.org/onto" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <Prefix name="cars" IRI="http://example.org/onto#"/> <Declaration><Class IRI="http://example.org/onto#Car"/></Declaration> <Declaration><Class IRI="http://example.org/onto#MiniVan"/></Declaration> <Declaration><Class IRI="#SportsCar"/></Declaration> <Declaration><Class abbreviatedIRI="cars:Roadster"/></Declaration> <Declaration><Class IRI="http://example.org/onto#AirPlane"/></Declaration> <Declaration><Class IRI="http://example.org/onto#FighterBomber"/></Declaration> <DisjointClasses> <Annotation><AnnotationProperty abbreviatedIRI="rdfs:comment"/> <Literal>Cars are not airplanes.</Literal></Annotation> <Class IRI="#Car"/><Class abbreviatedIRI="cars:AirPlane"/> </DisjointClasses> <SubClassOf><Class abbreviatedIRI="cars:MiniVan"/> <Class abbreviatedIRI="cars:Car"/></SubClassOf> <SubClassOf><Class IRI="http://example.org/onto#SportsCar"/> <Class IRI="http://example.org/onto#Car"/></SubClassOf> <SubClassOf><Class IRI="http://example.org/onto#Roadster"/> <Class IRI="http://example.org/onto#SportsCar"/></SubClassOf> <SubClassOf><Class IRI="http://example.org/onto#FighterBomber"/> <Class IRI="http://example.org/onto#AirPlane"/></SubClassOf> </Ontology>Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 6/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionFactoring out a Submodule <Ontology xmlns="http://www.w3.org/2002/07/owl#" xml:base="http://example.org/onto" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <Prefix name="cars" IRI="http://example.org/onto#"/> <Import>cars.owx</Import> <Declaration><Class IRI="http://example.org/onto#AirPlane"/></Declaration> <Declaration><Class IRI="http://example.org/onto#FighterBomber"/></Declaration> <SubClassOf><Class IRI="http://example.org/onto#FighterBomber"/> <Class IRI="http://example.org/onto#AirPlane"/></SubClassOf> </Ontology>Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 6/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionVirtual Document Specification for Factoring out <tnt:virtualdocument xmlns:tnt="http://tntbase.mathweb.org/ns"> <tnt:skeleton query="tntbase:/factor-out/subclasses.xq"/> <tnt:params> <tnt:param name="input"> <tnt:value>/factor-out/transport.owx</tnt:value> </tnt:param> <tnt:param name="class"> <tnt:value>http://example.org/onto#Car</tnt:value> </tnt:param> <tnt:param name="target"> <tnt:value>cars.owx</tnt:value> </tnt:param> </tnt:params> </tnt:virtualdocument> These are default values; can be instantiated with other values (for refactoring a different ontology).Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 7/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionXQuery for Factoring out import module namespace tntx = "http://tntbase.org/ns/ores" at ’tntbase:/lib/ores-module.xq’; declare default element namespace "http://www.w3.org/2002/07/owl#"; declare variable $input external; declare variable $class external; declare variable $target external; copy $doc := fn:doc($input) modify ( delete nodes tntx:complete-with-subclasses($doc/Ontology, $class), insert node <Import>{ $target }</Import> after $doc/Ontology/Prefixlast() ) return $doc Source code is inside the repository!Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 8/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionThe Underlying Library declare function tntx:complete-with-subclasses($onto as element(), $class as xs:string) as element()* { (: for all tntx:subclasses, return tntx:axioms-for-class :) }; declare function tntx:axioms-for-class($onto as element(), $class as xs:anyURI) as element()* { (: Declaration, SubClassOf, EquivalentClasses, DisjointClasses, ... :) }; declare function tntx:subclasses($onto as element(), $class as xs:anyURI) as xs:anyURI* { for $subclass in $onto/SubClassOf[tntx:expandIRIOf(Class[2]) eq $class]/Class[1]/tntx:expandIRIOf(.) return ($subclass, tntx:subclasses($onto, $subclass)) }; declare function tntx:expandIRIOf($parent as element()) as xs:anyURI { if ($parent/@IRI) then tntx:resolveIRIAgainstBase($parent/@IRI) else if ($parent/@abbreviatedIRI) then tntx:expandAbbreviatedIRI($parent/@abbreviatedIRI) else (: throw error :) }; Key functionality: IRI expansion, equality of OWL expressions Source code is inside the repository!Lange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 9/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionFurther Refactorings Renaming Entities expand and replace IRIs (in all modules) Merging Modules opposite of factoring out Rewriting Axioms example: DisjointUnion in OWL 2 (syntactic sugar for EquivalentClasses/ObjectUnionOf + DisjointClasses) Lowering Expressivity example: extract OWL 2 QL subontology. easy solution: throw away everything else smarter solution: weaken axioms Stripping Axiom Annotations just remove Annotation children Try the sandbox: http://tntbase.org/wiki/usecase_ontologiesLange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 10/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionOntology Lifecycle 1 Write VDoc specification (and XQuery if needed) 2 Apply it to desired ontologies 3 Check the output (improve refactoring if needed) 4 Two possibilities to continue: Edit the VDoc (changes propagated back to original ontology) Materialize VDoc into new revision of ontologyLange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 11/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionTowards Practical Applications TNTBase scales well so far tested with different documents → AI Mashup Challenge, ESWC Demo Session starting to use it as a BioPortal backend TNTBase as a storage backend for Protégé or NeOn Toolkit Use OWL Diff to optimize storage of revision history TNTBase as a frontend application: human-readable rendering of interactive semantic documents → ESWC Demo SessionLange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 12/13
    • Introduction TNTBase Refactoring Lifecycle ConclusionConclusion TNTBase safely implements ontology refactorings as views. Thanks to XQuery Update and our utility functions, TNTBase processes ontologies ‘‘semantically’’ TNTBase enables agile collaborative refactoring. Try the sandbox: http://tntbase.org/wiki/usecase_ontologiesLange/Zholudev (Jacobs U.) Previewing OWL Changes and Refactorings Using a Flexible XML Database May 31, 2010 13/13