# How to do OWL in Prolog?

**URL:** <https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279>\
**Category:** General\
**Created:** [February 20, 2023, 6:07pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279 "2023-02-20T18:07:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamcrussell](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/adamcrussell/32/3168_2.png) [@adamcrussell](https://swi-prolog.discourse.group/u/adamcrussell)\
**Post date:** [February 20, 2023, 6:07pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/1 "2023-02-20T18:07:36Z")

</div>

I am interested in inter-operating between OWL and Prolog. My first attempt was with GNU Prolog and Thea but that went absolutely nowhere since it seems the Thea developers have long since abandoned support for Prologs other than SWI. Ok, fine. But I am confused as to how to do this with SWI?

Is thea fully integrated into the semweb libraries or is it a seperate thing I need to use? But seeing that the semweb libraries exist and are possibly there own independent thing can someone explain to me the difference and whether I should just use SWI’s semweb tools?

My goal is to read in both OWL files as well as raw data and interoperate between the two (query ontologies via Prolog, update ontologies via Prolog and export new OWL files). Anyone else here doing/done that before and if so, what high level advice may you have?

Doing a clone of the main Thea repository does not yield a turn key working installation, at least not with swipl 9.0.4. Is nobody using this thing anymore?

Relatedly @CapelliC I saw your thea2 pack repo on GitHub. That work does not seem to be generally available though?

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [February 20, 2023, 8:02pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/2 "2023-02-20T20:02:34Z")

</div>

It is a (long) while ago and I have little clue on the current status. Surely Thea is not part of the SWI-Prolog standard libraries, so you need to download it separately. I’m not sure how it handles OWL reasoning. I think one of the options is to call out to an external reasoner and the other is to use (tabled) Prolog.

---

<div class="post-metadata">

**Author:** ![adamcrussell](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/adamcrussell/32/3168_2.png) [@adamcrussell](https://swi-prolog.discourse.group/u/adamcrussell)\
**Post date:** [February 20, 2023, 8:06pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/3 "2023-02-20T20:06:05Z")

</div>

I think I edited my question just a moment before you replied. In any event, thanks for your thoughts. I think for now I’ll just avoid using Thea. It clearly has a lot of prior use and future promise, but currently stands in a state of disrepair.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [February 20, 2023, 8:38pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/4 "2023-02-20T20:38:34Z")

</div>

The most recent work I did on Thea is at [GitHub - conceptsinmotion/thea: OWL2 library for Prolog](https://github.com/conceptsinmotion/thea)

---

<div class="post-metadata">

**Author:** ![CapelliC](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/capellic/32/17_2.png) [@CapelliC](https://swi-prolog.discourse.group/u/CapelliC)\
**Post date:** [February 21, 2023, 7:50am UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/5 "2023-02-21T07:50:30Z")

</div>

Sorry, that old repo was requested by a customer of mine, but is not mantained anymore…  
Today, I would first try to use [GitHub - eyereasoner/eye-js: A distribution of EYE reasoner in the JavaScript ecosystem using Webassembly.](https://github.com/eyereasoner/eye-js).

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [February 21, 2023, 8:58am UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/6 "2023-02-21T08:58:56Z")

</div>

Note that you do not have to run EYE in the WASM version. It also runs in the normal version. Unfortunately it is designed as a stand-alone application rather than a library though.

---

<div class="post-metadata">

**Author:** ![adamcrussell](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/adamcrussell/32/3168_2.png) [@adamcrussell](https://swi-prolog.discourse.group/u/adamcrussell)\
**Post date:** [February 21, 2023, 2:58pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/7 "2023-02-21T14:58:26Z")

</div>

Got it, thanks for the update!

---

<div class="post-metadata">

**Author:** ![friguzzi](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/friguzzi/32/7045_2.png) [@friguzzi](https://swi-prolog.discourse.group/u/friguzzi)\
**Post date:** [February 21, 2023, 4:09pm UTC](https://swi-prolog.discourse.group/t/how-to-do-owl-in-prolog/6279/8 "2023-02-21T16:09:21Z")

</div>

You can also have a look at TRILL [https://github.com/rzese/trill](https://github.com/rzese/trill), a reasoner for OWL.  
You can try it online at [http://trill-sw.eu](http://trill-sw.eu/)  
Here is the [manual](https://trill-sw.eu/help/help-trill.html)
