Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion




                          A Mathematical Approach to
                     Ontology Authoring and Documentation
                                              Deduktionstreffen 2009


                                 Christoph Lange and Michael Kohlhase

                                            Jacobs University, Bremen, Germany
                             KWARC – Knowledge Adaptation and Reasoning for Content


                                                   October 15, 2009




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     1/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  Documenting Ontologies



           Semantic Web Ontology: formalization of a shared conceptualization,
           used by intelligent agents, for annotating documents, . . .
           Just another kind of formalization, usually a decidable FOL subset (e. g.
           OWL: description logic)
           Ontologies power applications, they are engineered collaboratively,
           they have to be maintained ⇒ Documentation is crucial (as with
           software)!




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     2/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  Shortcomings of OWL

   Same for other languages (even worse)
           can annotate entities (classes, properties, individuals) and axioms, but
           only textual annotations really work in practice.
           can’t annotate subsets/sections of ontologies, can’t annotate imports,
           can’t interlink documentation and formal representation (literate
           programming)
           poor modularity ⇒ can’t document how imported concepts are reused
           extensions have been proposed, but tools don’t support them
           limited expressivity is nice for decidability, but not for saying what you
           intend ⇒ incomplete, ambiguous models of the world
           in practice, documentation is often maintained separately in HTML ⇒
           hard to maintain


Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     3/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  OMDoc for Ontologies: Correspondences and Differences

   We know how to do integrated documentation (for mathematics) ⇒ apply
   it to ontologies!
   Correspondences: Three layers of knowledge representation:
                1  symbols = entities
                2  statements = axioms/rules
                   (state properties of symbols)
                3  theories = ontologies
    Differences:
                          Expressivity: logical flexibility/heterogeneity vs. description
                                        logic
                           Modularity: theory morphisms vs. literal imports
                          Documentation: literate programming, flexible granularity
                                        vs. limited annotations

Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     4/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  OMDoc as a Semantic Web Ontology Language



   Plan for documenting ontologies in OMDoc:
       1   model OWL and its foundations as OMDoc theories
       2   introduce import syntax and semantics for referencing semantic web
           ontologies from OMDoc
       3   translate ontologies from OMDoc to the RDF syntax of OWL (to reuse
           existing reasoners), and vica versa
       4   enhance the documentation in OMDoc




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     5/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  1. Knowledge Representation


           basic structure of a semantic web ontology: RDF triple =
           predicate(subject, object) axioms
           syntactic sugar for frequently used constructs (instance-of = has-type)
           can distinguish between declared and inferred knowledge
           (definition/axiom vs. theorem; “provenance”), can model proofs

   Example
                                       Student = Person ≥ 1 enrolledIn
   declare symbols (with types), define Student symbol




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     6/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  Example in the Semantic Wiki SWiM




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     7/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  2. Connecting OMDoc and Semantic Web URIs



           OMDoc: theory graph URI → theory name → symbol name
   Semantic Web: namespace URI → local name (like XML)

           Writing ontologies from scratch in OMDoc → no problem                                           !
           But how to reimplement or reference existing semantic web
           ontologies?
           → write dummy theory that points to namespace URI, further
           OMDocification optional




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     8/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  3. Compatibility to Reasoners etc.
   Efficient DL reasoners and other ontology tools (e. g. visualization) don’t
   support OMDoc – be compatible with them
         extended our Krextor XML→RDF extraction framework to
         OMDoc→OWL; implemented OWL/RDF→OMDoc (bootstrap editing)
         formally specified (in OMDoc, of course ) how our syntactic sugar
         breaks down to RDF
   <file:.../uni.omdoc?university>
           rdf:type owl:Ontology ;
           owl:imports foaf: .
   <file:.../uni.omdoc?university?Student>
           rdf:type owl:Class ;
           owl:equivalentClass _:d24e43 .
   _:d24e43
           owl:intersectionOf _:collection-d24e44 .
   _:collection-d24e44
           rdf:first foaf:Person ;
           rdf:rest _:collection-d24e44-1 .
   _:collection-d24e44-1
           rdf:first _:d24e47 ;
           rdf:rest rdf:nil .
   _:d24e47
           rdf:type owl:Restriction ;
           owl:onProperty <file:.../uni.omdoc?university?enrolledIn> ;
           owl:minCardinality "1"^^xsd:nonNegativeInteger .

Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009     9/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  4. Comprehensible Manuals (here: FOAF)




         JOMDoc: elaborate adaptive presentation framework
                 http://jomdoc.omdoc.org
          JOBAD: architecture for interactive documents
                 http://jomdoc.omdoc.org/wiki/AI-Mashup
Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009    10/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  Evaluation: FOAF reimplemented in OMDoc


       1   FOAF references other ontologies without importing them. More
           support with OMDoc.
       2   Could turn all source code <!-- comments --> (e. g. section
           headers) into proper documentation and document structure
       3   Revised redundant axioms: some declared, some inferred in OMDoc
       4   non-DL semantics of one concept expressed in FOL
       5   reuse of imported entities not modeled properly – solved by views
       6   seamlessly integrated completely informal documentation sections
           with the formal part




Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009    11/12
Motivation                          OMDoc for Ontologies                          Evaluation                        Conclusion


  Challenges and Future Work

   Ontology engineering can benefit from better documentation (and more
   explicit modularity/heterogeneity) – but:
           High expressivity and good documentation ⇒ extremely verbose.
           Need good editor support. Plan: extend OMDoc-aware semantic wiki
           SWiM for ontologies, “invade” [Collaborative] Protégé and word
           processors
           Consider various ontology documentation workflows:
                   add documentation to existing ontologies
                   formalize informal documents into ontologies
                   collaborative development
           Mathematically define syntactic macros
           Do the same for other languages – ideas, wishes?
           Evaluate with industry-scale ontologies

Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009    12/12

A Mathematical Approach to Ontology Authoring and Documentation

  • 1.
    Motivation OMDoc for Ontologies Evaluation Conclusion A Mathematical Approach to Ontology Authoring and Documentation Deduktionstreffen 2009 Christoph Lange and Michael Kohlhase Jacobs University, Bremen, Germany KWARC – Knowledge Adaptation and Reasoning for Content October 15, 2009 Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 1/12
  • 2.
    Motivation OMDoc for Ontologies Evaluation Conclusion Documenting Ontologies Semantic Web Ontology: formalization of a shared conceptualization, used by intelligent agents, for annotating documents, . . . Just another kind of formalization, usually a decidable FOL subset (e. g. OWL: description logic) Ontologies power applications, they are engineered collaboratively, they have to be maintained ⇒ Documentation is crucial (as with software)! Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 2/12
  • 3.
    Motivation OMDoc for Ontologies Evaluation Conclusion Shortcomings of OWL Same for other languages (even worse) can annotate entities (classes, properties, individuals) and axioms, but only textual annotations really work in practice. can’t annotate subsets/sections of ontologies, can’t annotate imports, can’t interlink documentation and formal representation (literate programming) poor modularity ⇒ can’t document how imported concepts are reused extensions have been proposed, but tools don’t support them limited expressivity is nice for decidability, but not for saying what you intend ⇒ incomplete, ambiguous models of the world in practice, documentation is often maintained separately in HTML ⇒ hard to maintain Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 3/12
  • 4.
    Motivation OMDoc for Ontologies Evaluation Conclusion OMDoc for Ontologies: Correspondences and Differences We know how to do integrated documentation (for mathematics) ⇒ apply it to ontologies! Correspondences: Three layers of knowledge representation: 1 symbols = entities 2 statements = axioms/rules (state properties of symbols) 3 theories = ontologies Differences: Expressivity: logical flexibility/heterogeneity vs. description logic Modularity: theory morphisms vs. literal imports Documentation: literate programming, flexible granularity vs. limited annotations Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 4/12
  • 5.
    Motivation OMDoc for Ontologies Evaluation Conclusion OMDoc as a Semantic Web Ontology Language Plan for documenting ontologies in OMDoc: 1 model OWL and its foundations as OMDoc theories 2 introduce import syntax and semantics for referencing semantic web ontologies from OMDoc 3 translate ontologies from OMDoc to the RDF syntax of OWL (to reuse existing reasoners), and vica versa 4 enhance the documentation in OMDoc Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 5/12
  • 6.
    Motivation OMDoc for Ontologies Evaluation Conclusion 1. Knowledge Representation basic structure of a semantic web ontology: RDF triple = predicate(subject, object) axioms syntactic sugar for frequently used constructs (instance-of = has-type) can distinguish between declared and inferred knowledge (definition/axiom vs. theorem; “provenance”), can model proofs Example Student = Person ≥ 1 enrolledIn declare symbols (with types), define Student symbol Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 6/12
  • 7.
    Motivation OMDoc for Ontologies Evaluation Conclusion Example in the Semantic Wiki SWiM Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 7/12
  • 8.
    Motivation OMDoc for Ontologies Evaluation Conclusion 2. Connecting OMDoc and Semantic Web URIs OMDoc: theory graph URI → theory name → symbol name Semantic Web: namespace URI → local name (like XML) Writing ontologies from scratch in OMDoc → no problem ! But how to reimplement or reference existing semantic web ontologies? → write dummy theory that points to namespace URI, further OMDocification optional Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 8/12
  • 9.
    Motivation OMDoc for Ontologies Evaluation Conclusion 3. Compatibility to Reasoners etc. Efficient DL reasoners and other ontology tools (e. g. visualization) don’t support OMDoc – be compatible with them extended our Krextor XML→RDF extraction framework to OMDoc→OWL; implemented OWL/RDF→OMDoc (bootstrap editing) formally specified (in OMDoc, of course ) how our syntactic sugar breaks down to RDF <file:.../uni.omdoc?university> rdf:type owl:Ontology ; owl:imports foaf: . <file:.../uni.omdoc?university?Student> rdf:type owl:Class ; owl:equivalentClass _:d24e43 . _:d24e43 owl:intersectionOf _:collection-d24e44 . _:collection-d24e44 rdf:first foaf:Person ; rdf:rest _:collection-d24e44-1 . _:collection-d24e44-1 rdf:first _:d24e47 ; rdf:rest rdf:nil . _:d24e47 rdf:type owl:Restriction ; owl:onProperty <file:.../uni.omdoc?university?enrolledIn> ; owl:minCardinality "1"^^xsd:nonNegativeInteger . Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 9/12
  • 10.
    Motivation OMDoc for Ontologies Evaluation Conclusion 4. Comprehensible Manuals (here: FOAF) JOMDoc: elaborate adaptive presentation framework http://jomdoc.omdoc.org JOBAD: architecture for interactive documents http://jomdoc.omdoc.org/wiki/AI-Mashup Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 10/12
  • 11.
    Motivation OMDoc for Ontologies Evaluation Conclusion Evaluation: FOAF reimplemented in OMDoc 1 FOAF references other ontologies without importing them. More support with OMDoc. 2 Could turn all source code <!-- comments --> (e. g. section headers) into proper documentation and document structure 3 Revised redundant axioms: some declared, some inferred in OMDoc 4 non-DL semantics of one concept expressed in FOL 5 reuse of imported entities not modeled properly – solved by views 6 seamlessly integrated completely informal documentation sections with the formal part Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 11/12
  • 12.
    Motivation OMDoc for Ontologies Evaluation Conclusion Challenges and Future Work Ontology engineering can benefit from better documentation (and more explicit modularity/heterogeneity) – but: High expressivity and good documentation ⇒ extremely verbose. Need good editor support. Plan: extend OMDoc-aware semantic wiki SWiM for ontologies, “invade” [Collaborative] Protégé and word processors Consider various ontology documentation workflows: add documentation to existing ontologies formalize informal documents into ontologies collaborative development Mathematically define syntactic macros Do the same for other languages – ideas, wishes? Evaluate with industry-scale ontologies Lange/Kohlhase (Jacobs University) A Mathematical Approach to Ontology Authoring and Documentation October 15, 2009 12/12