Towards portability with Thea2

The Thea OWL package is currently SWI-specific. It would be nice to use this with other prologs, particularly to take advantage of tabling in combination with DLP programs generated from OWL.

I’m impressed by the prolog-commons effort, particularly the convergence we are seeing between Yap and Prolog. Currently the core parts of Thea work with Yap, although there are some annoyances (Yap is unfamiliar with the useful debug/3). Unfortunately the excellent semweb package is still SWI-specific, so you will need to convert your ontology to axioms in prolog syntax first. OWL-XML should in principle be possible, as Yap-6 includes the SWI sgml package, although this appears not be working yet.

For other prologs the lack of a standard module system is the main hindrance. I have added a simple translator to the Thea2 makefile that will strip module declarations generating mostly ISO conformant prolog that can be used with GNU Prolog and XSB. Again, this is just for the core parts. XSB does include the sgml package so parsing OWL-XML is possible with some difficutly, although there are some annoyances such as incompatibilities in the load_structure/3 predicate.

I’m encouraged to hear that these 4 open source prologs are converging on a standard module system, so we should have better compatbility in the future. Converging on a FLI may be too much to ask, so it would be useful to have prolog implementations of xml and rdf parsing to use as fallbacks if the C libs are not present or usable.

Advertisements
Post a comment or leave a trackback: Trackback URL.

Comments

  • MS  On July 21, 2009 at 6:48 pm

    Really, the sgml in the Yap package doesn’t work? Have you tried sgml in the Swi package?

  • blipkit  On July 22, 2009 at 6:03 am

    Hi MS

    For historic reasons XML parsing in SWI is provided via the sgml package:

    http://www.swi-prolog.org/pldoc/package/sgml.html

    (generally called the SGML/XML parser)

    This package works very well for parsing XML from within SWI-Prolog (never tried it for SGML, doubt I will ever need to). It’s very fast and extremely useful. The Thea OWL-XML translator is based directly on this package (and the OWL-RDF/XML translator is based indirectly on this, via rdf_db in the semweb package). So I have absolutely no problems with using SWI here.

    I am happy to report that since posting this entry, Vitor has committed a fix to the yap-6 git repository that means we can parse OWL-XML in Yap! I am confident that OWL-RDF/XML in Yap will follow soon enough. Thank you Vitor!

  • Askhat  On March 4, 2010 at 9:57 pm

    Hello! I am a student from Russia. You say that the OWL-ontology can be disassembled (translated) in the code prologue (SWI-Prolog) … With thea2 I tried to parse the ontology, but I did not go … I libraries, download (read) ontology (load_axioms / 2), now what to do to translate the ontology into a prologue (rules, facts )..?. Help please! thanks!

  • Askhat  On March 5, 2010 at 6:03 am

    Thank you! Started to understand … In the case of misunderstanding, it is possible for me to address you?

  • blipkit  On March 5, 2010 at 7:44 pm

    certainly!

  • Askhat  On May 11, 2010 at 5:26 am

    Good day! Is it possible that after the transfer of OWL code in the prologue, facts and events (entities) have been without a URL … Like this form: the weather (X):-hot (X), then there is no way to ontology (URL )?
    Thanks!

    • blipkit  On May 11, 2010 at 5:58 am

      When writing out OWL as prolog axioms with the owl2_model, the full URIs are retained.

      When compiling an OWL ontology to a logic program, the URI in truncated to make a more readable prolog program. This behavior is somewhat hardwired at the moment I’m afraid.

      What are you trying to do? Are you certain you want to compile the ontology into a logic program

  • Askhat  On May 11, 2010 at 6:28 am

    A full URI code uncomfortable perceived by man …
    And that, is it possible?
    and in the preparation of requests full URI also taken into account?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: