Bell Labs logo

Report on OWLP

by Peter F. Patel-Schneider

What is OWLP?

How does OWLP do its parsing?

  1. Start with a World Wide Web RDF/XML document (or a file)
  2. Parse the document into the XQuery 1.0 and XPath 2.0 Data Model.
    • using an as-yet-unreleased version of Galax
  3. Turn the data model into an RDF graph
    • Bugs in some obscure cases and incorrect serialization of RDF XML literals.
  4. Analyze the RDF graph and try to turn it into an OWL DL ontology or collection of axioms and facts
    • Handle OWL imports directives here.
    • There is also code to print the result in the OWL abstract syntax.
  5. Optionally check to see if the result is in OWL Lite.

How does OWLP do its reasoning?

  1. Start with a file containing a OWL abstract syntax ontologies, axioms, and facts.
  2. Parses the file into an internal form
    • including checking context sensitive aspects of OWL DL
  3. Translate internal form into modal formulae as required to do consistency and entailment processing.
    • This modal language cannot handle all OWL abstract syntax, so this process may not succeed.
  4. Hand these modal formulae over to an experimental partial version of the DLP description logic prover.
    • This version is an incomplete reasoner.
    • This version has bugs.

Analysis of Results

Analysis of the OWLP Code


Parsing component:

  1. Read and parse XML into the XQuery data model.
  2. Turn XQuery data into RDF graph
  3. Turn RDF graph into OWL ontology

Reasoning component:

  1. Read OWL ontology file
  2. Turn OWL ontology into modal formulae
  3. Modal reasoner

Code Size (Parsing OWL in RDF/XML)

???GalaxParse XML into XQuery data model
62rdfGraph.mlRDF Graph datatypes and utility functions
25Datatypes for RDF graphs
33Utility functions for RDF Graphs
542rdfxml.mlTurn XQuery data into an RDF graph
159categories.mlOWL built-in URI references and their categories
302ontology.mlOntology datatypes and printing functions
79Datatypes for OWL ontologies
223Printing functions for OWL ontologies
916owl.mlTurn RDF graph into OWL ontology

Sizes are in lines.

Code Size (Parsing OWL abstract syntax)

90lexer.lexSML Lex lexer for abstract ontologies
239parser.grmSML Yacc parser for abstract ontologies
63ontologySyntax.smlData structure for OWL ontology as parsed
100ontology.smlData structure for OWL ontology
236fix.smlTurn parsed ontology into real ontology
202translator.smlTurn ontology into modal formulae
86owl.smlTop level control

Code Size (Reasoning)

119util.smlUtility structures for sets, etc.
121nff-sigs.smlSignature for Normal Form Formulae
432nff.smlStructures and utility functions for NFF
317Actual stuff
115Pretty printing
676model.smlFunctions to modify models
533sat.smlSatisfiability implementation

Code Size (Other)

16rdfxmlParse.mlTop level RDF/XML parsing function
23owlParse.mlTop level OWL parsing function
203owlTest.mlTest harness for WebOnt WG tests
98tripleLex.mllOCAML Lex lexer for n-triples
114tripleYacc.mlyOCAML Yacc parser for n-triples
56rdfEqual.mlEquivalence for RDF graphs
130rdfTest.mlTest harness for RDF Core WG tests
71abstractLex.mllOCAML Lex lexer for abstract ontologies
161abstractYacc.mlyOCAML Yacc parser for abstract ontologies
50ontologySyntax.mlData structures for ontology parsing
197abstractParse.mlCheck parsed ontology for correctness

Relevant Totals

??Parsing XML document into XQuery data
604Turning XQuery data into RDF graph
1154Turning RDF graph into OWL DL abstract ontologies
728Parsing OWL DL abstract ontologies
1766Modal reasoner

Note especially that turning an RDF graph into an OWL abstract ontology takes considerably more code than the entire job of parsing an OWL DL abstract ontology.

Comments on RDF