phenoscape/owlery

Owlery does not like 'THAT' instead of AND in OWL Class Expressions

matentzn opened this issue · 7 comments

The API fails hard if you replace AND with THAT (example), producing the following output:

requirement failed: string matching regex `\z' expected but `t' found

Using THAT instead of AND is allowed in Protege. Perhaps owlery should support this as well?

hlapp commented

It actually seems that the normative standard requires that instead of and in the position following the initial class IRI?

Seems like that's been relaxed in practice, but indeed not accepting that seems non-compliant with the standard.

Wow, I would not go that far certainly... It is perfectly fine to use and IMHO. :) Thanks for flagging it a bug though, it would be great if we had that freedom.

@hlapp I don't think that is required:

conjunction ::= classIRI 'that' [ 'not' ] restriction { 'and' [ 'not' ] restriction }
         | primary 'and' primary { 'and' primary }
         | primary

See the bar? The second alternative allows and there. I do agree the parser should support it. Owlet currently includes its own (incomplete) Manchester syntax parser, because the one in OWL API has some flaws which require declarations for the types of various terms.

hlapp commented

I see, so primary can be a classIRI as well. I'm relieved 😌

We're still out of compliance though if we refuse that where the standard allows it.

I updated the parser in owlet and updated the dependency here. It sticks to the spec, so the only expression that can follow a that are a series of (possibly negated) restrictions.

By the way, there is other stuff missing from the parser, like pretty much anything "data".

I strongly advocate a fully generic solution, but maybe we can keep the implementation low priority. I will open new issue.