GitHub user jessehatfield opened a pull request:
https://github.com/apache/incubator-rya/pull/255
[WIP] RYA-417 Forward-chaining batch rules engine
<!--
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
New project for handling general rules in a batch forward-chaining context,
with specific implementations for simple SPIN construct rules. Tool reads rules
from the current data store, then repeatedly applies rules, inserting derived
triples back to the data store, until no new triples can be derived. Includes
Mongo-specific implementation which executes rules using the aggregation
pipeline. Depends on #254 for this reason.
Does not handle rules built from templates with variable substitution
(templates with no variables are supported just like explicit rules). Does not
support limits on the number of times a rule might apply, as long as the
derived information is new. Skips any rule that would produce bnodes so that
this behavior can't cause an infinite loop.
### Tests
Tests verify that construct queries are correctly parsed, and correctly
analyzed to determine which rules can trigger which other rules. Integration
test verifies that the batch tool produces correct derived triples, with both
Mongo-specific and generic SAIL execution strategies.
### Links
[Jira](https://issues.apache.org/jira/browse/RYA-417)
Depends on PR #254
### Checklist
- [ ] Code Review
- [ ] Squash Commits
#### People To Reivew
[Add those who should review this]
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jessehatfield/incubator-rya
RYA-417-forward-chain-spin
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rya/pull/255.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 #255
----
commit fab624ddda1b50f42ccd3347920668dc56245fc8
Author: Jesse Hatfield <jesse.hatfield@...>
Date: 2017-12-21T22:32:47Z
RYA-416 A new query node type to represent a MongoDB aggregation pipeline
whose results can be converted to binding sets, and tools for optionally
transforming some SPARQL expressions into such a node.
commit 80e27d59f6d1a8d1deac33a87a3ac02f44909aa3
Author: Jesse Hatfield <jesse.hatfield@...>
Date: 2017-12-22T17:02:33Z
RYA-417 Batch forward-chaining rules engine
----
---