vangelisv / thea

OWL2 library for Prolog
http://vangelisv.github.com/thea
108 stars 19 forks source link

XSB compatibility #24

Open SEssaid opened 13 years ago

SEssaid commented 13 years ago

Hello Vangelis and Chris,

I saw the "Status -Issues" wiki page and it says that porting to XSB could be a challenge. I am still new to Prolog systems and I can't figure out compatibility issues just by looking at the source code. I started to learn how to use Thea under SWI but I am really interested in also using it with XSB.

Can you please elaborate a little bit on some of the main obstacles for porting Thea to XSB? Are there some parts of Thea that are usable in XSB? What kind of work is needed to port to XSB? Should Thea accommodate XSB or should it be the other way around and which one is easier?

Thank you, Shahim

cmungall commented 13 years ago

I had a look at the latest version of XSB. It looks like they are making great progress towards compatibility with the prolog-commons library. There is at least one major problem with having direct compatibility, XSB still doesn't support use_module/1, which we use heavily. I guess we can go through with the SWI cross-referencer and change these to use_module/2s... but use_module/1 is pretty deeply ingrained for me.

A while ago I tried an alternative approach, where the source was all automatically translated to remove all module declarations. See the "iso" directory. Can't remember the status of this, but I got some of the core stuff to work. Core is actually fairly minimal, as at it's core Thea is just a set of standard predicates for representing an OWL ontology.

The XSB RDF parser seems fairly limited compared to SWI (it would be great if they had FLI capability and XSB could use all the SWI libs out the box). The use case I had in mind was using SWI/Thea to generate prolog files according to the owl2_model predicates, and then using XSB to process these (e.g. some combo of OWL entailment rules, more expressive horn rules, plus tabling). This is actually fairly doable, but you're not necessarily using much or even any of the Thea libraries from within XSB.

Compatibility with Yap is more likely, since Yap uses the same FLI as SWI. Yap also has tabling which is nice.