This class implements the evaluation of reasoning programs on the triple store. It has two different modes:
- incremental reasoning: when new triples are added or old triples are removed, the inferred information is updated accordingly
- full reasoning: (re-)runs the reasoning process over all triples currently contained in the triple store
Since reasoning can require some time, the actual execution of incremental reasonong is implemented in a producer-consumer style. When new transaction data is available, it is added to a queue. A separate reasoning thread then takes new transaction data and processes the rules asynchronously.
The reasoning engine uses its own connection to the database to carry out reasoning tasks.
TODO: we need to clarify conceptually whether it would be correct to run several reasoner threads in parallel. In theory, reasoning here is strictly monotonic so there should not be a problem. In practice, we might miss certain triples because the order of transactions might be messed up. Maybe it makes more sense to parallelize the execution or rules instead.
User: Sebastian Schaffert (sschaffert@apache.org)