public
Description: OWL2 library for Prolog
Homepage: http://vangelisv.github.com/thea
Clone URL: git://github.com/vangelisv/thea.git
Chris Mungall (author)
Tue Nov 17 15:49:39 -0800 2009
commit  8eac0141026465b171db4b3f8decbb2ef8cea0f2
tree    622aa6698fc0b0a8a2b676f8d4f8f5a28d57edfd
parent  5f63a61415e11258c5b84ccfc428b11a5ac662da
thea /
name age message
file .gitignore Thu Aug 20 21:31:43 -0700 2009 cleanup [Chris Mungall]
file Cookbook.txt Loading commit data...
file INSTALL.txt
file Makefile.in Tue Nov 17 15:41:42 -0800 2009 new [Chris Mungall]
file README Tue Nov 17 15:40:59 -0800 2009 docs [Chris Mungall]
directory apps/ Tue Nov 17 15:43:10 -0800 2009 apps [Chris Mungall]
directory benchmarks/
directory bin/ Tue Nov 17 15:43:45 -0800 2009 more opts [Chris Mungall]
file configure
file configure.in Fri Feb 13 09:01:38 -0800 2009 added some convenience predicates to owl2_model... [Chris Mungall]
directory examples/
file install-sh Tue Feb 10 17:16:48 -0800 2009 added Makefile.in for installation, based on st... [Chris Mungall]
directory iso/
file owl2_basic_reasoner.pl
file owl2_basic_reasoner.plt Wed Jul 01 17:30:57 -0700 2009 unify vars [Chris Mungall]
file owl2_classifier.pl Sun May 31 00:37:14 -0700 2009 still alpha, not ready [Chris Mungall]
file owl2_classifier.plt Wed May 20 01:21:14 -0700 2009 generate class expressions from instances [Chris Mungall]
file owl2_export_rdf.pl Thu Sep 10 06:59:39 -0700 2009 collect annotation nodes [Vangelis Vassiliadis]
file owl2_export_rdf.plt
file owl2_fol.pl Tue Jun 16 07:38:17 -0700 2009 first order logic [Chris Mungall]
file owl2_from_rdf.pl Thu Sep 10 08:07:51 -0700 2009 collect axiom AND annotation r nodes first. [Vangelis Vassiliadis]
file owl2_from_rdf.plt Tue Aug 04 11:55:21 -0700 2009 fixed URIs. test now passes [Chris Mungall]
file owl2_instance_util.pl Tue Nov 17 15:46:22 -0800 2009 docs [Chris Mungall]
file owl2_io.pl
file owl2_java_owlapi.pl Fri Jul 17 17:41:52 -0700 2009 fixed save [Chris Mungall]
file owl2_java_owlapi.plt Tue Aug 04 11:56:32 -0700 2009 added teams test http://owl.cs.manchester.ac.uk... [Chris Mungall]
file owl2_manchester_parser.pl
file owl2_manchester_parser.plt
file owl2_metamodel.pl Fri Jul 17 17:39:18 -0700 2009 fixed complementOf [Chris Mungall]
file owl2_model.pl Mon Nov 16 22:38:31 -0800 2009 docs [Chris Mungall]
file owl2_model.plt Mon Mar 23 19:58:08 -0700 2009 tests [Chris Mungall]
file owl2_owllink.pl Wed Sep 30 02:29:11 -0700 2009 owllink requests with example [Vangelis Vassiliadis]
file owl2_plsyn.pl Tue Nov 17 15:45:47 -0800 2009 now reads as well as writes [Chris Mungall]
file owl2_profiles.pl
file owl2_reasoner.pl
file owl2_thea1_compat.pl Thu Jun 18 04:25:35 -0700 2009 owl_export_rdf 1st version [Vangelis Vassiliadis]
file owl2_to_progol.pl
file owl2_to_prolog_dlp.pl Tue Nov 17 15:45:09 -0800 2009 extra syntactic support for DLV. use empty head... [Chris Mungall]
file owl2_to_prolog_dlp.plt
file owl2_util.pl Tue Nov 17 15:46:46 -0800 2009 added contract_namespaces/0 and use_safe_labels... [Chris Mungall]
file owl2_xml.pl Wed Sep 30 02:29:11 -0700 2009 owllink requests with example [Vangelis Vassiliadis]
file owl2_xml.plt Tue May 26 16:12:11 -0700 2009 added roundtrip test [Chris Mungall]
directory owl2java/ Tue Mar 17 15:32:55 -0700 2009 accidentally committed wrong file [Chris Mungall]
directory owlgres/ Wed Jun 17 07:10:08 -0700 2009 docs [Chris Mungall]
directory rules/ Tue Nov 17 15:42:39 -0800 2009 efficiency [Chris Mungall]
file swrl.pl Fri Jul 17 17:43:36 -0700 2009 subClassOf from swrl rules [Chris Mungall]
file swrl.plt Tue Aug 04 11:56:01 -0700 2009 fixed [Chris Mungall]
file swrl_rdf_hooks.pl Sat Jun 20 16:32:36 -0700 2009 parse builtins [Chris Mungall]
directory t/
directory testfiles/ Wed Sep 30 02:29:11 -0700 2009 owllink requests with example [Vangelis Vassiliadis]
directory www/ Mon Sep 14 00:23:13 -0700 2009 changes in web page (doc link + chris contact) [Vangelis Vassiliadis]
README
---+ Thea2 : Prolog Modules for OWL2

A collection of modules for parsing and manipulating OWL2 ontologies
in Prolog. It is developed with SWI-Prolog in mind, but the goal is to
maximize portability with other prologs, such as Yap and XSB.

This documentation is intended to be read via pldoc

---++ Installation

See INSTALL.txt

---++ Overview

The model is based on Structural Specification and Functional-Style
Syntax for OWL2 (http://www.w3.org/TR/owl2-syntax), and can be found
in owl2_model.pl

Predicates such as subClassOf/2 can be used to query in-memory axioms

There are a variety of surface forms for OWL2. The goal is to
eventually support all of these for both parsing and writing. So far
we have parsers and writers for:

* RDF - owl2_from_rdf.pl
* OWL-XML - owl2_xml.pl

We also allow for reading and writing from prolog factfiles.

The module owl2_io.pl is used for reading and writing other formats
and languages. For example:

==
swipl -g "[library('thea2/owl2_io')],load_axioms('testfiles/wine.owl',owl)"
==

See

* Cookbook.txt

For some handy recipes

---++ SWRL support

The module swrl.pl provides support for the Semantic Web Rules Language

SWRL rules are treated as axioms, extending owl2_model.pl

In addition, we allow for representation of rules as prolog terms and
prolog programs - there is a partial converter from prolog programs to
OWL2+SWRL

---++ Reasoning support

The DLP subset of OWL2-DL can be translated to logic programs using a
transormation defined by Grosof. See owl2_to_prolog_dlp.pl

The resulting programs can be used with Prologs such as Yap and
XSB. There are also hooks for answer set programming and disjunctive
datalog systems such as DLV.

There is also a very partial TBox reasoner in owl2_reasoner.pl, and an
ad-hoc reasoner in owl2_basic_reasoner.pl that can be used with a
non-tabled prolog such as SWI; however, this gives incomplete results.

The DIG interface from Thea1 has yet to be converted. However, as we
now have OWLLink support, and DIG is being retired in favor of OWLLink.

You can also use java reasoners via the OWLAPI bridge. See
owl2_owlapi_java.pl

---++ Utilities

Currently the owl2_util.pl is a grab-bag of ad-hoc utility
predicates. Browse this to get an idea of some of the capabilities.

For example, one useful predicate is use_labels_for_IRIs/0

---++ Relationship to SWI-Prolog SemWeb Library

Currently we use rdf_db.pl to translate from OWL RDF-XML to OWL
axioms. This 'consumes' the triples in the RDF database. Eventually we
would like a dynamic view over an RDF database, although this will be
difficult due to the non-monotonic nature of the mapping between RDF
and OWL.

---++ On namespaces

Currently all IRIs are treated as Prolog atoms. This makes for
slightly verbose axioms, especially if long URLs are used.

One possible future option is to use the semweb library and
rdf_register_ns/2 to allow for convenient specification of namespaces
using a QName-like mechanism. This is not currently
implemented. Comments welcome.

One possibility is to simply rewrite the ontology using more compact
atoms. Even though the OWL spec dictates that well-formed IRIs should
be used, Thea allows you to use any unique atom to identify an
entity. See remove_namespaces/0 in owl2_util.pl for details. Of course,
care must be taken when doing this.

---++ Optional Extras

The core modules are

* owl2_model.pl -- for representing and manipulating axioms and expressions in OWL ontologies
* owl2_io.pl -- for reading/writing axioms

However, there are various additional modules that are not required
but may be useful for specific purposes. Here is an overview of what
is currently distributed (some of these may move to separate
distributions):


---+++ Integration with other LP systems

Pure prolog, disjunctive datalog, description logics etc are all
related families of languages constituting some subset of first-order
logic. Each offers its own inference procedures including the prolog
WAM, SLG resolution, DL reasoners, ILP etc. Navigating this territory
can be difficult due to a lack of standards. Thea aims to make this
easier.

See Cookbook.txt for some recipes

---+++ Integration with exteral tools

---++++ OWLAPI

If you have JPL installed you can use a bridge module to access
all the capabilities of the OWLAPI. This includes reasoners such as
Pellet and FaCT++.

* owl2_java_owlapi.pl

Requires JPL

---++++ OWLGRES

Owlgres is an open source, database-backed scalable reasoner for
OWL2.  

* owl2_sqlmap_owlgres.pl - allows ABox axiom predicates to be mapped
to an OWLGRES database

Requirements:

* ODBC
* sql_compiler.pro (currently distributed as part of blipkit)

---++ Compatibility

The goal is to keep the core ISO compliant and usable across prolog
systems but this is difficult due to the different implementations of
modules in different Prolog engines. We develop for SWI-Prolog and are
aiming for full support for Yap in the near future.

See the iso/ directory for a dynamically generated version of some
Thea modules, stripped of module declarations. This is usable in
no-module systems like GNU Prolog and systems with incompatible module
syntax such as XSB. Only a subset of Thea functionality will be
available here, as SWI/Yap specific libraries are used for RDF, XML
and Java interaction.

---++ Sample Applications

See the apps/ director

---+++ Web interface

There is the beginnings of a primitive web front end:

* apps/webthea/webthea.pl

---+++ Obol - label parsing and generation

* apps/labelgen/labelgen.pl

---+++ MIREOT - selective migration of referenced classes into an ontology

* apps/mireot/mireot.pl


---++ Authors

This module is a continuation of Thea1, developed by VV.

Some of the code was developed by CJM