Search in sources :

Example 1 with DefaultRuleApplier

use of fr.lirmm.graphik.graal.forward_chaining.rule_applier.DefaultRuleApplier in project graal by graphik-team.

the class StoreTest method bugConcurrentModificationException.

@Theory
public void bugConcurrentModificationException(InMemoryAtomSet store) throws IteratorException, RuleApplicationException, AtomSetException {
    Assume.assumeTrue(store instanceof Store);
    Rule r = DlgpParser.parseRule("<T>(Z,W), <P>(Y,W) :- <P>(X,Y).");
    store.addAll(DlgpParser.parseAtomSet("<P>(a,a)."));
    try {
        DefaultRuleApplier<InMemoryAtomSet> applier = new DefaultRuleApplier<InMemoryAtomSet>();
        applier.apply(r, store);
        applier.apply(r, store);
    } catch (Exception e) {
        Assert.fail();
    }
}
Also used : InMemoryAtomSet(fr.lirmm.graphik.graal.api.core.InMemoryAtomSet) RdbmsStore(fr.lirmm.graphik.graal.store.rdbms.RdbmsStore) Store(fr.lirmm.graphik.graal.api.store.Store) TripleStore(fr.lirmm.graphik.graal.api.store.TripleStore) Rule(fr.lirmm.graphik.graal.api.core.Rule) RuleApplicationException(fr.lirmm.graphik.graal.api.forward_chaining.RuleApplicationException) AtomSetException(fr.lirmm.graphik.graal.api.core.AtomSetException) SQLException(java.sql.SQLException) HomomorphismException(fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException) ParseException(fr.lirmm.graphik.graal.api.io.ParseException) IteratorException(fr.lirmm.graphik.util.stream.IteratorException) DefaultRuleApplier(fr.lirmm.graphik.graal.forward_chaining.rule_applier.DefaultRuleApplier) Theory(org.junit.experimental.theories.Theory)

Aggregations

AtomSetException (fr.lirmm.graphik.graal.api.core.AtomSetException)1 InMemoryAtomSet (fr.lirmm.graphik.graal.api.core.InMemoryAtomSet)1 Rule (fr.lirmm.graphik.graal.api.core.Rule)1 RuleApplicationException (fr.lirmm.graphik.graal.api.forward_chaining.RuleApplicationException)1 HomomorphismException (fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException)1 ParseException (fr.lirmm.graphik.graal.api.io.ParseException)1 Store (fr.lirmm.graphik.graal.api.store.Store)1 TripleStore (fr.lirmm.graphik.graal.api.store.TripleStore)1 DefaultRuleApplier (fr.lirmm.graphik.graal.forward_chaining.rule_applier.DefaultRuleApplier)1 RdbmsStore (fr.lirmm.graphik.graal.store.rdbms.RdbmsStore)1 IteratorException (fr.lirmm.graphik.util.stream.IteratorException)1 SQLException (java.sql.SQLException)1 Theory (org.junit.experimental.theories.Theory)1