owlcs / owlapi

OWL API main repository
822 stars 315 forks source link

The set Languages.components doesn't include nested constructs #1028

Open Kseii opened 2 years ago

Kseii commented 2 years ago

Given an instance l of Languages, l.components only contains the "top-level" constructs of the language l.

In my use case, this causes trouble when checking expressivity using the DLExpressivityChecker. Consider the language EL++ whose components are [CINT, E, +, R, O, (D)]. The construct for complex roles (R) also contains reflexive chains (Rr), transitive roles (+) and role hierarchy (H). Now, having an instance checker of DLExpressivityChecker with an input ontology that only makes use of constructs for full existential restrictions (E) and role hierarchy (H), checker.isWithin(Languages.ELPLUSPLUS) returns false even though the constructs E and H are part of R and thus contained in EL++.

As a possible solution, I think that components of languages could include the sub-constructs (the set of components is currently not minimal anyway). This would also prevent potential problems with isSubLanguageOf(...) and hasAllConstructs(...).