You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/20 23:16:00 UTC
[jira] [Commented] (RYA-293) Implement owl:unionOf inference
[ https://issues.apache.org/jira/browse/RYA-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16095537#comment-16095537 ]
ASF GitHub Bot commented on RYA-293:
------------------------------------
GitHub user jessehatfield opened a pull request:
https://github.com/apache/incubator-rya/pull/180
RYA-293 Added owl:unionOf inference
If A is the union of B and C, then B and C are subclasses of A.
A owl:unionOf (B C D) means that A is the exact set of nodes that belong to any of B, C, and/or D. Therefore:
1. Any node belonging to B is implied to belong to A, any node belonging to C is implied to belong to A, and any node belonging to node D is implied to belong to A. This is the same implication as B rdfs:subClassOf A, C rdfs:subClassOf A, rdfs:subClassOf A, so we handle this by adding these edges to the subclass graph. (Equivalent to *scm-uni* from [this list of rules](https://www.w3.org/TR/owl2-profiles/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules).)
2. Any node belonging to A is implied to belong to at least one of B, C, or D. However, we currently lack the advanced reasoning that would be needed to meaningfully apply this to a query (e.g. using some additional schema about B and C to prove by contradiction that the node must belong to D), so this implication is ignored for now.
(This limitation is consistent with the three OWL 2 profiles: EL and QL do not support unionOf and RL only supports the first case.)
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Description
>What Changed?
After creating the initial subClassOf graph, the inference engine then checks for any owl:unionOf triples. For each one, the object should refer to the head of a list and the subject is a type representing the union of all the list elements. Traverse the list and add an edge to the subClassOf graph for every member: since anything belonging to the list element belongs to the union type, we can also say that the list element is a subClassOf the union type.
### Tests
InferenceEngineTest.testUnionOf inserts schema including unions and verifies that the InferenceEngine builds the correct subClassOf graph.
InferenceIT.testUnionQuery inserts schema and ontology, refreshes the InferenceEngine, executes a query relying on union types, and verifies that the expected results are returned.
### Links
[Jira](https://issues.apache.org/jira/browse/RYA-293)
### Checklist
- [ ] Code Review
- [ ] Squash Commits
#### People To Review
@meiercaleb
@isper3at
@ejwhite922
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jessehatfield/incubator-rya RYA-293-unionOf-inference
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rya/pull/180.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #180
----
commit ee538a9b113312d29927b0e61bb7396e35e112c5
Author: Jesse Hatfield <je...@parsons.com>
Date: 2017-07-20T22:48:24Z
RYA-293 Added owl:unionOf inference
If A is the union of B and C, then B and C are subclasses of A.
----
> Implement owl:unionOf inference
> -------------------------------
>
> Key: RYA-293
> URL: https://issues.apache.org/jira/browse/RYA-293
> Project: Rya
> Issue Type: Sub-task
> Components: sail
> Reporter: Jesse Hatfield
> Assignee: Jesse Hatfield
>
> An *{{owl:unionOf}}* expression defines one type to be equivalent to the union of another set of types. If the ontology states that {{:Parent}} is the union of {{:Mother}} and {{:Father}}, then the inference engine should rewrite statement patterns of the form {{?x rdf:type :Parent}} to check for resources that are stated to be any of the types {{:Mother}}, {{:Father}}, or {{:Parent}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)