I’m using: SWI-Prolog version 8.2.4
I’m trying to design a system takes IoT sensor data (via MQTT) and an OWL ontology and reasons based on changes to from the sensors. I’ve been experimenting with using NodeRed to model the sensor flows and pengines nodes to assert changes from the sensors and other pengines nodes to introduce inferences derived from the sensor changes via the ontology back into NodeRed and MQTT. I’m just starting to to use Thea library to read the ontology (designed by someone else). I may eventually use CLP, but haven’t seen the need for it yet. I don’t yet know exactly what the queries over the ontology will be, so I don’t know if I will have a mismatch between closed (Prolog) and open (OWL) world reasoning.
- My highest level question is just whether anyone has advice on this approach.
I’m still slowly connecting things, but some more specific questions I have are
- When I load pengines, I get
ERROR: source_sink `library(uuid)' does not exist
It seems that this library is no longer included in SWI. Pengines still seems to work for my simple tests. Where can I get that library and how do I install it (on a Mac)?
- When I import the ontology with Thea, the names of classes have long IRI prefixes. I’d like to abbreviate them. I was able to use rdf_prefixes:rdf_register_prefix/2 to register abbreviations for the prefixes and I’ve confirmed that my abbreviations are correctly expanded with rdf_prefixes:rdf_global_term/2. However, when I write a clause using the abbreviation, it does not get expanded correctly. The manual pages for rdf_register_prefix/2 are not making sense to me. Is this even the right approach for handling IRI prefixes?
Thanks for any hints!