Hello,

I have a simple instance model with a few individuals, one of which has a
value constraint as part of its type definition:
hasValueConstraint exactly 1 xsd:double[>= "15.5"^^xsd:double , <=
"25.6"^^xsd:double]

My inference rules consist of 4 rules (rule1a-d) that match on such
constraints and leave a mark in the form of a comment with the name of the
relevant individual, and a 5th rule (rule2a) that matches on those comments
and simply outputs a print statement.

With the instance model containing the type definition above, rules 1a and
1b will fire, leave a mark, and rule 2a will fire soon after. However, if I
change the above definition to contain a conjunction (still keeping
Protege's reasoner happy), such as;
hasValueConstraint exactly 1 (xsd:double[>= "15.5"^^xsd:double] and
xsd:double[<= "25.6"^^xsd:double])
rules 1c and 1d fire accordingly and leave a mark, however, rule 2a
interestingly no longer does.

Rule 2a specifically looks for a triple containing the propertyFor object
property, where the subject matches the individual marked as a comment by
rules 1a-d, namely RoomTemperature. I also checked the model to ensure that
the definition of RoomTemperature stays unchanged after applying the
changes above.

The relevant ontology, instance model, inference rules, and the source code
(containing simple Jena API calls and model validation) which I use to fire
the inference rules are all available on this GitHub Gist
<https://gist.github.com/ivanspajic/28991218465d095c33dfb972841a123a>. Once
compiled, the application can be run via the console by supplying 4
filepaths as arguments: the ontology filepath, the instance model filepath,
the inference rules filepath, and the inferred (resulting) model filepath.

I appreciate any help with the matter. Please do not hesitate to ask for
any further clarifications.

Kind regards,
Ivan Spajić

Reply via email to