fluree / db

Fluree database library
https://fluree.github.io/db/
Other
337 stars 21 forks source link

OWL 2 RL Reasoner Engine Support #756

Closed bplatz closed 5 months ago

bplatz commented 5 months ago

This is an initial version of OWL 2 RL reasoner support with support for the complete OWL 2 RL rule set. There are other rules beyond OWL 2 RL that folks would like supported, and we can add those.

This initial version focuses on functionality and not yet performance, but was designed in a way that can leverage some of Fluree's capabilities to improve.

Our approach to OWL is different than most (if not all) reasoners. We leverage an underlying datalog reasoning engine that can take advantage of Fluree's immutabilty characteristics to deliver fast performance and edge-scalability. It also allow custom reasoning rules in datalog to be combined with OWL to deliver capabilities that OWL alone is not capable of.

Technically, applying a reasoner creates a new "virtual" DB independent from the source database, or source reasoner rules. This allows the source database to update unimpeded, and also allows the reasoning rules to be updated unimpeded as well - making both the source data and reasoning rules very dynamic.

Reasoning for OWL is a query concern, and is therefore pushed to the edge in a query server. This allows unlimited query scalability. It is also allows new "reasoned dbs" to be created dynamically, allowing practitioners to iterate on rules quickly and determine effects, or even utilize multiple reasoning rule sets as different dbs within a single federated query.

Reasoned facts reside in-memory which results in extremely fast query. This means large reasonded fact sets will required more memory - but with memory availability today this seems like the ideal tradeoff in almost all circumstances.

Improvements from here include:

The following OWL statements are part of OWL 2 RL and supported, according to the rules expressions detailed here: https://www.w3.org/TR/owl2-profiles/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules

instance equality

RDFS

property semantics

class semantics